diff options
author | Jason Blanchard <jas.blanchard@gmail.com> | 2014-03-02 12:29:01 -0500 |
---|---|---|
committer | Jason Blanchard <jas.blanchard@gmail.com> | 2014-03-02 13:10:45 -0500 |
commit | 3ada1d7ec38c48f3f69c5bd2efde4a9546c71ec1 (patch) | |
tree | 884e17e7d3afee3cf6690bf8e94700239858b8f2 /spec/features | |
parent | a9dcfd851f80c35522ac844b316af783d0db7e64 (diff) | |
download | gitlab-ce-3ada1d7ec38c48f3f69c5bd2efde4a9546c71ec1.tar.gz |
Added option to remove issue assignee on project issue page and issue edit page
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/issues_spec.rb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index ffe6d02d2f2..b9dab7846b1 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -43,6 +43,31 @@ describe "Issues" do page.should have_content project.name end end + + end + + describe "Editing issue assignee" do + let!(:issue) do + create(:issue, + author: @user, + assignee: @user, + project: project) + end + + it 'allows user to select unasigned', :js => true do + visit edit_project_issue_path(project, issue) + + page.should have_content "Assign to #{@user.name}" + + page.first('#s2id_issue_assignee_id').click + sleep 2 # wait for ajax stuff to complete + page.first('.user-result').click + + click_button "Save changes" + + page.should have_content "Assignee: Select assignee" + issue.reload.assignee.should be_nil + end end describe "Filter issue" do @@ -245,6 +270,28 @@ describe "Issues" do page.should have_content milestone.title end end + + describe 'removing assignee' do + let(:user2) { create(:user) } + + before :each do + issue.assignee = user2 + issue.save + end + + it 'allows user to remove assignee', :js => true do + visit project_issue_path(project, issue) + page.should have_content "Assignee: #{user2.name}" + + page.first('#s2id_issue_assignee_id').click + sleep 2 # wait for ajax stuff to complete + page.first('.user-result').click + + page.should have_content "Assignee: Unassigned" + sleep 2 # wait for ajax stuff to complete + issue.reload.assignee.should be_nil + end + end end def first_issue |