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/controllers | |
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/controllers')
-rw-r--r-- | spec/controllers/projects_controller_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index 8eefa284ba0..ca6bf17005c 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -264,6 +264,33 @@ describe ProjectsController do end end + describe 'PUT #new_issue_address' do + subject do + put :new_issue_address, + namespace_id: project.namespace.to_param, + id: project.to_param + user.reload + end + + before do + sign_in(user) + project.team << [user, :developer] + allow(Gitlab.config.incoming_email).to receive(:enabled).and_return(true) + end + + it 'has http status 200' do + expect(response).to have_http_status(200) + end + + it 'changes the user incoming email token' do + expect { subject }.to change { user.incoming_email_token } + end + + it 'changes projects new issue address' do + expect { subject }.to change { project.new_issue_address(user) } + end + end + describe "POST #toggle_star" do it "toggles star if user is signed in" do sign_in(user) |