Sha256: 9d1106808294ba618481a97b3c0aef7948f6ad872d65ae5d1cb8a7820537229c

Contents?: true

Size: 839 Bytes

Versions: 24

Compression:

Stored size: 839 Bytes

Contents

describe 'Confirming an email', type: :feature do
  let(:exhibit) { FactoryBot.create(:exhibit) }
  let(:contact_email) { Spotlight::ContactEmail.create!(email: 'justin@example.com', exhibit: exhibit) }
  let(:raw_token) { contact_email.instance_variable_get(:@raw_confirmation_token) }

  it 'resends confirmation instructions' do
    visit spotlight.new_contact_email_confirmation_url(confirmation_token: contact_email.confirmation_token)
    expect(page).to have_content('Resend confirmation instructions')
    within '#new_contact_email' do
      fill_in 'Email', with: contact_email.email
      click_button 'Resend confirmation instructions'
    end
  end

  it 'confirms email' do
    visit spotlight.contact_email_confirmation_url(confirmation_token: raw_token)
    expect(page).to have_content('successfully confirmed')
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.4.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.3.3 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.3.2 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.3.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.3.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.2.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.2.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.1.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.2 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.0.rc6 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.0.rc5 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.0.rc4 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.0.rc3 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.0.rc2 spec/features/confirm_email_spec.rb
blacklight-spotlight-2.0.0.rc1 spec/features/confirm_email_spec.rb
blacklight-spotlight-1.5.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-1.4.1 spec/features/confirm_email_spec.rb