class Authenticator::Client::Mock

Attributes

params[R]

Public Class Methods

new(params) click to toggle source
# File lib/authenticator/client/mock.rb, line 9
def initialize(params)
  @params = params
end

Public Instance Methods

authenticate(_account) click to toggle source
# File lib/authenticator/client/mock.rb, line 13
def authenticate(_account)
  mock_response
end

Protected Instance Methods

mock_response() click to toggle source
# File lib/authenticator/client/mock.rb, line 19
def mock_response
  response_object = MockResponse.new(
    body: params.merge({ authenticated: true }).to_json,
    code: 200
  )
  AuthenticateResponse.new(response_object)
end