Commit 0d2a1ead authored by Karen Konou's avatar Karen Konou
Browse files

add a get user test

parent e2c1d464
...@@ -251,6 +251,7 @@ defmodule MoodleNetWeb.GraphQL.UserSchemaTest do ...@@ -251,6 +251,7 @@ defmodule MoodleNetWeb.GraphQL.UserSchemaTest do
name name
summary summary
location location
website
icon icon
primaryLanguage primaryLanguage
} }
...@@ -270,6 +271,7 @@ defmodule MoodleNetWeb.GraphQL.UserSchemaTest do ...@@ -270,6 +271,7 @@ defmodule MoodleNetWeb.GraphQL.UserSchemaTest do
assert user["name"] == actor.name["und"] assert user["name"] == actor.name["und"]
assert user["summary"] == actor.summary["und"] assert user["summary"] == actor.summary["und"]
assert user["location"] == get_in(actor, [:location, Access.at(0), :content, "und"]) assert user["location"] == get_in(actor, [:location, Access.at(0), :content, "und"])
assert user["website"] == get_in(actor, [:attachment, Access.at(0), "value"])
assert user["icon"] == get_in(actor, [:icon, Access.at(0), :url, Access.at(0)]) assert user["icon"] == get_in(actor, [:icon, Access.at(0), :url, Access.at(0)])
assert user["primaryLanguage"] == actor["primary_language"] assert user["primaryLanguage"] == actor["primary_language"]
end end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment