|
1 | 1 | defmodule CodeCorpsWeb.TaskListViewTest do
|
2 | 2 | use CodeCorpsWeb.ViewCase
|
3 | 3 |
|
4 |
| - @tag :wip |
5 | 4 | test "renders all attributes and relationships properly" do
|
6 | 5 | project = insert(:project)
|
7 | 6 | task_list = insert(:task_list, order: 1000, project: project)
|
@@ -38,7 +37,48 @@ defmodule CodeCorpsWeb.TaskListViewTest do
|
38 | 37 | },
|
39 | 38 | type: "task-list",
|
40 | 39 | },
|
41 |
| - :included => [], |
| 40 | + :included => [ |
| 41 | + %{ |
| 42 | + attributes: %{ |
| 43 | + "approval-requested" => false, |
| 44 | + "approved" => project.approved, |
| 45 | + "cloudinary-public-id" => nil, |
| 46 | + "description" => project.description, |
| 47 | + "inserted-at" => project.inserted_at, |
| 48 | + "long-description-body" => project.long_description_body, |
| 49 | + "long-description-markdown" => project.long_description_markdown, |
| 50 | + "should-link-externally" => false, |
| 51 | + "slug" => project.slug, |
| 52 | + "title" => project.title, |
| 53 | + "total-monthly-donated" => 0, |
| 54 | + "updated-at" => project.updated_at, |
| 55 | + "website" => project.website |
| 56 | + }, |
| 57 | + id: project.id |> Integer.to_string, |
| 58 | + relationships: %{}, |
| 59 | + type: "project" |
| 60 | + }, |
| 61 | + %{ |
| 62 | + attributes: %{ |
| 63 | + "archived" => false, |
| 64 | + "body" => nil, |
| 65 | + "created-at" => task.created_at, |
| 66 | + "created-from" => task.created_from, |
| 67 | + "inserted-at" => task.inserted_at, |
| 68 | + "markdown" => "A test task", |
| 69 | + "modified-at" => task.modified_at, |
| 70 | + "modified-from" => task.modified_from, |
| 71 | + "number" => task.number, |
| 72 | + "order" => task.order, |
| 73 | + "status" => task.status, |
| 74 | + "title" => task.title, |
| 75 | + "updated-at" => task.updated_at |
| 76 | + }, |
| 77 | + id: task.id |> Integer.to_string, |
| 78 | + relationships: %{}, |
| 79 | + type: "task" |
| 80 | + } |
| 81 | + ], |
42 | 82 | :links => %{}
|
43 | 83 | }
|
44 | 84 |
|
|
0 commit comments