diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-20 20:16:08 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-20 20:16:08 +0300 |
commit | cd0f688707c4330207626bb47b1bf4e0df0e988e (patch) | |
tree | efa2b02abd76d1c7c656b2008bddc4df7574d572 /spec | |
parent | 4a8a28eb9e9dffb03a8c8be413aa341f452ce113 (diff) |
Don't use potentially slow ForkService in spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/projects/blob_controller_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb index f72a958662e..7d4636e98d1 100644 --- a/spec/controllers/projects/blob_controller_spec.rb +++ b/spec/controllers/projects/blob_controller_spec.rb @@ -86,11 +86,13 @@ describe Projects::BlobController do end context 'when user has forked project' do - let(:guest) { create(:user) } - let!(:forked_project) { Projects::ForkService.new(project, guest).execute } - let!(:merge_request) { create(:merge_request, source_project: project, target_project: project, source_branch: "fork-test-1", target_branch: "master") } + let(:forked_project_link) { create(:forked_project_link, forked_from_project: project) } + let!(:forked_project) { forked_project_link.forked_to_project } + let(:guest) { forked_project.owner } - before { sign_in(guest) } + before do + sign_in(guest) + end context 'when editing on the fork' do before do |