Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-10-18 21:03:31 +0300
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-11-07 18:56:18 +0300
commit011e561bfa227f3ecbafe5b1ffd51700c680a15f (patch)
tree58af709e0f38dbfd7d389e2c3ad5516507ca2946 /spec/features/profile_spec.rb
parent9d51421346178c9189ffb47189f51d573ab42822 (diff)
implements reset incoming email token on issues modal and account page,
reactivates all tests and writes more tests for it
Diffstat (limited to 'spec/features/profile_spec.rb')
-rw-r--r--spec/features/profile_spec.rb29
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