diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-07-14 13:56:50 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-07-14 13:56:50 +0000 |
commit | e90c382c25fbccf885e8345d614dc4d6fc9909b6 (patch) | |
tree | c6ed38c2f39331a45332b40b66ba5a48e88a8bd2 /spec/features/profiles | |
parent | c42e481f394cbf33ffecfef82ad37c3ab5bdc179 (diff) | |
parent | fa0e43bb578d3e126776a6a6763b943d0363d3e5 (diff) | |
download | gitlab-ce-e90c382c25fbccf885e8345d614dc4d6fc9909b6.tar.gz |
Merge branch '19629-remove-inactive-tokens-list' into 'master'
Remove Inactive Personal Access Tokens list from Access Tokens page
Closes #19629
See merge request !12866
Diffstat (limited to 'spec/features/profiles')
-rw-r--r-- | spec/features/profiles/personal_access_tokens_spec.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index 44b7ee101c9..3c08b6bc091 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -7,8 +7,8 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do find(".table.active-tokens") end - def inactive_personal_access_tokens - find(".table.inactive-tokens") + def no_personal_access_tokens_message + find(".settings-message") end def created_personal_access_token @@ -80,14 +80,16 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do visit profile_personal_access_tokens_path click_on "Revoke" - expect(inactive_personal_access_tokens).to have_text(personal_access_token.name) + expect(page).to have_selector(".settings-message") + expect(no_personal_access_tokens_message).to have_text("This user has no active Personal Access Tokens.") end - it "moves expired tokens to the 'inactive' section" do + it "removes expired tokens from 'active' section" do personal_access_token.update(expires_at: 5.days.ago) visit profile_personal_access_tokens_path - expect(inactive_personal_access_tokens).to have_text(personal_access_token.name) + expect(page).to have_selector(".settings-message") + expect(no_personal_access_tokens_message).to have_text("This user has no active Personal Access Tokens.") end context "when revocation fails" do |