diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-05-11 09:47:04 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-05-11 09:47:04 +0300 |
commit | 7e6dcf9cd0626c6d0cbbe96ae5327048d2c6849f (patch) | |
tree | 33f22befc61e52178098bf77e57bba7a96aaae86 /spec/services/todo_service_spec.rb | |
parent | dccf8a9fc8d4dde91942944f6b47387bfb13c380 (diff) | |
parent | 98d8e3fe9ff4d120469378490c41381ae751597e (diff) |
Merge branch 'master' into awardables
Diffstat (limited to 'spec/services/todo_service_spec.rb')
-rw-r--r-- | spec/services/todo_service_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb index 455b19c89cc..0d88b77ad74 100644 --- a/spec/services/todo_service_spec.rb +++ b/spec/services/todo_service_spec.rb @@ -55,6 +55,25 @@ describe TodoService, services: true do should_create_todo(user: admin, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) should_not_create_todo(user: john_doe, target: confidential_issue, author: john_doe, action: Todo::MENTIONED) end + + context 'when a private group is mentioned' do + let(:group) { create :group, :private } + let(:project) { create :project, :private, group: group } + let(:issue) { create :issue, author: author, project: project, description: group.to_reference } + + before do + group.add_owner(author) + group.add_user(member, Gitlab::Access::DEVELOPER) + group.add_user(john_doe, Gitlab::Access::DEVELOPER) + + service.new_issue(issue, author) + end + + it 'creates a todo for group members' do + should_create_todo(user: member, target: issue) + should_create_todo(user: john_doe, target: issue) + end + end end describe '#update_issue' do |