From 7bf701095cebd9c9f01a7b7e7f662bc342bd4c99 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 18 Dec 2025 09:35:00 +0100 Subject: [PATCH] Fix tests after the UI/copy changes --- .../accounts/subscriptions/card_creation_test.rb | 10 +++++----- .../accounts/subscriptions/settings_test.rb | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/saas/test/controllers/accounts/subscriptions/card_creation_test.rb b/saas/test/controllers/accounts/subscriptions/card_creation_test.rb index 650ca7a1a..3f24c82c5 100644 --- a/saas/test/controllers/accounts/subscriptions/card_creation_test.rb +++ b/saas/test/controllers/accounts/subscriptions/card_creation_test.rb @@ -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 /you’ve 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 /you’ve 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 /you’ve 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 /you’ve used your/i, response.body end end diff --git a/saas/test/controllers/accounts/subscriptions/settings_test.rb b/saas/test/controllers/accounts/subscriptions/settings_test.rb index 702e1e4fe..63feac2c5 100644 --- a/saas/test/controllers/accounts/subscriptions/settings_test.rb +++ b/saas/test/controllers/accounts/subscriptions/settings_test.rb @@ -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 /You’ve 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