Skip to content

Commit 91cc781

Browse files
committed
Added some mail specs
1 parent c9cda91 commit 91cc781

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

spec/fabricators/message_fabricator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
email(count: 1) {"proof@example.com" }
33
subject:"Hackety-hack email"
44
body:"This is an email from hackety-hack.com"
5-
end
5+
end
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
require "spec_helper"
22

33
describe MessageMailer do
4-
let(:message) { MessageMailer.new_message(Fabricate(:message), Array("proof@example.com"))}
4+
let(:message) { MessageMailer.new_message(Fabricate(:message), Array("proof@example.com"))}
55

66
it "is from Steve" do
77
message.from.should eq(["steve@hackety.com"])
88
end
9+
10+
it "Correct subject" do
11+
message.subject.should eq("Hackety-hack email")
12+
end
13+
14+
it "Correct receiver email" do
15+
message.to.should eq(["proof@example.com"])
16+
end
17+
18+
it "Correct body" do
19+
message.body.encoded.should match("This is an email from hackety-hack.com")
20+
end
921
end

0 commit comments

Comments
 (0)