1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-11 09:32:51 +00:00

figuring out testing - works pretty good so far

This commit is contained in:
2018-01-04 23:04:39 -06:00
parent f540e7351b
commit 006a7e1fc2
7 changed files with 138 additions and 7 deletions

View File

@@ -0,0 +1,14 @@
defmodule MyAppWeb.UserControllerTest do
use MyAppWeb.ConnCase, async: true
test "get user index should return unauthorized" do
conn =
build_conn()
|> get("/api/user")
body = conn |> response(401) |> Poison.decode!
assert body["error"]["message"] == "unauthorized"
end
end