Skip to content

Commit

Permalink
Updated tests [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed May 30, 2024
1 parent a512d0d commit a2c9497
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/click_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ def test_invalid_redirect_url
end
end

def test_secret_token_signature
def test_consistent_signature
get AhoyEmail::Engine.routes.url_helpers.click_path(c: "test", s: "1xjjEyEbkRSohoe0RpWUYAeDNthXDDNdaKFtCJp5lyg", t: "123", u: "https://example.org")
assert_redirected_to "https://example.org"
end

def test_legacy_secret_token_signature
get AhoyEmail::Engine.routes.url_helpers.click_path(c: "test", s: "ncBvGv-Q804GPmVf1JzHm767cx4CmGLrc1mwR0KFnLY", t: "123", u: "https://example.org")
assert_redirected_to "https://example.org"
end

def test_legacy_secret_token_bad_signature
def test_bad_signature_direct
get AhoyEmail::Engine.routes.url_helpers.click_path(c: "test", s: "bad", t: "123", u: "https://example.org")
assert_response :not_found
assert_equal "Link expired", response.body
end

def test_legacy_secret_token_signature
get AhoyEmail::Engine.routes.url_helpers.click_path(c: "test", s: "ncBvGv-Q804GPmVf1JzHm767cx4CmGLrc1mwR0KFnLY", t: "123", u: "https://example.org")
assert_redirected_to "https://example.org"
end

def test_legacy_route_signature
get AhoyEmail::Engine.routes.url_helpers.click_message_path("123", signature: "d77812b6f1406cff37c4ee6fcfc744b986281c5c", url: "https://example.org")
assert_redirected_to "https://example.org"
Expand Down

0 comments on commit a2c9497

Please sign in to comment.