Sha256: c673f58fa9c53d8fde8fc4a2f76173e36751de4eb9d67c46297daee321372288

Contents?: true

Size: 863 Bytes

Versions: 22

Compression:

Stored size: 863 Bytes

Contents

require 'spec_helper'

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

22 entries across 22 versions & 1 rubygems

Version Path
blacklight-spotlight-0.18.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.17.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.17.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.16.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.15.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.14.2 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.14.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.14.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.13.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.12.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.12.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.11.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.10.3 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.10.2 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.10.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.10.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.9.2 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.9.1 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.9.0 spec/features/confirm_email_spec.rb
blacklight-spotlight-0.8.2 spec/features/confirm_email_spec.rb