test: add tests for join request page
This commit is contained in:
parent
21812542ad
commit
eadf90b5fc
5 changed files with 173 additions and 4 deletions
|
|
@ -60,13 +60,18 @@ defmodule MvWeb.JoinConfirmControllerTest do
|
|||
end
|
||||
|
||||
@tag role: :unauthenticated
|
||||
test "expired token returns 200 with expired message", %{conn: conn} do
|
||||
test "expired token returns 200 with expired message and instructs to submit form again", %{
|
||||
conn: conn
|
||||
} do
|
||||
Application.put_env(:mv, :join_confirm_callback, JoinConfirmExpiredStub)
|
||||
|
||||
conn = get(conn, "/confirm_join/expired-token")
|
||||
body = response(conn, 200)
|
||||
|
||||
assert response(conn, 200) =~ "expired"
|
||||
assert response(conn, 200) =~ "submit"
|
||||
assert body =~ "expired"
|
||||
assert body =~ "submit"
|
||||
# Concept §2.5: clear message + "submit form again"
|
||||
assert body =~ "form" or body =~ "again"
|
||||
end
|
||||
|
||||
@tag role: :unauthenticated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue