diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-09-07 19:15:32 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-09-07 19:15:32 +0300 |
commit | 523a1c69ab6c51969f2613c4042d91318f841081 (patch) | |
tree | a30cd8e62725a818a9d0e4bfa6405fe194fdc3d6 /spec/requests | |
parent | ec304cb9297ae75a7f46d6945d537c5d1cbd2fdf (diff) | |
parent | cfd475a45ee2655fa0148b0b561f95b44fe8641b (diff) |
Merge branch '23079-remove-default-scope-in-sortable' into 'master'
Removes default scope from sortable
Closes #23079
See merge request !13558
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/merge_request_diffs_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/projects_spec.rb | 4 | ||||
-rw-r--r-- | spec/requests/api/v3/merge_request_diffs_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/projects/cycle_analytics_events_spec.rb | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/spec/requests/api/merge_request_diffs_spec.rb b/spec/requests/api/merge_request_diffs_spec.rb index d1b22179888..d9da94d4713 100644 --- a/spec/requests/api/merge_request_diffs_spec.rb +++ b/spec/requests/api/merge_request_diffs_spec.rb @@ -14,7 +14,7 @@ describe API::MergeRequestDiffs, 'MergeRequestDiffs' do describe 'GET /projects/:id/merge_requests/:merge_request_iid/versions' do it 'returns 200 for a valid merge request' do get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/versions", user) - merge_request_diff = merge_request.merge_request_diffs.first + merge_request_diff = merge_request.merge_request_diffs.last expect(response.status).to eq 200 expect(response).to include_pagination_headers diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index f771e4fa4ff..9602584f546 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -595,7 +595,7 @@ describe API::Projects do expect { post api("/projects/user/#{user.id}", admin), name: 'Foo Project' }.to change {Project.count}.by(1) expect(response).to have_http_status(201) - project = Project.first + project = Project.last expect(project.name).to eq('Foo Project') expect(project.path).to eq('foo-project') @@ -606,7 +606,7 @@ describe API::Projects do .to change { Project.count }.by(1) expect(response).to have_http_status(201) - project = Project.first + project = Project.last expect(project.name).to eq('Foo Project') expect(project.path).to eq('path-project-Foo') diff --git a/spec/requests/api/v3/merge_request_diffs_spec.rb b/spec/requests/api/v3/merge_request_diffs_spec.rb index 8020ddab4c8..3f21ff40726 100644 --- a/spec/requests/api/v3/merge_request_diffs_spec.rb +++ b/spec/requests/api/v3/merge_request_diffs_spec.rb @@ -14,7 +14,7 @@ describe API::V3::MergeRequestDiffs, 'MergeRequestDiffs' do describe 'GET /projects/:id/merge_requests/:merge_request_id/versions' do it 'returns 200 for a valid merge request' do get v3_api("/projects/#{project.id}/merge_requests/#{merge_request.id}/versions", user) - merge_request_diff = merge_request.merge_request_diffs.first + merge_request_diff = merge_request.merge_request_diffs.last expect(response.status).to eq 200 expect(json_response.size).to eq(merge_request.merge_request_diffs.size) diff --git a/spec/requests/projects/cycle_analytics_events_spec.rb b/spec/requests/projects/cycle_analytics_events_spec.rb index e5d9d3df5a8..6667ce771bd 100644 --- a/spec/requests/projects/cycle_analytics_events_spec.rb +++ b/spec/requests/projects/cycle_analytics_events_spec.rb @@ -93,7 +93,7 @@ describe 'cycle analytics events' do context 'with private project and builds' do before do - project.members.first.update(access_level: Gitlab::Access::GUEST) + project.members.last.update(access_level: Gitlab::Access::GUEST) end it 'does not list the test events' do |