projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TwitterAPI user view: add screen_name_html and description_html.
[akkoma]
/
test
/
web
/
twitter_api
/
views
/
user_view_test.exs
diff --git
a/test/web/twitter_api/views/user_view_test.exs
b/test/web/twitter_api/views/user_view_test.exs
index eea743b32c093c7629c96ebab449e9134091d8f9..000c589afff4cf78bad313faa3a64b139512548e 100644
(file)
--- a/
test/web/twitter_api/views/user_view_test.exs
+++ b/
test/web/twitter_api/views/user_view_test.exs
@@
-40,7
+40,9
@@
defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"id" => user.id,
"name" => user.name,
"screen_name" => user.nickname,
"id" => user.id,
"name" => user.name,
"screen_name" => user.nickname,
+ "screen_name_html" => user.nickname,
"description" => HtmlSanitizeEx.strip_tags(user.bio),
"description" => HtmlSanitizeEx.strip_tags(user.bio),
+ "description_html" => HtmlSanitizeEx.strip_tags(user.bio),
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 1,
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 1,
@@
-60,7
+62,8
@@
defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"cover_photo" => banner,
"background_image" => nil,
"is_local" => true,
"cover_photo" => banner,
"background_image" => nil,
"is_local" => true,
- "locked" => false
+ "locked" => false,
+ "default_scope" => "public"
}
assert represented == UserView.render("show.json", %{user: user})
}
assert represented == UserView.render("show.json", %{user: user})
@@
-76,7
+79,9
@@
defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"id" => user.id,
"name" => user.name,
"screen_name" => user.nickname,
"id" => user.id,
"name" => user.name,
"screen_name" => user.nickname,
+ "screen_name_html" => user.nickname,
"description" => HtmlSanitizeEx.strip_tags(user.bio),
"description" => HtmlSanitizeEx.strip_tags(user.bio),
+ "description_html" => HtmlSanitizeEx.strip_tags(user.bio),
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,
@@
-96,7
+101,8
@@
defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"cover_photo" => banner,
"background_image" => nil,
"is_local" => true,
"cover_photo" => banner,
"background_image" => nil,
"is_local" => true,
- "locked" => false
+ "locked" => false,
+ "default_scope" => "public"
}
assert represented == UserView.render("show.json", %{user: user, for: follower})
}
assert represented == UserView.render("show.json", %{user: user, for: follower})
@@
-113,7
+119,9
@@
defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"id" => follower.id,
"name" => follower.name,
"screen_name" => follower.nickname,
"id" => follower.id,
"name" => follower.name,
"screen_name" => follower.nickname,
+ "screen_name_html" => follower.nickname,
"description" => HtmlSanitizeEx.strip_tags(follower.bio),
"description" => HtmlSanitizeEx.strip_tags(follower.bio),
+ "description_html" => HtmlSanitizeEx.strip_tags(follower.bio),
"created_at" => follower.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,
"created_at" => follower.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,
@@
-133,7
+141,8
@@
defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"cover_photo" => banner,
"background_image" => nil,
"is_local" => true,
"cover_photo" => banner,
"background_image" => nil,
"is_local" => true,
- "locked" => false
+ "locked" => false,
+ "default_scope" => "public"
}
assert represented == UserView.render("show.json", %{user: follower, for: user})
}
assert represented == UserView.render("show.json", %{user: follower, for: user})
@@
-157,7
+166,9
@@
defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"id" => user.id,
"name" => user.name,
"screen_name" => user.nickname,
"id" => user.id,
"name" => user.name,
"screen_name" => user.nickname,
+ "screen_name_html" => user.nickname,
"description" => HtmlSanitizeEx.strip_tags(user.bio),
"description" => HtmlSanitizeEx.strip_tags(user.bio),
+ "description_html" => HtmlSanitizeEx.strip_tags(user.bio),
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,
"created_at" => user.inserted_at |> Utils.format_naive_asctime(),
"favourites_count" => 0,
"statuses_count" => 0,
@@
-177,7
+188,8
@@
defmodule Pleroma.Web.TwitterAPI.UserViewTest do
"cover_photo" => banner,
"background_image" => nil,
"is_local" => true,
"cover_photo" => banner,
"background_image" => nil,
"is_local" => true,
- "locked" => false
+ "locked" => false,
+ "default_scope" => "public"
}
blocker = Repo.get(User, blocker.id)
}
blocker = Repo.get(User, blocker.id)