diff options
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r-- | spec/models/namespace_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 475fbe56e4d..aadc298ae0b 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -775,4 +775,28 @@ describe Namespace do end end end + + describe '#auto_devops_enabled' do + context 'with users' do + let(:user) { create(:user) } + + subject { user.namespace.auto_devops_enabled? } + + before do + user.namespace.update!(auto_devops_enabled: auto_devops_enabled) + end + + context 'when auto devops is explicitly enabled' do + let(:auto_devops_enabled) { true } + + it { is_expected.to eq(true) } + end + + context 'when auto devops is explicitly disabled' do + let(:auto_devops_enabled) { false } + + it { is_expected.to eq(false) } + end + end + end end |