diff options
Diffstat (limited to 'spec/features/profiles/personal_access_tokens_spec.rb')
-rw-r--r-- | spec/features/profiles/personal_access_tokens_spec.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/features/profiles/personal_access_tokens_spec.rb b/spec/features/profiles/personal_access_tokens_spec.rb index c85657c89d5..379c25d6002 100644 --- a/spec/features/profiles/personal_access_tokens_spec.rb +++ b/spec/features/profiles/personal_access_tokens_spec.rb @@ -22,6 +22,10 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do find("#feed_token").value end + def feed_token_description + "Your feed token authenticates you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar. It is visible in those feed URLs." + end + def disallow_personal_access_token_saves! allow(PersonalAccessTokens::CreateService).to receive(:new).and_return(pat_create_service) @@ -123,8 +127,9 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do allow(Gitlab::CurrentSettings).to receive(:disable_feed_token).and_return(false) visit profile_personal_access_tokens_path - expect(page).to have_content("Your feed token is used to authenticate you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar, and is included in those feed URLs.") expect(feed_token).to eq(user.feed_token) + + expect(page).to have_content(feed_token_description) end end @@ -133,8 +138,8 @@ RSpec.describe 'Profile > Personal Access Tokens', :js do allow(Gitlab::CurrentSettings).to receive(:disable_feed_token).and_return(true) visit profile_personal_access_tokens_path - expect(page).not_to have_content("Your feed token is used to authenticate you when your RSS reader loads a personalized RSS feed or when your calendar application loads a personalized calendar, and is included in those feed URLs.") - expect(page).not_to have_css("#feed_token") + expect(page).to have_no_content(feed_token_description) + expect(page).to have_no_css("#feed_token") end end end |