BigW Consortium Gitlab

Commit a5c05544 by http://jneen.net/

fix a brittle stub

true is neither nil nor a user and doesn't make sense as the return value of `current_user`
parent f7a111e9
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment