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.0.8.pre.alpha.33 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.32 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.31 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.30 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.29 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.28 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.27 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.26 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.25 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.24 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.23 pg_engine/spec/controllers/users/confirmations_controller_spec.rb
pg_rails-7.0.8.pre.alpha.22 pg_engine/spec/controllers/users/confirmations_controller_spec.rb