diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-10-18 19:03:31 +0100 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-11-07 15:56:18 +0000 |
commit | 011e561bfa227f3ecbafe5b1ffd51700c680a15f (patch) | |
tree | 58af709e0f38dbfd7d389e2c3ad5516507ca2946 /spec/features/profile_spec.rb | |
parent | 9d51421346178c9189ffb47189f51d573ab42822 (diff) | |
download | gitlab-ce-011e561bfa227f3ecbafe5b1ffd51700c680a15f.tar.gz |
implements reset incoming email token on issues modal and account page,use-separate-token-for-incoming-email
reactivates all tests and writes more tests for it
Diffstat (limited to 'spec/features/profile_spec.rb')
-rw-r--r-- | spec/features/profile_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb index c3d8c349ca4..7a562b5e03d 100644 --- a/spec/features/profile_spec.rb +++ b/spec/features/profile_spec.rb @@ -32,4 +32,33 @@ describe 'Profile account page', feature: true do expect(current_path).to eq(profile_account_path) end end + + describe 'when I reset private token' do + before do + visit profile_account_path + end + + it 'resets private token' do + previous_token = find("#private-token").value + + click_link('Reset private token') + + expect(find('#private-token').value).not_to eq(previous_token) + end + end + + describe 'when I reset incoming email token' do + before do + allow(Gitlab.config.incoming_email).to receive(:enabled).and_return(true) + visit profile_account_path + end + + it 'resets incoming email token' do + previous_token = find('#incoming-email-token').value + + click_link('Reset incoming email token') + + expect(find('#incoming-email-token').value).not_to eq(previous_token) + end + end end |