Sha256: 849f916cca43c5756972dcd6ef323f61dabfeeeb0da8f7534d85a82a35351c34

Contents?: true

Size: 575 Bytes

Versions: 9

Compression:

Stored size: 575 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(response).to have_http_status(:see_other)
      expect(cookies["remember_token"]).to be_present
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
clearance-2.9.2 spec/requests/password_maintenance_spec.rb
clearance-2.9.1 spec/requests/password_maintenance_spec.rb
clearance-2.9.0 spec/requests/password_maintenance_spec.rb
clearance-2.8.0 spec/requests/password_maintenance_spec.rb
clearance-2.7.2 spec/requests/password_maintenance_spec.rb
clearance-2.7.0 spec/requests/password_maintenance_spec.rb
clearance-2.6.2 spec/requests/password_maintenance_spec.rb
clearance-2.6.1 spec/requests/password_maintenance_spec.rb
clearance-2.6.0 spec/requests/password_maintenance_spec.rb