diff options
author | Phil Hughes <me@iamphill.com> | 2016-03-23 14:18:39 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-03-23 14:19:32 +0300 |
commit | 84f124a14fe9f955f737386b2805d1203e28259e (patch) | |
tree | 0503a04bee13b42c980b8483b7aed5e3e7b5d04b /spec/features/issues/update_issues_spec.rb | |
parent | 7e2806a1230f57b73e7d0628ba917af96537f8fc (diff) |
Assignee tests
Diffstat (limited to 'spec/features/issues/update_issues_spec.rb')
-rw-r--r-- | spec/features/issues/update_issues_spec.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/features/issues/update_issues_spec.rb b/spec/features/issues/update_issues_spec.rb index 27707d49b9c..70e218cc14f 100644 --- a/spec/features/issues/update_issues_spec.rb +++ b/spec/features/issues/update_issues_spec.rb @@ -37,10 +37,50 @@ feature 'Multiple issue updating from issues#index', feature: true do end end + context 'assignee update', js: true do + before do + project.team << [user, :master] + login_as(user) + end + + it 'should update to current user' do + visit namespace_project_issues_path(project.namespace, project) + + find('#check_all_issues').click + find('.js-update-assignee').click + + find('.dropdown-menu-user-link', text: user.username).click + click_update_issues_button + + page.within('.issue .controls') do + expect(find('.author_link')["data-original-title"]).to have_content(user.name) + end + end + + it 'should update to unassigned' do + create_assigned + visit namespace_project_issues_path(project.namespace, project) + + find('#check_all_issues').click + find('.js-update-assignee').click + + find('.dropdown-menu-user-link', text: "Unassigned").click + click_update_issues_button + + within first('.issue .controls') do + expect(page).to have_no_selector('.author_link') + end + end + end + def create_closed create(:issue, project: project, state: :closed) end + def create_assigned + create(:issue, project: project, assignee: user) + end + def click_update_issues_button find('.update_selected_issues').click end |