Sha256: 7c353172f1e064a2b2a06b9c6a7d7889f60288d18bfa2d9fc041f9a87c3680eb

Contents?: true

Size: 525 Bytes

Versions: 9

Compression:

Stored size: 525 Bytes

Contents

require 'spec_helper'

describe "Mailer", type: :request do
  before :each do
    @user = User.create name: 'Elmer', last_name: 'Fudd', address: '1234 Somewhere, Over NY 11111', email: 'elmer@fudd.com'
  end

  it "attaches an xlsx file" do
    visit "/users/#{@user.id}/send_instructions"
    last_email = ActionMailer::Base.deliveries.last
    expect(last_email.to).to eq([@user.email])
    expect(last_email.attachments.first).to be
    expect(last_email.attachments.first.content_type).to match(/#{mime_type}/)
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/axlsx_mailer_spec.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/axlsx_mailer_spec.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/caxlsx_rails-0.6.3/spec/axlsx_mailer_spec.rb
caxlsx_rails-0.6.3 spec/axlsx_mailer_spec.rb
caxlsx_rails-0.6.2 spec/axlsx_mailer_spec.rb
axlsx_rails-0.6.1 spec/axlsx_mailer_spec.rb
axlsx_rails-0.6.0 spec/axlsx_mailer_spec.rb
axlsx_rails-0.5.2 spec/axlsx_mailer_spec.rb
axlsx_rails-0.5.1 spec/axlsx_mailer_spec.rb