attempt to add html validation to mastodon api test case
authorensra <ensra@users.noreply.github.com>
Tue, 21 Aug 2018 14:41:32 +0000 (15:41 +0100)
committerensra <ensra@users.noreply.github.com>
Tue, 21 Aug 2018 14:41:32 +0000 (15:41 +0100)
test/web/mastodon_api/account_view_test.exs

index 8bf194e6b98e8a81f6e6c8c56c78b6456efc5168..35c8a1fb081c961d41e3a9916a765ec1bda0db90 100644 (file)
@@ -20,6 +20,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
         info: %{"note_count" => 5, "follower_count" => 3, "source_data" => source_data},
         nickname: "shp@shitposter.club",
         name: ":karjalanpiirakka: shp",
+        bio: "<script src=\"invalid-html\"></script><span>valid html</span>",
         inserted_at: ~N[2017-08-15 15:47:06.597036]
       })
 
@@ -33,7 +34,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
       followers_count: 3,
       following_count: 0,
       statuses_count: 5,
-      note: user.bio,
+      note: "<span>valid html</span>",
       url: user.ap_id,
       avatar: "http://localhost:4001/images/avi.png",
       avatar_static: "http://localhost:4001/images/avi.png",