-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 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 |
---|---|---|
|
@@ -46,6 +46,17 @@ def test_invalid_redirect_url | |
end | ||
end | ||
|
||
def test_legacy_signature | ||
get AhoyEmail::Engine.routes.url_helpers.click_message_path("123", signature: "d77812b6f1406cff37c4ee6fcfc744b986281c5c", url: "https://example.org") | ||
assert_redirected_to "https://example.org" | ||
end | ||
|
||
def test_legacy_bad_signature | ||
get AhoyEmail::Engine.routes.url_helpers.click_message_path("123", signature: "bad", url: "https://example.org") | ||
assert_response :not_found | ||
assert_equal "Link expired", response.body | ||
end | ||
|
||
def test_mailto | ||
message = ClickMailer.mailto.deliver_now | ||
assert_body '<a href="mailto:[email protected]">', message | ||
|
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