diff options
author | rinpatch <rinpatch@sdf.org> | 2019-02-15 12:27:03 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-02-15 12:27:03 +0000 |
commit | b63a5e309d7a36c27b745eb74ec8a7115c60a820 (patch) | |
tree | 3bcf63fee115fc41db300c8067c9bf15a53d8bb4 /test | |
parent | ea2698beb75074e6c94acf0c66bcdbdb47f59acd (diff) | |
parent | 32b164943433ddebfdb04494bbd4d4e8a90578d4 (diff) | |
download | pleroma-b63a5e309d7a36c27b745eb74ec8a7115c60a820.tar.gz pleroma-b63a5e309d7a36c27b745eb74ec8a7115c60a820.zip |
Merge branch 'bugfix/actor-containment' into 'develop'
activitypub: correctly handle bare URIs in user lookup
Closes #645
See merge request pleroma/pleroma!829
Diffstat (limited to 'test')
-rw-r--r-- | test/user_test.exs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/user_test.exs b/test/user_test.exs index 58587bd82..a99b79a0d 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -878,6 +878,16 @@ defmodule Pleroma.UserTest do assert [] == User.search(query) end) end + + test "works with URIs" do + results = User.search("http://mastodon.example.org/users/admin", true) + result = results |> List.first() + + user = User.get_by_ap_id("http://mastodon.example.org/users/admin") + + assert length(results) == 1 + assert user == result |> Map.put(:search_rank, nil) + end end test "auth_active?/1 works correctly" do |