Enable RSpec/MessageExpectation cop & fix issues
There was 34 `allow` occurences and 17 `expect` occurences, so to be consistent `allow` form was chosen. Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/MessageExpectation
This commit is contained in:
@@ -47,13 +47,13 @@ describe ManagerAuthenticator do
|
||||
it 'calls the verification user method' do
|
||||
message = { ub: {user_key: "31415926", date: "20151031135905"} }
|
||||
allow(authenticator).to receive(:application_authorized?).and_return(true)
|
||||
expect(authenticator.send(:client)).to receive(:call).with(:get_status_user_data, message: message)
|
||||
allow(authenticator.send(:client)).to receive(:call).with(:get_status_user_data, message: message)
|
||||
authenticator.auth
|
||||
end
|
||||
|
||||
it 'calls the permissions check method' do
|
||||
allow(authenticator).to receive(:manager_exists?).and_return(true)
|
||||
expect(authenticator.send(:client)).to receive(:call).with(:get_applications_user_list, message: { ub: {user_key: "31415926"} })
|
||||
allow(authenticator.send(:client)).to receive(:call).with(:get_applications_user_list, message: { ub: {user_key: "31415926"} })
|
||||
authenticator.auth
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user