Commit 9a8b88bc authored by Matthias Käppler's avatar Matthias Käppler

Merge branch '341070-cablett-no-type-nil-namespace-factories' into 'master'

Migrate Complince Framwork tests away from nil type namespace factories

See merge request gitlab-org/gitlab!73819
parents 958fec76 9e7317b5
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe ComplianceManagement::Frameworks::CreateService do RSpec.describe ComplianceManagement::Frameworks::CreateService do
let_it_be_with_refind(:namespace) { create(:namespace) } let_it_be_with_refind(:namespace) { create(:user_namespace) }
let(:params) do let(:params) do
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe ComplianceManagement::Frameworks::DestroyService do RSpec.describe ComplianceManagement::Frameworks::DestroyService do
let_it_be_with_refind(:namespace) { create(:namespace) } let_it_be_with_refind(:namespace) { create(:user_namespace) }
let_it_be_with_refind(:framework) { create(:compliance_framework, namespace: namespace) } let_it_be_with_refind(:framework) { create(:compliance_framework, namespace: namespace) }
context 'when feature is disabled' do context 'when feature is disabled' do
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe ComplianceManagement::Frameworks::UpdateService do RSpec.describe ComplianceManagement::Frameworks::UpdateService do
let_it_be_with_refind(:namespace) { create(:namespace) } let_it_be_with_refind(:namespace) { create(:user_namespace) }
let_it_be_with_refind(:framework) { create(:compliance_framework, namespace: namespace) } let_it_be_with_refind(:framework) { create(:compliance_framework, namespace: namespace) }
let(:current_user) { namespace.owner } let(:current_user) { namespace.owner }
......
...@@ -284,7 +284,7 @@ RSpec.describe Namespace do ...@@ -284,7 +284,7 @@ RSpec.describe Namespace do
end end
end end
context 'creating a default Namespace' do context 'creating a Namespace with nil type' do
let(:namespace_type) { nil } let(:namespace_type) { nil }
it 'is the correct type of namespace' do it 'is the correct type of namespace' do
...@@ -295,7 +295,7 @@ RSpec.describe Namespace do ...@@ -295,7 +295,7 @@ RSpec.describe Namespace do
end end
context 'creating an unknown Namespace type' do context 'creating an unknown Namespace type' do
let(:namespace_type) { 'One' } let(:namespace_type) { 'nonsense' }
it 'creates a default Namespace' do it 'creates a default Namespace' do
expect(Namespace.find(namespace.id)).to be_a(Namespace) expect(Namespace.find(namespace.id)).to be_a(Namespace)
......
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