diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-01 14:03:57 +0200 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-14 14:50:32 +0200 |
commit | 994e7d135947ca162c147c5e0992a0190de22808 (patch) | |
tree | cd9ea4d93269c8597541f8c59e89a83ca2b56d2b /spec/controllers | |
parent | 2b82f907abf2074ac332531d6142893d081f44b9 (diff) | |
download | gitlab-ce-994e7d135947ca162c147c5e0992a0190de22808.tar.gz |
Create system notes for MR too, improve doc + clean up code
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/notes_controller_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/projects/notes_controller_spec.rb b/spec/controllers/projects/notes_controller_spec.rb index 10edad462c1..6a6430dfc13 100644 --- a/spec/controllers/projects/notes_controller_spec.rb +++ b/spec/controllers/projects/notes_controller_spec.rb @@ -239,6 +239,15 @@ describe Projects::NotesController do merge_request.update_attribute(:discussion_locked, true) end + context 'when a noteable is not found' do + it 'returns 404 status' do + request_params[:note][:noteable_id] = 9999 + post :create, request_params.merge(format: :json) + + expect(response).to have_http_status(404) + end + end + context 'when a user is a team member' do it 'returns 302 status for html' do post :create, request_params |