This commit is contained in:
Maxim Filippov 2019-01-19 04:26:52 +03:00
parent 651a1d64b5
commit 0a97badddd
2 changed files with 5 additions and 3 deletions

View file

@ -121,7 +121,8 @@ test "contains mentions" do
actor = Repo.get_by(User, ap_id: activity.actor) actor = Repo.get_by(User, ap_id: activity.actor)
assert status.mentions == Enum.map([user, actor], fn u -> AccountView.render("mention.json", %{user: u}) end) assert status.mentions ==
Enum.map([user, actor], fn u -> AccountView.render("mention.json", %{user: u}) end)
end end
test "attachments" do test "attachments" do

View file

@ -118,7 +118,8 @@ test "a create activity with a note" do
expected = %{ expected = %{
"activity_type" => "post", "activity_type" => "post",
"attachments" => [], "attachments" => [],
"attentions" => Enum.map([other_user, user], fn u -> UserView.render("show.json", %{user: u}) end), "attentions" =>
Enum.map([other_user, user], fn u -> UserView.render("show.json", %{user: u}) end),
"created_at" => activity.data["object"]["published"] |> Utils.date_to_asctime(), "created_at" => activity.data["object"]["published"] |> Utils.date_to_asctime(),
"external_url" => activity.data["object"]["id"], "external_url" => activity.data["object"]["id"],
"fave_num" => 0, "fave_num" => 0,