mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 11:19:19 +00:00
Add ReportNote test
This commit is contained in:
parent
77b48cb4ce
commit
f9301044ed
2 changed files with 17 additions and 1 deletions
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" => [],
|
||||
"cc" => [activity.actor],
|
||||
"context" => activity.data["context"],
|
||||
"state" => state,
|
||||
"state" => state
|
||||
}
|
||||
|
||||
%Pleroma.Activity{
|
||||
|
|
Loading…
Reference in a new issue