diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-07-07 16:45:53 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-07-07 16:45:53 -0400 |
commit | 75f3f6e1d6a826b28363fba518f7d3cf016c2df6 (patch) | |
tree | e06f8564bbc63e0a21c16849cacd4ea24ad5f848 /spec/features/user_can_display_performance_bar_spec.rb | |
parent | 7d03012f2a950804568f744b433f04ff4a7f1186 (diff) | |
parent | 69e17c225e53feaa7449e468e89aca3f084ab9f9 (diff) | |
download | gitlab-ce-75f3f6e1d6a826b28363fba518f7d3cf016c2df6.tar.gz |
Merge branch 'master' into rs-sign_in
Diffstat (limited to 'spec/features/user_can_display_performance_bar_spec.rb')
-rw-r--r-- | spec/features/user_can_display_performance_bar_spec.rb | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/spec/features/user_can_display_performance_bar_spec.rb b/spec/features/user_can_display_performance_bar_spec.rb index 8464bf50cac..670e8dda916 100644 --- a/spec/features/user_can_display_performance_bar_spec.rb +++ b/spec/features/user_can_display_performance_bar_spec.rb @@ -33,22 +33,24 @@ describe 'User can display performance bar', :js do end end + let(:group) { create(:group) } + context 'when user is logged-out' do before do visit root_path end - context 'when the gitlab_performance_bar feature is disabled' do + context 'when the performance_bar feature is disabled' do before do - Feature.disable('gitlab_performance_bar') + stub_application_setting(performance_bar_allowed_group_id: nil) end it_behaves_like 'performance bar is disabled' end - context 'when the gitlab_performance_bar feature is enabled' do + context 'when the performance_bar feature is enabled' do before do - Feature.enable('gitlab_performance_bar') + stub_application_setting(performance_bar_allowed_group_id: group.id) end it_behaves_like 'performance bar is disabled' @@ -57,22 +59,25 @@ describe 'User can display performance bar', :js do context 'when user is logged-in' do before do - sign_in(create(:user)) + user = create(:user) + + sign_in(user) + group.add_guest(user) visit root_path end - context 'when the gitlab_performance_bar feature is disabled' do + context 'when the performance_bar feature is disabled' do before do - Feature.disable('gitlab_performance_bar') + stub_application_setting(performance_bar_allowed_group_id: nil) end it_behaves_like 'performance bar is disabled' end - context 'when the gitlab_performance_bar feature is enabled' do + context 'when the performance_bar feature is enabled' do before do - Feature.enable('gitlab_performance_bar') + stub_application_setting(performance_bar_allowed_group_id: group.id) end it_behaves_like 'performance bar is enabled' |