diff options
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb b/spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb index a5031ff6a82..dd04d63bcc0 100644 --- a/spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb +++ b/spec/lib/sidebars/projects/menus/infrastructure_menu_spec.rb @@ -107,6 +107,22 @@ RSpec.describe Sidebars::Projects::Menus::InfrastructureMenu, feature_category: let(:item_id) { :terraform } it_behaves_like 'access rights checks' + + context 'if terraform_state.enabled=true' do + before do + stub_config(terraform_state: { enabled: true }) + end + + it_behaves_like 'access rights checks' + end + + context 'if terraform_state.enabled=false' do + before do + stub_config(terraform_state: { enabled: false }) + end + + it { is_expected.to be_nil } + end end describe 'Google Cloud' do |