gitlab-org--gitlab-foss/spec/features/merge_request/user_creates_mr_spec.rb
Rémy Coutable 799cd47109
Improve MR feature specs and reduce duplication
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-01-18 15:07:57 +01:00

31 lines
760 B
Ruby

require 'rails_helper'
describe 'Merge request > User creates MR' do
it_behaves_like 'a creatable merge request'
context 'from a forked project' do
include ProjectForksHelper
let(:canonical_project) { create(:project, :public, :repository) }
let(:source_project) do
fork_project(canonical_project, user,
repository: true,
namespace: user.namespace)
end
context 'to canonical project' do
it_behaves_like 'a creatable merge request'
end
context 'to another forked project' do
let(:target_project) do
fork_project(canonical_project, user,
repository: true,
namespace: user.namespace)
end
it_behaves_like 'a creatable merge request'
end
end
end