projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Validate alias IDs
[akkoma]
/
test
/
web
/
feed
/
tag_controller_test.exs
diff --git
a/test/web/feed/tag_controller_test.exs
b/test/web/feed/tag_controller_test.exs
index d726300a9cf6d83e0446aade5120b481bf915576..3c29cd94fadd501cfb4c8ffdaade5909f7229e3c 100644
(file)
--- a/
test/web/feed/tag_controller_test.exs
+++ b/
test/web/feed/tag_controller_test.exs
@@
-21,7
+21,7
@@
defmodule Pleroma.Web.Feed.TagControllerTest do
)
user = insert(:user)
)
user = insert(:user)
- {:ok, activity1} = CommonAPI.post(user, %{
"status" =>
"yeah #PleromaArt"})
+ {:ok, activity1} = CommonAPI.post(user, %{
status:
"yeah #PleromaArt"})
object = Object.normalize(activity1)
object = Object.normalize(activity1)
@@
-43,9
+43,9
@@
defmodule Pleroma.Web.Feed.TagControllerTest do
|> Ecto.Changeset.change(data: object_data)
|> Pleroma.Repo.update()
|> Ecto.Changeset.change(data: object_data)
|> Pleroma.Repo.update()
- {:ok, activity2} = CommonAPI.post(user, %{
"status" =>
"42 This is :moominmamma #PleromaArt"})
+ {:ok, activity2} = CommonAPI.post(user, %{
status:
"42 This is :moominmamma #PleromaArt"})
- {:ok, _activity3} = CommonAPI.post(user, %{
"status" =>
"This is :moominmamma"})
+ {:ok, _activity3} = CommonAPI.post(user, %{
status:
"This is :moominmamma"})
response =
conn
response =
conn
@@
-82,17
+82,13
@@
defmodule Pleroma.Web.Feed.TagControllerTest do
end
test "gets a feed (RSS)", %{conn: conn} do
end
test "gets a feed (RSS)", %{conn: conn} do
- %{microsecond: {micro, _}} = DateTime.utc_now()
- micro = (micro / 1000) |> floor()
- Process.sleep(950 - micro)
-
Pleroma.Config.put(
[:feed, :post_title],
%{max_length: 25, omission: "..."}
)
user = insert(:user)
Pleroma.Config.put(
[:feed, :post_title],
%{max_length: 25, omission: "..."}
)
user = insert(:user)
- {:ok, activity1} = CommonAPI.post(user, %{
"status" =>
"yeah #PleromaArt"})
+ {:ok, activity1} = CommonAPI.post(user, %{
status:
"yeah #PleromaArt"})
object = Object.normalize(activity1)
object = Object.normalize(activity1)
@@
-114,9
+110,9
@@
defmodule Pleroma.Web.Feed.TagControllerTest do
|> Ecto.Changeset.change(data: object_data)
|> Pleroma.Repo.update()
|> Ecto.Changeset.change(data: object_data)
|> Pleroma.Repo.update()
- {:ok, activity2} = CommonAPI.post(user, %{
"status" =>
"42 This is :moominmamma #PleromaArt"})
+ {:ok, activity2} = CommonAPI.post(user, %{
status:
"42 This is :moominmamma #PleromaArt"})
- {:ok, _activity3} = CommonAPI.post(user, %{
"status" =>
"This is :moominmamma"})
+ {:ok, _activity3} = CommonAPI.post(user, %{
status:
"This is :moominmamma"})
response =
conn
response =
conn
@@
-142,8
+138,8
@@
defmodule Pleroma.Web.Feed.TagControllerTest do
]
assert xpath(xml, ~x"//channel/item/pubDate/text()"sl) == [
]
assert xpath(xml, ~x"//channel/item/pubDate/text()"sl) == [
- FeedView.pub_date(activity
1
.data["published"]),
- FeedView.pub_date(activity
2
.data["published"])
+ FeedView.pub_date(activity
2
.data["published"]),
+ FeedView.pub_date(activity
1
.data["published"])
]
assert xpath(xml, ~x"//channel/item/enclosure/@url"sl) == [
]
assert xpath(xml, ~x"//channel/item/enclosure/@url"sl) == [