diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-10-30 19:17:31 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-10-30 19:17:31 +0300 |
commit | e0ca65c5144d4f6de91e3c808437bd85c0323b14 (patch) | |
tree | cb376681861ad2b90c502e49c1cd57644cd2d954 /spec/features/profiles/personal_access_tokens_spec.rb | |
parent | 5a0e41a58a1a5de4a755abd6709792d5c10f6205 (diff) |
add accept_confirm around attempts to revoke personal access tokens
Diffstat (limited to 'spec/features/profiles/personal_access_tokens_spec.rb')
-rw-r--r-- | spec/features/profiles/personal_access_tokens_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index 7fd6f4a26bd..8461cd0027c 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -78,7 +78,7 @@ describe 'Profile > Personal Access Tokens', :js do it "allows revocation of an active token" do visit profile_personal_access_tokens_path - click_on "Revoke" + accept_confirm { click_on "Revoke" } expect(page).to have_selector(".settings-message") expect(no_personal_access_tokens_message).to have_text("This user has no active Personal Access Tokens.") @@ -100,7 +100,7 @@ describe 'Profile > Personal Access Tokens', :js do errors = ActiveModel::Errors.new(PersonalAccessToken.new).tap { |e| e.add(:name, "cannot be nil") } allow_any_instance_of(PersonalAccessToken).to receive(:errors).and_return(errors) - click_on "Revoke" + accept_confirm { click_on "Revoke" } expect(active_personal_access_tokens).to have_text(personal_access_token.name) expect(page).to have_content("Could not revoke") end |