API: test checks a 404 error is returned if snippet id not found

This commit is contained in:
Sebastian Ziebell 2013-02-13 10:25:13 +01:00
parent 7cc4339f71
commit 82bd0904ff

View file

@ -386,6 +386,11 @@ describe Gitlab::API do
response.status.should == 200 response.status.should == 200
json_response['title'].should == snippet.title json_response['title'].should == snippet.title
end end
it "should return a 404 error if snippet id not found" do
get api("/projects/#{project.id}/snippets/1234", user)
response.status.should == 404
end
end end
describe "POST /projects/:id/snippets" do describe "POST /projects/:id/snippets" do