forked from beautyjoy/BJC-Teacher-Tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added test with barney the purple dinosaur
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,3 +96,16 @@ reimu: | |
school: berkeley | ||
application_status: Info Needed | ||
education_level: -1 | ||
|
||
barney: | ||
id: 6 | ||
first_name: Barney | ||
last_name: Dinosaur | ||
snap: barney | ||
email: '[email protected]' | ||
personal_email: '[email protected]' | ||
status: 1 | ||
more_info: '' | ||
application_status: Denied | ||
school: berkeley | ||
education_level: -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,17 @@ | |
expect(email.body.encoded).to include("Hi Bob") | ||
end | ||
|
||
it "Sends to Both School and Personal Email When Possible" do | ||
teacher = teachers(:barney) | ||
email = TeacherMailer.welcome_email(teacher) | ||
email.deliver_now | ||
expect(email.from[0]).to eq("[email protected]") | ||
expect(email.to[0]).to eq("[email protected]") | ||
expect(email.to[1]).to eq("[email protected]") | ||
expect(email.subject).to eq("Welcome to The Beauty and Joy of Computing!") | ||
expect(email.body.encoded).to include("Hi Barney") | ||
end | ||
|
||
|
||
it "Sends Deny Email" do | ||
teacher = teachers(:long) | ||
|