diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-10-12 21:37:04 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-10-12 21:37:04 +0200 |
commit | 2f2ad9eaf06e4573da77f9602fa9678711dba4d9 (patch) | |
tree | 0f0eb102b146da8358ec1ba0c81bf0498cdee4bd /spec/requests/api/commits_spec.rb | |
parent | 2e3bc85421ddfc814e81f75e3adb8a8c1d53093e (diff) | |
parent | 58e2b44afe535100508eb4d49d7e7df24e408383 (diff) | |
download | gitlab-ce-feature/improve-mrwbs-and-todos-for-pipelines.tar.gz |
Merge branch 'master' into feature/improve-mrwbs-and-todos-for-pipelinesfeature/improve-mrwbs-and-todos-for-pipelines
* master:
Update health_check gem to `~> 2.2.0`
API: Version information
Revert "Merge branch 'tests-use-tmpfs' into 'master'"
Added documentation chapter for Git attributes
Use activerecord_sane_schema_dumper
Add a separate stage for bundle check
Add a bundle check step to ensure dependencies are correct
Create a new /templates API namespace
Add disabled delete button to protected branches
Make spec deterministic
refactors tests because of gitlab-test repository changes
Addresses Robert's feedback
Speed up specs for GET /projects/:id/events
API: New /users/:id/events endpoint
writes tests to verify the issue is solved and fixes breaking issues.
removes inconsistency regarding tagging immediately as merged once you create a branch using new branch button and adds changelog entry
Diffstat (limited to 'spec/requests/api/commits_spec.rb')
-rw-r--r-- | spec/requests/api/commits_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index aa610557056..66fa0c0c01f 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -53,7 +53,12 @@ describe API::API, api: true do get api("/projects/#{project.id}/repository/commits?until=#{before.utc.iso8601}", user) - expect(json_response.size).to eq(commits.size - 1) + if commits.size >= 20 + expect(json_response.size).to eq(20) + else + expect(json_response.size).to eq(commits.size - 1) + end + expect(json_response.first["id"]).to eq(commits.second.id) expect(json_response.second["id"]).to eq(commits.third.id) end @@ -447,11 +452,12 @@ describe API::API, api: true do end it 'returns the inline comment' do - post api("/projects/#{project.id}/repository/commits/#{project.repository.commit.id}/comments", user), note: 'My comment', path: project.repository.commit.raw_diffs.first.new_path, line: 7, line_type: 'new' + post api("/projects/#{project.id}/repository/commits/#{project.repository.commit.id}/comments", user), note: 'My comment', path: project.repository.commit.raw_diffs.first.new_path, line: 1, line_type: 'new' + expect(response).to have_http_status(201) expect(json_response['note']).to eq('My comment') expect(json_response['path']).to eq(project.repository.commit.raw_diffs.first.new_path) - expect(json_response['line']).to eq(7) + expect(json_response['line']).to eq(1) expect(json_response['line_type']).to eq('new') end |