Skip to content

Commit

Permalink
Add rspec test for request reason email
Browse files Browse the repository at this point in the history
  • Loading branch information
perryzjc committed Feb 21, 2024
1 parent 725ae84 commit f99087d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/mailers/teacher_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,17 @@
expect(email.to[0]).to eq("[email protected]")
expect(email.body.encoded).to include("Short Long")
end

it "Sends Request Info Email" do
teacher = teachers(:long)
email = TeacherMailer.request_info_email(teacher, "Request Reason")
email.deliver_now
expect(email.from[0]).to eq("[email protected]")
expect(email.to[0]).to eq("[email protected]")
expect(email.subject).to eq("Request Info Email")
# Test appearance of first_name
expect(email.body.encoded).to include("Short")
expect(email.body.encoded).to include("Request Reason")
expect(email.body.encoded).to include("We're writing to you regarding your ongoing application with BJC.")
end
end

0 comments on commit f99087d

Please sign in to comment.