projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change `Repo.get(User, id)` => `User.get_by_id(id)`
[akkoma]
/
test
/
web
/
ostatus
/
user_representer_test.exs
diff --git
a/test/web/ostatus/user_representer_test.exs
b/test/web/ostatus/user_representer_test.exs
index a4afc2cf78efbb0badb543f2bb249167fac4c165..e3863d2e9ca1d087bd39be70111d173c2617a4a5 100644
(file)
--- a/
test/web/ostatus/user_representer_test.exs
+++ b/
test/web/ostatus/user_representer_test.exs
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.OStatus.UserRepresenterTest do
use Pleroma.DataCase
alias Pleroma.Web.OStatus.UserRepresenter
defmodule Pleroma.Web.OStatus.UserRepresenterTest do
use Pleroma.DataCase
alias Pleroma.Web.OStatus.UserRepresenter
@@
-6,7
+10,7
@@
defmodule Pleroma.Web.OStatus.UserRepresenterTest do
alias Pleroma.User
test "returns a user with id, uri, name and link" do
alias Pleroma.User
test "returns a user with id, uri, name and link" do
- user =
build(:user, nickname: "レイン"
)
+ user =
insert(:user, %{nickname: "レイン"}
)
tuple = UserRepresenter.to_simple_form(user)
res = :xmerl.export_simple_content(tuple, :xmerl_xml) |> to_string
tuple = UserRepresenter.to_simple_form(user)
res = :xmerl.export_simple_content(tuple, :xmerl_xml) |> to_string
@@
-18,8
+22,11
@@
defmodule Pleroma.Web.OStatus.UserRepresenterTest do
<poco:preferredUsername>#{user.nickname}</poco:preferredUsername>
<poco:displayName>#{user.name}</poco:displayName>
<poco:note>#{user.bio}</poco:note>
<poco:preferredUsername>#{user.nickname}</poco:preferredUsername>
<poco:displayName>#{user.name}</poco:displayName>
<poco:note>#{user.bio}</poco:note>
+ <summary>#{user.bio}</summary>
<name>#{user.nickname}</name>
<link rel="avatar" href="#{User.avatar_url(user)}" />
<name>#{user.nickname}</name>
<link rel="avatar" href="#{User.avatar_url(user)}" />
+ <link rel="header" href="#{User.banner_url(user)}" />
+ <ap_enabled>true</ap_enabled>
"""
assert clean(res) == clean(expected)
"""
assert clean(res) == clean(expected)