summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2018-01-30 15:17:15 +0100
committerMatija Čupić <matteeyah@gmail.com>2018-01-30 15:17:15 +0100
commitf2253d48a109a12f00b87f5aaaa42299860315f4 (patch)
tree1d57022758d2fb25924723e52196af234fc44899 /spec/helpers
parent2cd71eb5f5fc4ae2b1e6385977ec7ef298dc77db (diff)
downloadgitlab-ce-f2253d48a109a12f00b87f5aaaa42299860315f4.tar.gz
Show GKE cluster callout for project owner as well
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/callouts_helper_spec.rb16
1 files changed, 13 insertions, 3 deletions
diff --git a/spec/helpers/callouts_helper_spec.rb b/spec/helpers/callouts_helper_spec.rb
index f160aafbd7b..8dd97e22477 100644
--- a/spec/helpers/callouts_helper_spec.rb
+++ b/spec/helpers/callouts_helper_spec.rb
@@ -26,11 +26,21 @@ describe CalloutsHelper do
end
context 'when user is not master' do
- before do
- allow(project).to receive_message_chain(:team, :master?).and_return(false)
+ context 'when the user is owner' do
+ before do
+ allow(project).to receive(:owner).and_return(user)
+ end
+
+ it { is_expected.to be true }
end
- it { is_expected.to be false }
+ context 'when the user is not owner' do
+ before do
+ allow(project).to receive_message_chain(:team, :master?).and_return(false)
+ end
+
+ it { is_expected.to be false }
+ end
end
end