Sha256: 4113cb4b5de3d4e439f8abde5bbc41fbc09524acafcc1c007e0557e6eb9de261

Contents?: true

Size: 520 Bytes

Versions: 12

Compression:

Stored size: 520 Bytes

Contents

require "spec_helper"

describe "Password maintenance" do
  context "when updating the password" do
    it "signs the user in and redirects" do
      user = create(:user, :with_forgotten_password)

      put user_password_url(user), params: {
        user_id: user,
        token: user.confirmation_token,
        password_reset: { password: "my_new_password" },
      }

      expect(response).to redirect_to(Clearance.configuration.redirect_url)
      expect(cookies["remember_token"]).to be_present
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
clearance-2.5.0 spec/requests/password_maintenance_spec.rb
clearance-2.4.0 spec/requests/password_maintenance_spec.rb
clearance-2.3.1 spec/requests/password_maintenance_spec.rb
clearance-2.3.0 spec/requests/password_maintenance_spec.rb
clearance-2.2.1 spec/requests/password_maintenance_spec.rb
clearance-2.2.0 spec/requests/password_maintenance_spec.rb
clearance-2.1.0 spec/requests/password_maintenance_spec.rb
clearance-2.0.0 spec/requests/password_maintenance_spec.rb
clearance-2.0.0.beta2 spec/requests/password_maintenance_spec.rb
clearance-2.0.0.beta1 spec/requests/password_maintenance_spec.rb
clearance-1.17.0 spec/requests/password_maintenance_spec.rb
clearance-1.16.2 spec/requests/password_maintenance_spec.rb