Commit b6b6cbd2 authored by Tim Zallmann's avatar Tim Zallmann

More Test Changes

parent 62c2cd2d
......@@ -54,7 +54,6 @@ describe Groups::AnalyticsController do
it 'returns page when feature is not available and we show promotions' do
stub_licensed_features(contribution_analytics: false)
let!(:license) { nil }
get :show, group_id: group.path
......
......@@ -16,6 +16,8 @@ describe 'layouts/nav/_group' do
context 'no license installed' do
before do
current_user = create(:user)
allow(helper).to receive(:current_user).and_return(current_user)
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
end
......
......@@ -69,9 +69,10 @@ describe 'Promotions', js: true do
end
describe 'for service desk', js: true do
let!(:license) { nil }
before do
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
project.team << [user, :master]
sign_in(user)
end
......@@ -95,9 +96,10 @@ describe 'Promotions', js: true do
end
describe 'for merge request improve', js: true do
let!(:license) { nil }
before do
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
project.team << [user, :master]
sign_in(user)
end
......@@ -121,9 +123,10 @@ describe 'Promotions', js: true do
end
describe 'for repository features', js: true do
let!(:license) { nil }
before do
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
project.team << [user, :master]
sign_in(user)
end
......@@ -148,9 +151,10 @@ describe 'Promotions', js: true do
end
describe 'for squash commits', js: true do
let!(:license) { nil }
before do
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
project.team << [user, :master]
sign_in(user)
end
......@@ -174,9 +178,10 @@ describe 'Promotions', js: true do
end
describe 'for burndown charts', js: true do
let!(:license) { nil }
before do
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
project.team << [user, :master]
sign_in(user)
end
......@@ -200,9 +205,10 @@ describe 'Promotions', js: true do
end
describe 'for issue export', js: true do
let!(:license) { nil }
before do
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
project.team << [user, :master]
sign_in(user)
end
......@@ -215,9 +221,10 @@ describe 'Promotions', js: true do
end
describe 'for project audit events', js: true do
let!(:license) { nil }
before do
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
project.team << [user, :master]
sign_in(user)
end
......@@ -229,9 +236,10 @@ describe 'Promotions', js: true do
end
describe 'for group contribution analytics', js: true do
let!(:license) { nil }
before do
allow(License).to receive(:current).and_return(nil)
stub_application_setting(check_namespace_plan: false)
group.add_owner(user)
sign_in(user)
end
......
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