1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00
chess/test/features/registration_test.exs
2018-02-02 10:31:04 -05:00

17 lines
470 B
Elixir

defmodule Chess.RegistrationTest do
use ChessWeb.FeatureCase
import Wallaby.Query, only: [text_field: 1, link: 1, button: 1]
test "user can register", %{session: session} do
session
|> visit("/")
|> click(link("Register"))
|> fill_in(text_field("Username"), with: "link@example.com")
|> fill_in(text_field("Password"), with: "ilovezelda")
|> click(button("Register"))
assert session |> has_text?("Registered successfully")
end
end