Fix the :project factory by not copying the test repo twice

Also, fixing some calls to the :project factory with the :test_repo
trait since this trait is already included in the :project factory.

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2017-07-27 09:58:06 +02:00
parent eb9ca0e7e1
commit 05e152fa7f
No known key found for this signature in database
GPG key ID: 46DF07E5CD9E96AB
6 changed files with 5 additions and 9 deletions

View file

@ -171,10 +171,6 @@ FactoryGirl.define do
end
after :create do |project, evaluator|
TestEnv.copy_repo(project,
bare_repo: TestEnv.factory_repo_path_bare,
refs: TestEnv::BRANCH_SHA)
if evaluator.create_template
args = evaluator.create_template

View file

@ -3,7 +3,7 @@ require 'spec_helper'
feature 'Editing file blob', feature: true, js: true do
include TreeHelper
let(:project) { create(:project, :public, :test_repo) }
let(:project) { create(:project, :public) }
let(:merge_request) { create(:merge_request, source_project: project, source_branch: 'feature', target_branch: 'master') }
let(:branch) { 'master' }
let(:file_path) { project.repository.ls_files(project.repository.root_ref)[1] }

View file

@ -2,7 +2,7 @@ require 'spec_helper'
describe 'forked project import', services: true do
let(:user) { create(:user) }
let!(:project_with_repo) { create(:project, :test_repo, name: 'test-repo-restorer', path: 'test-repo-restorer') }
let!(:project_with_repo) { create(:project, name: 'test-repo-restorer', path: 'test-repo-restorer') }
let!(:project) { create(:empty_project, name: 'test-repo-restorer-no-repo', path: 'test-repo-restorer-no-repo') }
let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: project.path_with_namespace) }

View file

@ -2,7 +2,7 @@ require 'spec_helper'
describe Gitlab::ImportExport::MergeRequestParser do
let(:user) { create(:user) }
let!(:project) { create(:project, :test_repo, name: 'test-repo-restorer', path: 'test-repo-restorer') }
let!(:project) { create(:project, name: 'test-repo-restorer', path: 'test-repo-restorer') }
let(:forked_from_project) { create(:project) }
let(:fork_link) { create(:forked_project_link, forked_from_project: project) }

View file

@ -3,7 +3,7 @@ require 'spec_helper'
describe Gitlab::ImportExport::RepoRestorer, services: true do
describe 'bundle a project Git repo' do
let(:user) { create(:user) }
let!(:project_with_repo) { create(:project, :test_repo, name: 'test-repo-restorer', path: 'test-repo-restorer') }
let!(:project_with_repo) { create(:project, name: 'test-repo-restorer', path: 'test-repo-restorer') }
let!(:project) { create(:empty_project) }
let(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: project.path_with_namespace) }

View file

@ -1,7 +1,7 @@
require 'spec_helper'
describe API::Todos do
let(:project_1) { create(:empty_project, :test_repo) }
let(:project_1) { create(:project) }
let(:project_2) { create(:empty_project) }
let(:author_1) { create(:user) }
let(:author_2) { create(:user) }