diff options
author | elijah <elijah@riseup.net> | 2017-08-15 11:31:04 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2017-08-15 11:31:04 -0700 |
commit | bc9dc8e62a01b9f961026e7d33be4d9f92763920 (patch) | |
tree | 19daae2d11e7e541cee2f3891d6f0b43c3294c77 /test | |
parent | 76c110035323a9082ba89459d1ef2ef598159509 (diff) |
use i18n for login test
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/api/login_test.rb | 4 | ||||
-rw-r--r-- | test/integration/browser/account_livecycle_test.rb | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/integration/api/login_test.rb b/test/integration/api/login_test.rb index 22047bc..97e0ff6 100644 --- a/test/integration/api/login_test.rb +++ b/test/integration/api/login_test.rb @@ -22,7 +22,7 @@ class LoginTest < SrpTest test "wrong password login attempt" do authenticate password: "wrong password" - assert_json_error "base" => "Not a valid username/password combination" + assert_json_error "base" => I18n.t(:invalid_user_pass) assert !last_response.successful? assert_nil server_auth["M2"] end @@ -31,7 +31,7 @@ class LoginTest < SrpTest assert_raises RECORD_NOT_FOUND do authenticate login: "wrong login" end - assert_json_error "base" => "Not a valid username/password combination" + assert_json_error "base" => I18n.t(:invalid_user_pass) assert !last_response.successful? assert_nil server_auth end diff --git a/test/integration/browser/account_livecycle_test.rb b/test/integration/browser/account_livecycle_test.rb index 694ff9c..cfab444 100644 --- a/test/integration/browser/account_livecycle_test.rb +++ b/test/integration/browser/account_livecycle_test.rb @@ -2,6 +2,8 @@ require 'test_helper' class AccountLivecycleTest < BrowserIntegrationTest + include ActionView::Helpers::SanitizeHelper + teardown do Identity.destroy_all_orphaned end @@ -115,7 +117,7 @@ class AccountLivecycleTest < BrowserIntegrationTest def assert_invalid_login(page) assert page.has_selector? '.btn-primary.disabled' - assert page.has_content? I18n.t(:invalid_user_pass) + assert page.has_content? sanitize(I18n.t(:invalid_user_pass), tags: []) assert page.has_no_selector? '.btn-primary.disabled' end |