diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-16 18:09:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-16 18:09:24 +0000 |
commit | 1eec6b22b26d09ce6927adf66f98d755a6339815 (patch) | |
tree | b1bb8bbdc0d49136bfd176a1e64d3bd9f2969396 /spec/frontend/fixtures | |
parent | b4e854a900ba9bcbfc3476f88317c59ea048daaf (diff) | |
download | gitlab-ce-1eec6b22b26d09ce6927adf66f98d755a6339815.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/fixtures')
-rw-r--r-- | spec/frontend/fixtures/api_merge_requests.rb | 19 | ||||
-rw-r--r-- | spec/frontend/fixtures/pipelines.rb | 2 |
2 files changed, 17 insertions, 4 deletions
diff --git a/spec/frontend/fixtures/api_merge_requests.rb b/spec/frontend/fixtures/api_merge_requests.rb index f3280e216ff..7117c9a1c7a 100644 --- a/spec/frontend/fixtures/api_merge_requests.rb +++ b/spec/frontend/fixtures/api_merge_requests.rb @@ -6,9 +6,10 @@ RSpec.describe API::MergeRequests, '(JavaScript fixtures)', type: :request do include ApiHelpers include JavaScriptFixturesHelpers - let(:admin) { create(:admin, name: 'root') } - let(:namespace) { create(:namespace, name: 'gitlab-test' )} - let(:project) { create(:project, :repository, namespace: namespace, path: 'lorem-ipsum') } + let_it_be(:admin) { create(:admin, name: 'root') } + let_it_be(:namespace) { create(:namespace, name: 'gitlab-test' )} + let_it_be(:project) { create(:project, :repository, namespace: namespace, path: 'lorem-ipsum') } + let_it_be(:mr) { create(:merge_request, source_project: project) } before(:all) do clean_frontend_fixtures('api/merge_requests') @@ -21,4 +22,16 @@ RSpec.describe API::MergeRequests, '(JavaScript fixtures)', type: :request do expect(response).to be_successful end + + it 'api/merge_requests/versions.json' do + get api("/projects/#{project.id}/merge_requests/#{mr.iid}/versions", admin) + + expect(response).to be_successful + end + + it 'api/merge_requests/changes.json' do + get api("/projects/#{project.id}/merge_requests/#{mr.iid}/changes", admin) + + expect(response).to be_successful + end end diff --git a/spec/frontend/fixtures/pipelines.rb b/spec/frontend/fixtures/pipelines.rb index 4270e38afcb..b4b7f0e332f 100644 --- a/spec/frontend/fixtures/pipelines.rb +++ b/spec/frontend/fixtures/pipelines.rb @@ -12,7 +12,7 @@ RSpec.describe Projects::PipelinesController, '(JavaScript fixtures)', type: :co let!(:user) { create(:user, developer_projects: [project], email: commit.author_email) } let!(:pipeline) { create(:ci_pipeline, project: project, sha: commit.id, user: user) } let!(:pipeline_without_author) { create(:ci_pipeline, project: project, sha: commit_without_author.id) } - let!(:pipeline_without_commit) { create(:ci_pipeline, project: project, sha: '0000') } + let!(:pipeline_without_commit) { create(:ci_pipeline, status: :success, project: project, sha: '0000') } render_views |