diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-03-01 11:39:18 -0800 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-03-09 11:49:53 -0800 |
commit | a5c05544cf572613cebe2249cd7bb97b2ef508e7 (patch) | |
tree | a32b4280e4c1abdda91ad4794c91f12e2407e5d4 | |
parent | f7a111e97656a441e1c78e9ed81d4212f46dfb23 (diff) | |
download | gitlab-ce-a5c05544cf572613cebe2249cd7bb97b2ef508e7.tar.gz |
fix a brittle stub
true is neither nil nor a user and doesn't make sense as the return
value of `current_user`
-rw-r--r-- | spec/requests/api/helpers_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb index a89676fec93..988a57a80ea 100644 --- a/spec/requests/api/helpers_spec.rb +++ b/spec/requests/api/helpers_spec.rb @@ -436,7 +436,7 @@ describe API::Helpers, api: true do context 'current_user is present' do before do - expect_any_instance_of(self.class).to receive(:current_user).and_return(true) + expect_any_instance_of(self.class).to receive(:current_user).at_least(:once).and_return(User.new) end it 'does not raise an error' do |