API: test checks a 400 code is returned if snippet title not given
This commit is contained in:
parent
82bd0904ff
commit
ae40e855ef
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue