Sha256: 51174d6bfdcddb2ffa6c53f2b18db971734a235e2ec078732cf33dccb5e5ad4e
Contents?: true
Size: 820 Bytes
Versions: 39
Compression:
Stored size: 820 Bytes
Contents
class Ey::Core::Client class Real def create_password_reset(params) request( :method => :post, :path => "/password-resets", :body => { :password_reset => params } ) end end # Real class Mock def create_password_reset(_params) params = Cistern::Hash.stringify_keys(_params) unless self.data[:users].map{ |_, user| user["email"] }.include?(params["email"]) response( :body => { :errors => ["Could not find User with email \"#{params["email"]}\""] }, :status => 404 ) end response( :body => { "password_reset" => { "sent" => true }, }, :status => 201, ) end end # Mock end # Ey::Core::Client
Version data entries
39 entries across 39 versions & 2 rubygems