akkoma/test/web/ostatus/user_representer_test.exs

18 lines
441 B
Elixir
Raw Normal View History

2017-04-17 12:12:36 +00:00
defmodule Pleroma.Web.OStatus.UserRepresenterTest do
use Pleroma.DataCase
alias Pleroma.Web.OStatus.UserRepresenter
import Pleroma.Factory
test "returns a user with id, uri, name and link" do
user = build(:user)
tuple = UserRepresenter.to_tuple(user)
{:author, author} = tuple
[:id, :uri, :name, :link]
|> Enum.each(fn (tag) ->
assert Enum.find(author, fn(e) -> tag == elem(e, 0) end)
end)
end
end