Skip to content

Commit

Permalink
Update missing email address smoke test status
Browse files Browse the repository at this point in the history
Locally, /subscribe/ returns a 403 Forbidden, but in prod, it returns a
303 See Other, since the user could've sent an empty request.
  • Loading branch information
mbland committed Mar 28, 2023
1 parent a2ce001 commit 39429ee
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/smoke-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ expect_status_from_endpoint \
'verify/mbland%40acm.org/00000000-1111-2222-3333-444444444444'

printf_info "SUITE: Not found (403 locally, 404 in prod)\n"

not_found_status=404
if [[ -n "$LOCAL" ]]; then
not_found_status=403
Expand All @@ -102,9 +103,15 @@ expect_status_from_endpoint \

printf_info "%s\n" \
"SUITE: Redirect if missing or invalid email address for /subscribe"

missing_address_status=303
if [[ -n "$LOCAL" ]]; then
missing_address_status=403
fi

expect_status_from_endpoint \
"missing email address" \
303 POST \
"missing email address (403 locally, 303 in prod)" \
"$missing_address_status" POST \
'subscribe/'
expect_status_from_endpoint \
"invalid email address" \
Expand Down

0 comments on commit 39429ee

Please sign in to comment.