Commit ae40e855 authored by Sebastian Ziebell's avatar Sebastian Ziebell

API: test checks a 400 code is returned if snippet title not given

parent 82bd0904
No related merge requests found
......@@ -400,6 +400,12 @@ describe Gitlab::API do
response.status.should == 201
json_response['title'].should == 'api test'
end
it "should return a 400 error if title is not given" do
post api("/projects/#{project.id}/snippets", user),
file_name: 'sample.rb', code: 'test'
response.status.should == 400
end
end
describe "PUT /projects/:id/snippets/:shippet_id" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment