gitlab-org--gitlab-foss/spec/support/shared_contexts/merge_request_edit.rb
2019-04-08 18:40:00 -03:00

28 lines
932 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
shared_context 'merge request edit context' do
let(:user) { create(:user) }
let(:user2) { create(:user) }
let!(:milestone) { create(:milestone, project: target_project) }
let!(:label) { create(:label, project: target_project) }
let!(:label2) { create(:label, project: target_project) }
let(:target_project) { create(:project, :public, :repository) }
let(:source_project) { target_project }
let(:merge_request) do
create(:merge_request,
source_project: source_project,
target_project: target_project,
source_branch: 'fix',
target_branch: 'master')
end
before do
source_project.add_maintainer(user)
target_project.add_maintainer(user)
target_project.add_maintainer(user2)
sign_in(user)
visit edit_project_merge_request_path(target_project, merge_request)
end
end