Skip to content
Snippets Groups Projects
Commit 5462000d authored by Allen Cook's avatar Allen Cook :three:
Browse files

Merge branch 'ali/add-tests-to-deployments-menu' into 'master'

Test Deployments menu behaviour with new feature toggles and FF

See merge request !95414
parents 0f253c0f c351a166
No related branches found
No related tags found
2 merge requests!96059Draft: Add GraphQL query for deployment details,!95414Test Deployments menu behaviour with new feature toggles and FF
Pipeline #617874890 passed
......@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe Sidebars::Projects::Menus::DeploymentsMenu do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:project, reload: true) { create(:project, :repository) }
let(:user) { project.first_owner }
let(:context) { Sidebars::Projects::Context.new(current_user: user, container: project) }
......@@ -37,6 +37,40 @@
specify { is_expected.to be_nil }
end
describe 'when the feature is disabled' do
before do
project.update_attribute("#{item_id}_access_level", 'disabled')
end
it { is_expected.to be_nil }
end
describe 'when split_operations_visibility_permissions FF is disabled' do
before do
stub_feature_flags(split_operations_visibility_permissions: false)
end
it { is_expected.not_to be_nil }
context 'and the feature is disabled' do
before do
project.update_attribute("#{item_id}_access_level", 'disabled')
end
it { is_expected.not_to be_nil }
end
context 'and operations is disabled' do
before do
project.update_attribute(:operations_access_level, 'disabled')
end
it do
is_expected.to be_nil if [:environments, :feature_flags].include?(item_id)
end
end
end
end
describe 'Feature Flags' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment