Fix tests after the UI/copy changes

This commit is contained in:
Jorge Manrubia
2025-12-18 09:35:00 +01:00
parent 0f9d1df31b
commit 7bf701095c
2 changed files with 6 additions and 7 deletions
@@ -22,7 +22,7 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
get card_path(cards(:unfinished_thoughts), script_name: accounts(:initech).slug)
assert_response :success
assert_match /upgrade for more/i, response.body
assert_match /upgrade to get more/i, response.body
end
# Exceeding limits - shown instead of create buttons
@@ -35,7 +35,7 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
get card_path(cards(:unfinished_thoughts), script_name: accounts(:initech).slug)
assert_response :success
assert_match /you've used your.*free cards/i, response.body
assert_match /youve used your.*free cards/i, response.body
end
test "admin sees exceeding storage limit notice" do
@@ -46,7 +46,7 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
get card_path(cards(:unfinished_thoughts), script_name: accounts(:initech).slug)
assert_response :success
assert_match /you've used your.*free storage/i, response.body
assert_match /youve run out of.*free storage/i, response.body
end
# Paid accounts under limits - no notices
@@ -60,7 +60,7 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
assert_response :success
assert_no_match /upgrade/i, response.body
assert_no_match /you've used your/i, response.body
assert_no_match /youve used your/i, response.body
end
# Comped accounts under limits - no notices
@@ -74,6 +74,6 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
assert_response :success
assert_no_match /upgrade/i, response.body
assert_no_match /you've used your/i, response.body
assert_no_match /youve used your/i, response.body
end
end
@@ -9,7 +9,7 @@ class Account::Subscriptions::SettingsTest < ActionDispatch::IntegrationTest
get account_settings_path(script_name: accounts(:initech).slug)
assert_response :success
assert_select "h3", text: /You've used 3 free cards out of 1000/
assert_match /Youve used.*3.*free cards out of 1,000/i, response.body
end
test "paid users see thank you message" do
@@ -44,7 +44,6 @@ class Account::Subscriptions::SettingsTest < ActionDispatch::IntegrationTest
assert_response :success
assert_select "button", text: /downgrade/i
assert_select "button", text: /upgrade/i, count: 0
end
test "comped accounts see no subscription panel" do