Commit 72273f43 authored by Aakriti Gupta's avatar Aakriti Gupta Committed by Pavel Shutsin

Remove feature flag for Group activity analytics

parent 8c693240
...@@ -30,7 +30,7 @@ module EE ...@@ -30,7 +30,7 @@ module EE
end end
condition(:group_activity_analytics_available) do condition(:group_activity_analytics_available) do
@subject.feature_available?(:group_activity_analytics) && ::Feature.enabled?(:group_activity_analytics, @subject, type: :licensed, default_enabled: true) @subject.feature_available?(:group_activity_analytics)
end end
condition(:can_owners_manage_ldap, scope: :global) do condition(:can_owners_manage_ldap, scope: :global) do
......
...@@ -14,23 +14,9 @@ RSpec.describe 'GroupAnalytics' do ...@@ -14,23 +14,9 @@ RSpec.describe 'GroupAnalytics' do
sign_in(user) sign_in(user)
end end
context 'when the feature is enabled' do it 'renders the container' do
it 'renders the container' do visit path
visit path
expect(page).to have_css('#js-group-activity') expect(page).to have_css('#js-group-activity')
end
end
context 'when the feature is disabled' do
before do
stub_feature_flags(group_activity_analytics: false)
end
it 'does not render the container' do
visit path
expect(page).not_to have_css('#js-group-activity')
end
end end
end end
...@@ -157,7 +157,6 @@ RSpec.describe GroupsHelper do ...@@ -157,7 +157,6 @@ RSpec.describe GroupsHelper do
describe '#show_group_activity_analytics?' do describe '#show_group_activity_analytics?' do
before do before do
stub_feature_flags(group_activity_analytics: feature_available)
stub_licensed_features(group_activity_analytics: feature_available) stub_licensed_features(group_activity_analytics: feature_available)
allow(helper).to receive(:current_user) { current_user } allow(helper).to receive(:current_user) { current_user }
......
...@@ -176,7 +176,6 @@ RSpec.describe GroupPolicy do ...@@ -176,7 +176,6 @@ RSpec.describe GroupPolicy do
let(:current_user) { developer } let(:current_user) { developer }
before do before do
stub_feature_flags(group_activity_analytics: true)
stub_licensed_features(group_activity_analytics: true) stub_licensed_features(group_activity_analytics: true)
end end
...@@ -187,7 +186,6 @@ RSpec.describe GroupPolicy do ...@@ -187,7 +186,6 @@ RSpec.describe GroupPolicy do
let(:current_user) { developer } let(:current_user) { developer }
before do before do
stub_feature_flags(group_activity_analytics: false)
stub_licensed_features(group_activity_analytics: false) stub_licensed_features(group_activity_analytics: false)
end end
......
...@@ -13,7 +13,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do ...@@ -13,7 +13,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do
shared_examples 'GET group_activity' do |activity, count| shared_examples 'GET group_activity' do |activity, count|
let(:feature_available) { true } let(:feature_available) { true }
let(:feature_enabled) { true }
let(:params) { { group_path: group.full_path } } let(:params) { { group_path: group.full_path } }
let(:current_user) { reporter } let(:current_user) { reporter }
let(:request) do let(:request) do
...@@ -22,7 +21,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do ...@@ -22,7 +21,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do
before do before do
stub_licensed_features(group_activity_analytics: feature_available) stub_licensed_features(group_activity_analytics: feature_available)
stub_feature_flags(group_activity_analytics: feature_enabled)
request request
end end
...@@ -39,15 +37,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do ...@@ -39,15 +37,6 @@ RSpec.describe API::Analytics::GroupActivityAnalytics do
context 'when feature is not available in plan' do context 'when feature is not available in plan' do
let(:feature_available) { false } let(:feature_available) { false }
let(:feature_enabled) { false }
it 'is returns `forbidden`' do
expect(response).to have_gitlab_http_status(:forbidden)
end
end
context 'when feature is disabled globally' do
let(:feature_enabled) { false }
it 'is returns `forbidden`' do it 'is returns `forbidden`' do
expect(response).to have_gitlab_http_status(:forbidden) expect(response).to have_gitlab_http_status(:forbidden)
......
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