Commit 9e7317b5 authored by charlie ablett's avatar charlie ablett Committed by Matthias Käppler

No longer allow nil type namespace factories

All default namespace factories should be `UserNamespace`
since `nil` used to mean `User` type
parent 61ea24bf
......@@ -3,7 +3,7 @@
require 'spec_helper'
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
{
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
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) }
context 'when feature is disabled' do
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
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(:current_user) { namespace.owner }
......
......@@ -284,7 +284,7 @@ RSpec.describe Namespace do
end
end
context 'creating a default Namespace' do
context 'creating a Namespace with nil type' do
let(:namespace_type) { nil }
it 'is the correct type of namespace' do
......@@ -295,7 +295,7 @@ RSpec.describe Namespace do
end
context 'creating an unknown Namespace type' do
let(:namespace_type) { 'One' }
let(:namespace_type) { 'nonsense' }
it 'creates a default Namespace' do
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