Add ReportNote test
This commit is contained in:
parent
77b48cb4ce
commit
f9301044ed
|
@ -0,0 +1,16 @@
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
|
defmodule Pleroma.ReportNoteTest do
|
||||||
|
alias Pleroma.ReportNote
|
||||||
|
use Pleroma.DataCase
|
||||||
|
import Pleroma.Factory
|
||||||
|
|
||||||
|
test "create/3" do
|
||||||
|
user = insert(:user)
|
||||||
|
report = insert(:report_activity)
|
||||||
|
assert {:ok, note} = ReportNote.create(user.id, report.id, "naughty boy")
|
||||||
|
assert note.content == "naughty boy"
|
||||||
|
end
|
||||||
|
end
|
|
@ -311,7 +311,7 @@ def report_activity_factory(attrs \\ %{}) do
|
||||||
"to" => [],
|
"to" => [],
|
||||||
"cc" => [activity.actor],
|
"cc" => [activity.actor],
|
||||||
"context" => activity.data["context"],
|
"context" => activity.data["context"],
|
||||||
"state" => state,
|
"state" => state
|
||||||
}
|
}
|
||||||
|
|
||||||
%Pleroma.Activity{
|
%Pleroma.Activity{
|
||||||
|
|
Loading…
Reference in New Issue