Skip to content

Commit 7bf7010

Browse files
committed
Fix tests after the UI/copy changes
1 parent 0f9d1df commit 7bf7010

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

saas/test/controllers/accounts/subscriptions/card_creation_test.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
2222
get card_path(cards(:unfinished_thoughts), script_name: accounts(:initech).slug)
2323

2424
assert_response :success
25-
assert_match /upgrade for more/i, response.body
25+
assert_match /upgrade to get more/i, response.body
2626
end
2727

2828
# Exceeding limits - shown instead of create buttons
@@ -35,7 +35,7 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
3535
get card_path(cards(:unfinished_thoughts), script_name: accounts(:initech).slug)
3636

3737
assert_response :success
38-
assert_match /you've used your.*free cards/i, response.body
38+
assert_match /youve used your.*free cards/i, response.body
3939
end
4040

4141
test "admin sees exceeding storage limit notice" do
@@ -46,7 +46,7 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
4646
get card_path(cards(:unfinished_thoughts), script_name: accounts(:initech).slug)
4747

4848
assert_response :success
49-
assert_match /you've used your.*free storage/i, response.body
49+
assert_match /youve run out of.*free storage/i, response.body
5050
end
5151

5252
# Paid accounts under limits - no notices
@@ -60,7 +60,7 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
6060

6161
assert_response :success
6262
assert_no_match /upgrade/i, response.body
63-
assert_no_match /you've used your/i, response.body
63+
assert_no_match /youve used your/i, response.body
6464
end
6565

6666
# Comped accounts under limits - no notices
@@ -74,6 +74,6 @@ class Account::Subscriptions::CardCreationTest < ActionDispatch::IntegrationTest
7474

7575
assert_response :success
7676
assert_no_match /upgrade/i, response.body
77-
assert_no_match /you've used your/i, response.body
77+
assert_no_match /youve used your/i, response.body
7878
end
7979
end

saas/test/controllers/accounts/subscriptions/settings_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Account::Subscriptions::SettingsTest < ActionDispatch::IntegrationTest
99
get account_settings_path(script_name: accounts(:initech).slug)
1010

1111
assert_response :success
12-
assert_select "h3", text: /You've used 3 free cards out of 1000/
12+
assert_match /Youve used.*3.*free cards out of 1,000/i, response.body
1313
end
1414

1515
test "paid users see thank you message" do
@@ -44,7 +44,6 @@ class Account::Subscriptions::SettingsTest < ActionDispatch::IntegrationTest
4444

4545
assert_response :success
4646
assert_select "button", text: /downgrade/i
47-
assert_select "button", text: /upgrade/i, count: 0
4847
end
4948

5049
test "comped accounts see no subscription panel" do

0 commit comments

Comments
 (0)