mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-24 12:06:11 +10:00
API: test checks a 400 code is returned if snippet title not given
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user