defp prepare_tags(query, add_joined_tag \\ true) do
tags =
query
- |> String.split(~r/[^#\w]+/, trim: true)
+ |> String.split(~r/[^#\w]+/u, trim: true)
|> Enum.uniq_by(&String.downcase/1)
explicit_tags = Enum.filter(tags, fn tag -> String.starts_with?(tag, "#") end)
get(conn, "/api/v2/search?q=天子")
|> json_response_and_validate_schema(200)
+ assert results["hashtags"] == [
+ %{"name" => "天子", "url" => "#{Web.base_url()}/tag/天子"}
+ ]
+
[status] = results["statuses"]
assert status["id"] == to_string(activity.id)
end