Sha256: de6322e0ca5b2aab2df9ddf552f43b53f8c3b4a3d3e06fa9fbac7c43ca87e82a

Contents?: true

Size: 862 Bytes

Versions: 8

Compression:

Stored size: 862 Bytes

Contents

require 'rails_helper'

describe 'Enviar email' do
  include ActiveJob::TestHelper

  subject do
    fill_in 'email_from_address', with: Faker::Internet.email
    fill_in 'email_from_name', with: Faker::Name.name
    fill_in 'email_reply_to', with: Faker::Internet.email
    fill_in 'email_body_input', with: Faker::Lorem.sentence
    fill_in 'email_subject', with: Faker::Lorem.sentence
    click_on 'Enviar'
    expect(page).to have_text 'revisá los campos obligatorios'
    fill_in 'email_to', with: Faker::Internet.email
    click_on 'Enviar'
  end

  around do |example|
    perform_enqueued_jobs do
      example.run
    end
  end

  before do
    driven_by ENV['DRIVER']&.to_sym || :selenium_chrome_headless_iphone
    login_as create(:user, :developer)
    visit '/a/emails/new'
  end

  it do
    subject
    expect(page).to have_text 'sent'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pg_rails-7.0.8.pre.alpha.106 pg_engine/spec/system/send_mail_spec.rb
pg_rails-7.0.8.pre.alpha.105 pg_engine/spec/system/send_mail_spec.rb
pg_rails-7.0.8.pre.alpha.104 pg_engine/spec/system/send_mail_spec.rb
pg_rails-7.0.8.pre.alpha.103 pg_engine/spec/system/send_mail_spec.rb
pg_rails-7.0.8.pre.alpha.102 pg_engine/spec/system/send_mail_spec.rb
pg_rails-7.0.8.pre.alpha.101 pg_engine/spec/system/send_mail_spec.rb
pg_rails-7.0.8.pre.alpha.100 pg_engine/spec/system/send_mail_spec.rb
pg_rails-7.0.8.pre.alpha.99 pg_engine/spec/system/send_mail_spec.rb