-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fall back on contact email if billing email is absent
Affects e-invoice and invoice delivery form. Fixes #1255
- Loading branch information
Showing
2 changed files
with
17 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
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 |
---|---|---|
|
@@ -63,6 +63,18 @@ def test_billing_email_format_validation | |
assert registrar.valid? | ||
end | ||
|
||
def test_returns_billing_email_when_provided | ||
billing_email = '[email protected]' | ||
registrar = Registrar.new(billing_email: billing_email) | ||
assert_equal billing_email, registrar.billing_email | ||
end | ||
|
||
def test_billing_email_fallback | ||
contact_email = '[email protected]' | ||
registrar = Registrar.new(contact_email: contact_email, billing_email: '') | ||
assert_equal contact_email, registrar.billing_email | ||
end | ||
|
||
def test_invalid_without_language | ||
registrar = valid_registrar | ||
registrar.language = '' | ||
|