Remove unknown activities from feed.
This commit is contained in:
parent
c585f9e26c
commit
923584d046
4 changed files with 9 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
|
|||
use Pleroma.DataCase
|
||||
|
||||
alias Pleroma.Web.OStatus.ActivityRepresenter
|
||||
alias Pleroma.User
|
||||
alias Pleroma.{User, Activity}
|
||||
|
||||
import Pleroma.Factory
|
||||
|
||||
|
|
@ -32,6 +32,11 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenterTest do
|
|||
assert clean(res) == clean(expected)
|
||||
end
|
||||
|
||||
test "an unknown activity" do
|
||||
tuple = ActivityRepresenter.to_simple_form(%Activity{}, nil)
|
||||
assert is_nil(tuple)
|
||||
end
|
||||
|
||||
defp clean(string) do
|
||||
String.replace(string, ~r/\s/, "")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue