Skip to content

Commit f2b8ffd

Browse files
committed
clean up receipt_email, add test for non-nil name
1 parent f5d26b5 commit f2b8ffd

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

test/lib/code_corps/emails/base_email_test.exs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ defmodule CodeCorps.Emails.BaseEmailTest do
33
use Bamboo.Test
44
alias CodeCorps.Emails.BaseEmail
55

6-
test "get name returns there on nil name" do
6+
test "get_name returns there on nil name" do
77
user = %CodeCorps.User{}
88
assert BaseEmail.get_name(user) == "there"
99
end
10+
11+
test "get_name returns first_name of user" do
12+
f_name = "Zacck"
13+
user = %CodeCorps.User{first_name: f_name}
14+
assert BaseEmail.get_name(user) == f_name
15+
end
1016
end

test/lib/code_corps/emails/receipt_email_test.exs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ defmodule CodeCorps.Emails.ReceiptEmailTest do
44

55
alias CodeCorps.Emails.ReceiptEmail
66

7-
8-
97
test "receipt email works" do
108
invoice_fixture = CodeCorps.StripeTesting.Helpers.load_fixture("invoice")
119

0 commit comments

Comments
 (0)