BigW Consortium Gitlab

Commit ae40e855 by Sebastian Ziebell

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

parent 82bd0904
...@@ -400,6 +400,12 @@ describe Gitlab::API do ...@@ -400,6 +400,12 @@ describe Gitlab::API do
response.status.should == 201 response.status.should == 201
json_response['title'].should == 'api test' json_response['title'].should == 'api test'
end 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 end
describe "PUT /projects/:id/snippets/:shippet_id" do 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