Sha256: 70b88265c8df9008aa3eb9613eddb3e5992785d15f42b0331129ec4a9af7cf70

Contents?: true

Size: 678 Bytes

Versions: 3

Compression:

Stored size: 678 Bytes

Contents

require 'spec_helper'

describe "reset_password" do
  context "with an HMAC client" do
    let!(:client) { create_client }

    it "should create a password reset request" do
      email = create_user.email

      password_reset = client.create_password_reset(email: email, redirect_uri: "http://example.com").body["password_reset"]

      expect(password_reset).to eq("sent" => true)
    end

    it "should reset a users password", :mock_only do
      password_reset = client.reset_password(reset_token: SecureRandom.hex(6), password: SecureRandom.hex(6)).body["password_reset"]

      expect(password_reset).to eq("accepted" => true)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ey-core-3.6.6 spec/reset_password_spec.rb
ey-core-3.4.5 spec/reset_password_spec.rb
ey-core-3.6.5 spec/reset_password_spec.rb