diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-09-16 14:30:28 +0200 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-09-16 16:28:53 +0200 |
commit | cf00fbecc544dfd2d597ae89c5ecbae1b6842932 (patch) | |
tree | 5ca8548768ad0dc32de728de3a83bbdf116c1b95 /spec/requests/api/notes_spec.rb | |
parent | 065341bf04958b862db9cc2891c7822a3da7f7f8 (diff) | |
download | gitlab-ce-cf00fbecc544dfd2d597ae89c5ecbae1b6842932.tar.gz |
Fix API notes endpoint when posting only emoji
Diffstat (limited to 'spec/requests/api/notes_spec.rb')
-rw-r--r-- | spec/requests/api/notes_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb index 223444ea39f..063a8706e76 100644 --- a/spec/requests/api/notes_spec.rb +++ b/spec/requests/api/notes_spec.rb @@ -220,6 +220,15 @@ describe API::API, api: true do expect(Time.parse(json_response['created_at'])).to be_within(1.second).of(creation_time) end end + + context 'when the user is posting an award emoji' do + it 'returns an award emoji' do + post api("/projects/#{project.id}/issues/#{issue.id}/notes", user), body: ':+1:' + + expect(response).to have_http_status(201) + expect(json_response['awardable_id']).to eq issue.id + end + end end context "when noteable is a Snippet" do |