diff options
author | azul <azul@riseup.net> | 2017-04-03 08:51:56 +0000 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-04-03 08:51:56 +0000 |
commit | d4ec87744e5eed54126c78a7d2f1154d1e8e53c0 (patch) | |
tree | 70405839cd6bbf3331c94412b4178b6399dfafa3 /test/integration/browser/account_livecycle_test.rb | |
parent | 552483c9e3f73952839e934374e2aa8b07681f4d (diff) | |
parent | e9bdd2aa5a0662a9fc6d5ce730e26cfd560210ba (diff) |
Merge branch 'feature/clear-user' into 'master'
feature: delete user clearing username
Closes #26
See merge request !34
Diffstat (limited to 'test/integration/browser/account_livecycle_test.rb')
-rw-r--r-- | test/integration/browser/account_livecycle_test.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/test/integration/browser/account_livecycle_test.rb b/test/integration/browser/account_livecycle_test.rb index 835dfdc..3d23363 100644 --- a/test/integration/browser/account_livecycle_test.rb +++ b/test/integration/browser/account_livecycle_test.rb @@ -8,7 +8,7 @@ class AccountLivecycleTest < BrowserIntegrationTest test "signup successfully when invited" do username, password = submit_signup - assert page.has_content?("Welcome #{username}") + assert_successful_login username click_on 'Log Out' assert page.has_content?("Log In") assert_equal '/', current_path @@ -28,14 +28,14 @@ class AccountLivecycleTest < BrowserIntegrationTest fill_in 'Password confirmation', with: password click_on 'Sign Up' - assert page.has_content?("Welcome #{username}") + assert_successful_login username end end test "signup with username ending in dot json" do username = Faker::Internet.user_name + '.json' submit_signup username - assert page.has_content?("Welcome #{username}") + assert_successful_login username end test "signup with reserved username" do @@ -48,7 +48,7 @@ class AccountLivecycleTest < BrowserIntegrationTest username, password = submit_signup click_on 'Log Out' attempt_login(username, password) - assert page.has_content?("Welcome #{username}") + assert_successful_login username within('.sidenav li.active') do assert page.has_content?("Overview") end @@ -80,6 +80,15 @@ class AccountLivecycleTest < BrowserIntegrationTest assert page.has_content?('has already been taken') end + test "handle available after non blocking account destruction" do + username, password = submit_signup + click_on I18n.t('account_settings') + uncheck I18n.t('keep_username_blocked') + click_on I18n.t('destroy_my_account') + submit_signup(username) + assert_successful_login username + end + test "change pgp key" do with_config user_actions: ['change_pgp_key'] do pgp_key = FactoryGirl.build :pgp_key @@ -111,4 +120,7 @@ class AccountLivecycleTest < BrowserIntegrationTest assert page.has_no_selector? '.btn-primary.disabled' end + def assert_successful_login(username) + assert page.has_content?("Welcome #{username}") + end end |