diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-04-02 22:17:17 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-04-02 22:19:19 +0300 |
commit | eb9e09bb1a9943b6ec7d326db6b8d6261fe2deb8 (patch) | |
tree | e159fe14b83be5d69437beec273cf95090fb1c41 /spec/lib/gitlab/performance_bar_spec.rb | |
parent | 2f17b4cb78ab8c687675d78f675701a562c44b9e (diff) |
Always allow the performance bar to be enabled for admins
Diffstat (limited to 'spec/lib/gitlab/performance_bar_spec.rb')
-rw-r--r-- | spec/lib/gitlab/performance_bar_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/performance_bar_spec.rb b/spec/lib/gitlab/performance_bar_spec.rb index b8a2267f1a4..f480376acb4 100644 --- a/spec/lib/gitlab/performance_bar_spec.rb +++ b/spec/lib/gitlab/performance_bar_spec.rb @@ -25,6 +25,12 @@ describe Gitlab::PerformanceBar do expect(described_class.enabled?(nil)).to be_falsy end + it 'returns true when given user is an admin' do + user = build_stubbed(:user, :admin) + + expect(described_class.enabled?(user)).to be_truthy + end + it 'returns false when allowed_group_id is nil' do expect(described_class).to receive(:allowed_group_id).and_return(nil) |