mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-22 22:49:25 +00:00
Add ReportNote test
This commit is contained in:
parent
77b48cb4ce
commit
f9301044ed
16
test/report_note_test.exs
Normal file
16
test/report_note_test.exs
Normal file
|
@ -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 @@ defmodule Pleroma.Factory 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 a new issue