Sha256: 3be83d6e0e6abd09aac98f011d8406363974f95af08bab0e69ee871d96b66749

Contents?: true

Size: 870 Bytes

Versions: 40

Compression:

Stored size: 870 Bytes

Contents

# frozen_string_literal: true

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

40 entries across 40 versions & 1 rubygems

Version Path
blacklight-spotlight-3.4.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.3.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.2.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.1.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.3 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.2 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.rc6 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.rc5 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.rc4 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.rc3 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.rc2 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.rc1 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.alpha.10 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.alpha.9 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.alpha.8 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.alpha.7 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.alpha.6 spec/features/confirm_email_spec.rb
blacklight-spotlight-3.0.0.alpha.5 spec/features/confirm_email_spec.rb