Commit 8ed6e2ec authored by Katarzyna Kobierska's avatar Katarzyna Kobierska

Fix test

parent 6b02c82c
...@@ -3,15 +3,16 @@ require 'spec_helper' ...@@ -3,15 +3,16 @@ require 'spec_helper'
describe 'projects/merge_requests/show.html.haml' do describe 'projects/merge_requests/show.html.haml' do
include Devise::TestHelpers include Devise::TestHelpers
let(:user) { create(:user) }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:fork_project) { create(:project, forked_from_project: project) } let(:fork_project) { create(:project, forked_from_project: project) }
let(:unlink_project) { Projects::UnlinkForkService.new(fork_project, user) }
let(:closed_merge_request) do let(:closed_merge_request) do
create(:closed_merge_request, create(:closed_merge_request,
source_project: fork_project, source_project: fork_project,
source_branch: 'add-submodule-version-bump', target_project: project,
target_branch: 'master', author: user)
target_project: project)
end end
before do before do
...@@ -31,7 +32,8 @@ describe 'projects/merge_requests/show.html.haml' do ...@@ -31,7 +32,8 @@ describe 'projects/merge_requests/show.html.haml' do
end end
it 'does not show the "Reopen" button when the source project does not exist' do it 'does not show the "Reopen" button when the source project does not exist' do
fork_project.destroy unlink_project.execute
closed_merge_request.reload
render render
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment