diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-05-18 15:16:49 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-05-18 15:16:49 +0200 |
commit | 0da6ade619b08ab543644a5629c347f65db09e63 (patch) | |
tree | 0f1dcc0c6679a41256aa5161859057f2190913ac /test/web/twitter_api/twitter_api_test.exs | |
parent | 9033bfffd260968088648bf321db23ee94778a14 (diff) | |
download | pleroma-0da6ade619b08ab543644a5629c347f65db09e63.tar.gz |
Save tags in object.
Diffstat (limited to 'test/web/twitter_api/twitter_api_test.exs')
-rw-r--r-- | test/web/twitter_api/twitter_api_test.exs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/web/twitter_api/twitter_api_test.exs b/test/web/twitter_api/twitter_api_test.exs index e20960228..3b6a7a1fe 100644 --- a/test/web/twitter_api/twitter_api_test.exs +++ b/test/web/twitter_api/twitter_api_test.exs @@ -28,13 +28,13 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do object = Repo.insert!(%Object{data: object_data}) input = %{ - "status" => "Hello again, @shp.<script></script>\nThis is on another line.", + "status" => "Hello again, @shp.<script></script>\nThis is on another line. #2hu #epic #phantasmagoric", "media_ids" => [object.id] } { :ok, activity = %Activity{} } = TwitterAPI.create_status(user, input) - assert get_in(activity.data, ["object", "content"]) == "Hello again, <a href='shp'>@shp</a>.<br>This is on another line.<br><a href='http://example.org/image.jpg' class='attachment'>http://example.org/image.jpg</a>" + assert get_in(activity.data, ["object", "content"]) == "Hello again, <a href='shp'>@shp</a>.<br>This is on another line. #2hu #epic #phantasmagoric<br><a href='http://example.org/image.jpg' class='attachment'>image.jpg</a>" assert get_in(activity.data, ["object", "type"]) == "Note" assert get_in(activity.data, ["object", "actor"]) == user.ap_id assert get_in(activity.data, ["actor"]) == user.ap_id @@ -43,6 +43,9 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do assert Enum.member?(get_in(activity.data, ["to"]), "shp") assert activity.local == true + # hashtags + assert activity.data["object"]["tag"] == ["2hu", "epic", "phantasmagoric"] + # Add a context assert is_binary(get_in(activity.data, ["context"])) assert is_binary(get_in(activity.data, ["object", "context"])) |