Multiple issue assignee: fixed services/issues/update_service by using new NoteSummary
This commit is contained in:
parent
0f2a9681a3
commit
fc464f1ff2
2 changed files with 1 additions and 22 deletions
|
@ -84,7 +84,7 @@ module SystemNoteService
|
||||||
"assigned to #{issue.assignees.map(&:to_reference).to_sentence}"
|
"assigned to #{issue.assignees.map(&:to_reference).to_sentence}"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_note(noteable: issue, project: project, author: author, note: body)
|
NoteSummary.new(issue, project, author, body, action: 'assignee')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Called when one or more labels on a Noteable are added and/or removed
|
# Called when one or more labels on a Noteable are added and/or removed
|
||||||
|
|
|
@ -21,7 +21,6 @@ describe 'Issue Boards', feature: true, js: true do
|
||||||
Timecop.freeze
|
Timecop.freeze
|
||||||
|
|
||||||
project.team << [user, :master]
|
project.team << [user, :master]
|
||||||
project.team.add_developer(user2)
|
|
||||||
|
|
||||||
login_as(user)
|
login_as(user)
|
||||||
|
|
||||||
|
@ -103,26 +102,6 @@ describe 'Issue Boards', feature: true, js: true do
|
||||||
expect(card).to have_selector('.avatar')
|
expect(card).to have_selector('.avatar')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'adds multiple assignees' do
|
|
||||||
click_card(card)
|
|
||||||
|
|
||||||
page.within('.assignee') do
|
|
||||||
click_link 'Edit'
|
|
||||||
|
|
||||||
wait_for_ajax
|
|
||||||
|
|
||||||
page.within('.dropdown-menu-user') do
|
|
||||||
click_link user.name
|
|
||||||
click_link user2.name
|
|
||||||
end
|
|
||||||
|
|
||||||
expect(page).to have_content(user.name)
|
|
||||||
expect(page).to have_content(user2.name)
|
|
||||||
end
|
|
||||||
|
|
||||||
expect(card.all('.avatar').length).to eq(2)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'removes the assignee' do
|
it 'removes the assignee' do
|
||||||
card_two = first('.board').find('.card:nth-child(2)')
|
card_two = first('.board').find('.card:nth-child(2)')
|
||||||
click_card(card_two)
|
click_card(card_two)
|
||||||
|
|
Loading…
Reference in a new issue