Project members with guest role can't access notes on confidential issues

This commit is contained in:
Douglas Barbosa Alexandre 2016-06-14 22:13:58 -03:00
parent e7a8fe07ea
commit 7b4e0739e6
1 changed files with 7 additions and 0 deletions

View File

@ -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