diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-06-15 04:13:58 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-06-15 04:13:58 +0300 |
commit | 7b4e0739e6834cfe192012059163af523dcae798 (patch) | |
tree | ca6d847c11a589bf41a8f3a06cecca8b2c8cfc8d /spec/finders | |
parent | e7a8fe07ea8a1dca711274e85630a0cf2107b3cc (diff) |
Project members with guest role can't access notes on confidential issues
Diffstat (limited to 'spec/finders')
-rw-r--r-- | spec/finders/notes_finder_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/finders/notes_finder_spec.rb b/spec/finders/notes_finder_spec.rb index 639b28d49ee..1bd354815e4 100644 --- a/spec/finders/notes_finder_spec.rb +++ b/spec/finders/notes_finder_spec.rb @@ -49,6 +49,13 @@ describe NotesFinder do user = create(:user) expect { NotesFinder.new.execute(project, user, params) }.to raise_error(ActiveRecord::RecordNotFound) end + + it 'raises an error for project members with guest role' do + user = create(:user) + project.team << [user, :guest] + + expect { NotesFinder.new.execute(project, user, params) }.to raise_error(ActiveRecord::RecordNotFound) + end end end end |