From a5c05544cf572613cebe2249cd7bb97b2ef508e7 Mon Sep 17 00:00:00 2001 From: "http://jneen.net/" Date: Wed, 1 Mar 2017 11:39:18 -0800 Subject: fix a brittle stub true is neither nil nor a user and doesn't make sense as the return value of `current_user` --- spec/requests/api/helpers_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/requests/api/helpers_spec.rb') 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 -- cgit v1.2.1