Commit 5d57d16e authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'fix-namespaceless-project-destroy-worker-specs' into 'master'

Makes namespaceless project destroy worker spec not depend on a specific migration version

See merge request gitlab-org/gitlab-ce!18650
...@@ -22,13 +22,11 @@ ...@@ -22,13 +22,11 @@
end end
end end
# Only possible with schema 20180222043024 and lower. context 'project has no namespace' do
# Project#namespace_id has not null constraint since then let!(:project) { create(:project) }
context 'project has no namespace', :migration, schema: 20180222043024 do
let!(:project) do before do
project = build(:project, namespace_id: nil) allow_any_instance_of(Project).to receive(:namespace).and_return(nil)
project.save(validate: false)
project
end end
context 'project not a fork of another project' do context 'project not a fork of another project' do
...@@ -61,8 +59,7 @@ ...@@ -61,8 +59,7 @@
let!(:parent_project) { create(:project) } let!(:parent_project) { create(:project) }
let(:project) do let(:project) do
namespaceless_project = fork_project(parent_project) namespaceless_project = fork_project(parent_project)
namespaceless_project.namespace_id = nil namespaceless_project.save
namespaceless_project.save(validate: false)
namespaceless_project namespaceless_project
end end
......
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