diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-08-15 13:27:37 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-09-07 15:01:59 +0300 |
commit | cfd475a45ee2655fa0148b0b561f95b44fe8641b (patch) | |
tree | 84bc8f20239d58ed19e35cb515c50d3b36735c4f /spec/requests | |
parent | d1b60cbc67dc14b21820ef3f823a8e1ea851697d (diff) |
Removes default scope from sortable
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 4490e50702b..bf2a123e7cd 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -574,7 +574,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') @@ -585,7 +585,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 |