diff options
author | dixpac <dino.onex@gmail.com> | 2016-07-27 11:02:49 +0200 |
---|---|---|
committer | dixpac <dino.onex@gmail.com> | 2016-07-28 11:30:56 +0200 |
commit | a4bb9993c45b3d63a3d88f92ffc14bf849c38906 (patch) | |
tree | 08bbe10511be0826ac26d6844d4fc5c7979b7c67 /spec | |
parent | 17be364d072298f42d77fd22189bf9289b7cda2e (diff) | |
download | gitlab-ce-a4bb9993c45b3d63a3d88f92ffc14bf849c38906.tar.gz |
Add commit stats to commit api response
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/commits_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index 5219c808791..e4ea8506598 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -73,9 +73,13 @@ describe API::API, api: true do context "authorized user" do it "should return a commit by sha" do get api("/projects/#{project.id}/repository/commits/#{project.repository.commit.id}", user) + expect(response).to have_http_status(200) expect(json_response['id']).to eq(project.repository.commit.id) expect(json_response['title']).to eq(project.repository.commit.title) + expect(json_response['stats']['additions']).to eq(project.repository.commit.stats.additions) + expect(json_response['stats']['deletions']).to eq(project.repository.commit.stats.deletions) + expect(json_response['stats']['total']).to eq(project.repository.commit.stats.total) end it "should return a 404 error if not found" do |