From 5a417a1931fcbd7f52f78a041ef22b3c70aa0aed Mon Sep 17 00:00:00 2001 From: osc-bot <78549874+osc-bot@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:08:11 -0400 Subject: [PATCH] lint a random file (#3098) --- .../mailers/support_ticket_mailer_test.rb | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/apps/dashboard/test/mailers/support_ticket_mailer_test.rb b/apps/dashboard/test/mailers/support_ticket_mailer_test.rb index 17cb3f1b4b..2ac36efccb 100644 --- a/apps/dashboard/test/mailers/support_ticket_mailer_test.rb +++ b/apps/dashboard/test/mailers/support_ticket_mailer_test.rb @@ -1,23 +1,24 @@ -require "test_helper" +# frozen_string_literal: true -class SupportTicketMailerTest < ActionMailer::TestCase +require 'test_helper' +class SupportTicketMailerTest < ActionMailer::TestCase def setup @support_ticket = SupportTicket.from_config({}) @support_ticket.attributes = { - email: "user_email@example.com", - cc: "cc@example.com", - subject: "email subject", + email: 'user_email@example.com', + cc: 'cc@example.com', + subject: 'email subject' } @context = OpenStruct.new({ - support_ticket: @support_ticket, - }) + support_ticket: @support_ticket + }) end test 'generates email with all expected fields' do support_ticket_config = { email: { - to: "to_address@support.ticket.com", + to: 'to_address@support.ticket.com' } } email = SupportTicketMailer.support_email(support_ticket_config, @context) @@ -26,19 +27,19 @@ def setup email.deliver_now end - assert_equal ["user_email@example.com"], email.from - assert_equal ["to_address@support.ticket.com"], email.to - assert_equal ["user_email@example.com"], email.reply_to - assert_equal ["cc@example.com"], email.cc - assert_equal "email subject", email.subject + assert_equal ['user_email@example.com'], email.from + assert_equal ['to_address@support.ticket.com'], email.to + assert_equal ['user_email@example.com'], email.reply_to + assert_equal ['cc@example.com'], email.cc + assert_equal 'email subject', email.subject assert_match 'Support ticket submitted from the dashboard application', email.body.encoded end test 'from address can be overridden with configuration' do support_ticket_config = { email: { - from: "override@example.com", - to: "to_address@support.ticket.com", + from: 'override@example.com', + to: 'to_address@support.ticket.com' } } email = SupportTicketMailer.support_email(support_ticket_config, @context) @@ -47,7 +48,6 @@ def setup email.deliver_now end - assert_equal ["override@example.com"], email.from + assert_equal ['override@example.com'], email.from end - -end \ No newline at end of file +end