diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2016-10-27 09:26:58 -0400 |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2017-02-14 13:22:14 -0500 |
commit | 309aee45b69888f9b51aaa0ce393a3f13b08c255 (patch) | |
tree | 3ddeb4d01c44afbe2363de6ee649ef4fa664b3b2 /spec/requests/api/branches_spec.rb | |
parent | e5f446b7ca4bc54ffaf527e4c57dea2bee2f79f6 (diff) | |
download | gitlab-ce-309aee45b69888f9b51aaa0ce393a3f13b08c255.tar.gz |
entities: use the RepoCommit entity for branch commits
Fixes #23895.
Diffstat (limited to 'spec/requests/api/branches_spec.rb')
-rw-r--r-- | spec/requests/api/branches_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index 5a3ffc284f2..3e66236f6ae 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -31,7 +31,18 @@ describe API::Branches, api: true do expect(response).to have_http_status(200) expect(json_response['name']).to eq(branch_name) - expect(json_response['commit']['id']).to eq(branch_sha) + json_commit = json_response['commit'] + expect(json_commit['id']).to eq(branch_sha) + expect(json_commit).to have_key('short_id') + expect(json_commit).to have_key('title') + expect(json_commit).to have_key('message') + expect(json_commit).to have_key('author_name') + expect(json_commit).to have_key('author_email') + expect(json_commit).to have_key('authored_date') + expect(json_commit).to have_key('committer_name') + expect(json_commit).to have_key('committer_email') + expect(json_commit).to have_key('committed_date') + expect(json_commit).to have_key('parent_ids') expect(json_response['merged']).to eq(false) expect(json_response['protected']).to eq(false) expect(json_response['developers_can_push']).to eq(false) |