Sha256: 5daa0427c691bca9a907cc9559cd00e2eb164a82a3478c3298024aece1ee9fb9
Contents?: true
Size: 1 KB
Versions: 34
Compression:
Stored size: 1 KB
Contents
require 'test_helper' module Workarea module Storefront class ContactFormIntegrationTest < Workarea::IntegrationTest def test_inquiry_creation Workarea.with_config do |config| config.email_to = 'test@workarea.com' post storefront.contact_path, params: { name: 'Ben Crouse', email: 'bcrouse@workarea.com', subject: 'orders', order_id: 'ORDER123', message: 'test message' } result = Inquiry.first assert_equal('Ben Crouse', result.name) assert_equal('bcrouse@workarea.com', result.email) assert(result.subject.present?) assert_equal('ORDER123', result.order_id) assert_equal('test message', result.message) last_email = ActionMailer::Base.deliveries.last assert_includes(last_email.subject, 'Orders') assert_includes(last_email.to, Workarea.config.email_to) end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems