Sha256: 1e8e6446934c051b106641af9fa25126e3449d368d0b84c1649818a8e2cf5c90

Contents?: true

Size: 730 Bytes

Versions: 152

Compression:

Stored size: 730 Bytes

Contents

require 'rails_helper'

describe Users::ConfirmationsController do
  render_views

  before do
    @request.env['devise.mapping'] = Devise.mappings[:user] # rubocop:disable RSpec/InstanceVariable
  end

  describe '#show sin el token' do
    subject { get :show }

    it do
      subject
      expect(response).to have_http_status(:ok)
    end
  end

  describe '#show con el token' do
    subject { get :show, params: { confirmation_token: 'bla' } }

    let(:user) { create :user, confirmed_at: nil, confirmation_token: 'bla' }

    it do
      subject
      expect(response).to have_http_status(:ok)
    end

    it do
      expect { subject }.to change { user.reload.confirmed_at }.from(nil).to(be_present)
    end
  end
end

Version data entries

152 entries across 152 versions & 1 rubygems

Version Path
pg_rails-7.6.28 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.27 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.26 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.25 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.24 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.24.pre.5 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.24.pre.4 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.24.pre.3 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.23 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.22 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.22.pre.3 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.22.pre.2 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.22.pre.1 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.21 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.21.pre.11 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.21.pre.10 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.21.pre.9 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.21.pre.8 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.21.pre.7 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.6.21.pre.6 pg_engine/spec/controllers/users/confirmations_controller_spec.rb