diff options
author | Sam Rose <sam@gitlab.com> | 2017-03-06 23:18:39 +0300 |
---|---|---|
committer | Sam Rose <sam@gitlab.com> | 2017-03-20 17:43:54 +0300 |
commit | aea78ded3408a7f68f226049389d52abe8bb087f (patch) | |
tree | beac4ab6fbadbd5aca887d2d3a162ad4286324bd /spec/features/issues_spec.rb | |
parent | 9ed3db915026c6e0cd266a1c276386e3e96d2151 (diff) |
Redirect to signin when New Issue for not logged in
Diffstat (limited to 'spec/features/issues_spec.rb')
-rw-r--r-- | spec/features/issues_spec.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 1c8267b1593..a58aedc924e 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -6,7 +6,7 @@ describe 'Issues', feature: true do include SortingHelper include WaitForAjax - let(:project) { create(:project) } + let(:project) { create(:project, :public) } before do login_as :user @@ -565,6 +565,24 @@ describe 'Issues', feature: true do end describe 'new issue' do + context 'by unauthenticated user' do + before do + logout + end + + it 'redirects to signin then back to new issue after signin' do + visit namespace_project_issues_path(project.namespace, project) + + click_link 'New issue' + + expect(current_path).to eq new_user_session_path + + login_as :user + + expect(current_path).to eq new_namespace_project_issue_path(project.namespace, project) + end + end + context 'dropzone upload file', js: true do before do visit new_namespace_project_issue_path(project.namespace, project) |