I am working on a ruby ββon rails project where I am trying to check the header field 'from', but the test case does not work.
Here's what I install in action mailer
def some_actoin mail(to: xyz@example.com , from: '"Example" < service@example.com >', subject: "test subject") end end
And in the test case rspec
mail.from.should == '"Example" < service@example.com >'
In my test case, the error with the following error
expected: '"Example" < service@example.com >' got: [ service@example.com ] (using ==)
Is the wrong way to check header header with the email address with the title?
I appreciate any help!
source share