Commit 82bd0904ffb34e16ac66fb83a9ce79a5845ce78b

Authored by Sebastian Ziebell
1 parent 7cc4339f

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

Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
spec/requests/api/projects_spec.rb
... ... @@ -386,6 +386,11 @@ describe Gitlab::API do
386 386 response.status.should == 200
387 387 json_response['title'].should == snippet.title
388 388 end
  389 +
  390 + it "should return a 404 error if snippet id not found" do
  391 + get api("/projects/#{project.id}/snippets/1234", user)
  392 + response.status.should == 404
  393 + end
389 394 end
390 395  
391 396 describe "POST /projects/:id/snippets" do
... ...