Sha256: 269e8747812bbf4a4b6b3ef7411656c178dcc36d475a385aaa9afb1579b3c896

Contents?: true

Size: 840 Bytes

Versions: 33

Compression:

Stored size: 840 Bytes

Contents

describe 'Confirming an email', type: :feature do
  let(:exhibit) { FactoryGirl.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

33 entries across 33 versions & 1 rubygems

Version Path
blacklight-spotlight-1.0.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-1.0.0.alpha2 spec/features/confirm_email_spec.rb
blacklight-spotlight-1.0.0.alpha1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.34.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.34.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.33.3 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.33.2 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.33.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.33.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.32.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.31.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.30.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.29.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.29.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.28.3 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.28.2 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.28.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.28.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.27.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.26.1 spec/features/confirm_email_spec.rb