-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests for newer mailpit where <> are disallowed in emails.
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 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 |
---|---|---|
|
@@ -292,7 +292,7 @@ def test_html_escaping | |
response = Typhoeus.post("https://127.0.0.1:9081/api-umbrella/v1/users.json", http_options.deep_merge(non_admin_key_creator_api_key).deep_merge({ | ||
:headers => { "Content-Type" => "application/x-www-form-urlencoded" }, | ||
:body => { | ||
:user => FactoryBot.attributes_for(:api_user, :email => "foo<script>&[email protected]", :first_name => "Test&First", :last_name => "Test&Last"), | ||
:user => FactoryBot.attributes_for(:api_user, :email => "foo&[email protected]", :first_name => "Test&First", :last_name => "Test&Last"), | ||
:options => { :send_welcome_email => true }, | ||
}, | ||
})) | ||
|
@@ -309,12 +309,12 @@ def test_html_escaping | |
assert_match("Hi,</p>", message.fetch("HTML")) | ||
assert_match("Hi,", message.fetch("Text")) | ||
|
||
assert_match("Your API key for <strong>foo<script>&[email protected]</strong> is:</p>", message.fetch("HTML")) | ||
assert_match("Your API key for foo<script>&[email protected] is:", message.fetch("Text")) | ||
assert_match("Your API key for <strong>foo&[email protected]</strong> is:</p>", message.fetch("HTML")) | ||
assert_match("Your API key for foo&[email protected] is:", message.fetch("Text")) | ||
|
||
# Support footer | ||
assert_match("Account Email: foo<script>&[email protected]", message.fetch("HTML")) | ||
assert_match("Account Email: foo<script>&[email protected]", message.fetch("Text")) | ||
assert_match("Account Email: foo&[email protected]", message.fetch("HTML")) | ||
assert_match("Account Email: foo&[email protected]", message.fetch("Text")) | ||
|
||
assert_match("Account ID: #{user.id}", message.fetch("HTML")) | ||
assert_match("Account ID: #{user.id}", message.fetch("Text")) | ||
|