diff options
| author | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-13 14:47:59 +0100 |
|---|---|---|
| committer | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-13 14:47:59 +0100 |
| commit | 54ab9bb6df3a2cd9f9384aebae07e0b18acee10b (patch) | |
| tree | 89c102b6d362ca3db8636a3707fc9772f9b4b803 /spec | |
| parent | fd01f3aacda1e7e1966489e7d9a31f89745cd509 (diff) | |
| download | gitlab-ce-54ab9bb6df3a2cd9f9384aebae07e0b18acee10b.tar.gz | |
API: return status code 400 if filepath of raw file blob not given
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/requests/api/projects_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index a04c2318a79..de1b1b09e5f 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -468,7 +468,7 @@ describe Gitlab::API do end end - describe "GET /projects/:id/:sha/blob" do + describe "GET /projects/:id/repository/commits/:sha/blob" do it "should get the raw file contents" do get api("/projects/#{project.id}/repository/commits/master/blob?filepath=README.md", user) response.status.should == 200 @@ -483,5 +483,10 @@ describe Gitlab::API do get api("/projects/#{project.id}/repository/commits/master/blob?filepath=README.invalid", user) response.status.should == 404 end + + it "should return a 400 error if filepath is missing" do + get api("/projects/#{project.id}/repository/commits/master/blob", user) + response.status.should == 400 + end end end |
