This repository was archived by the owner on Feb 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgroup_controller_test.exs
More file actions
66 lines (55 loc) · 2.48 KB
/
group_controller_test.exs
File metadata and controls
66 lines (55 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# defmodule Org.Admin.GroupControllerTest do
# use Org.ConnCase
# alias Org.Group
# @valid_attrs %{description: "some content", title: "some content", url: "some content"}
# @invalid_attrs %{}
# test "lists all entries on index", %{conn: conn} do
# conn = get conn, group_path(conn, :index)
# assert html_response(conn, 200) =~ "Listing groups"
# end
# test "renders form for new resources", %{conn: conn} do
# conn = get conn, group_path(conn, :new)
# assert html_response(conn, 200) =~ "New group"
# end
# test "creates resource and redirects when data is valid", %{conn: conn} do
# conn = post conn, group_path(conn, :create), group: @valid_attrs
# assert redirected_to(conn) == group_path(conn, :index)
# assert Repo.get_by(Group, @valid_attrs)
# end
# test "does not create resource and renders errors when data is invalid", %{conn: conn} do
# conn = post conn, group_path(conn, :create), group: @invalid_attrs
# assert html_response(conn, 200) =~ "New group"
# end
# test "shows chosen resource", %{conn: conn} do
# group = Repo.insert! %Group{}
# conn = get conn, group_path(conn, :show, group)
# assert html_response(conn, 200) =~ "Show group"
# end
# test "renders page not found when id is nonexistent", %{conn: conn} do
# assert_error_sent 404, fn ->
# get conn, group_path(conn, :show, "11111111-1111-1111-1111-111111111111")
# end
# end
# test "renders form for editing chosen resource", %{conn: conn} do
# group = Repo.insert! %Group{}
# conn = get conn, group_path(conn, :edit, group)
# assert html_response(conn, 200) =~ "Edit group"
# end
# test "updates chosen resource and redirects when data is valid", %{conn: conn} do
# group = Repo.insert! %Group{}
# conn = put conn, group_path(conn, :update, group), group: @valid_attrs
# assert redirected_to(conn) == group_path(conn, :show, group)
# assert Repo.get_by(Group, @valid_attrs)
# end
# test "does not update chosen resource and renders errors when data is invalid", %{conn: conn} do
# group = Repo.insert! %Group{}
# conn = put conn, group_path(conn, :update, group), group: @invalid_attrs
# assert html_response(conn, 200) =~ "Edit group"
# end
# test "deletes chosen resource", %{conn: conn} do
# group = Repo.insert! %Group{}
# conn = delete conn, group_path(conn, :delete, group)
# assert redirected_to(conn) == group_path(conn, :index)
# refute Repo.get(Group, group.id)
# end
# end