summaryrefslogtreecommitdiff
path: root/testrig/testmodels.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-01-10 15:19:05 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-10 14:19:05 +0000
commitd6487933c758be647bff7a568d6a33e6155e6599 (patch)
treefbc2d466dc2d0833a7ceec1200643e78dae4f916 /testrig/testmodels.go
parent[chore] Bump json5 from 1.0.1 to 1.0.2 in /web/source (#1308) (diff)
downloadgotosocial-d6487933c758be647bff7a568d6a33e6155e6599.tar.xz
[feature] Implement Report database model and utility functions (#1310)
* implement report database model * implement report cache + config changes * implement report database functions * report uri / regex functions * update envparsing test * remove unnecessary uri index * remove unused function + cache lookup * process error when storing report
Diffstat (limited to 'testrig/testmodels.go')
-rw-r--r--testrig/testmodels.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/testrig/testmodels.go b/testrig/testmodels.go
index 6845abdb9..88c5df77a 100644
--- a/testrig/testmodels.go
+++ b/testrig/testmodels.go
@@ -1971,6 +1971,36 @@ func NewTestBlocks() map[string]*gtsmodel.Block {
}
}
+func NewTestReports() map[string]*gtsmodel.Report {
+ return map[string]*gtsmodel.Report{
+ "local_account_2_report_remote_account_1": {
+ ID: "01GP3AWY4CRDVRNZKW0TEAMB5R",
+ CreatedAt: TimeMustParse("2022-05-14T12:20:03+02:00"),
+ UpdatedAt: TimeMustParse("2022-05-14T12:20:03+02:00"),
+ URI: "http://localhost:8080/01GP3AWY4CRDVRNZKW0TEAMB5R",
+ AccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
+ TargetAccountID: "01F8MH5ZK5VRH73AKHQM6Y9VNX",
+ Comment: "dark souls sucks, please yeet this nerd",
+ StatusIDs: []string{"01FVW7JHQFSFK166WWKR8CBA6M"},
+ Forwarded: TrueBool(),
+ },
+ "remote_account_1_report_local_account_2": {
+ ID: "01GP3DFY9XQ1TJMZT5BGAZPXX7",
+ CreatedAt: TimeMustParse("2022-05-15T16:20:12+02:00"),
+ UpdatedAt: TimeMustParse("2022-05-15T16:20:12+02:00"),
+ URI: "http://fossbros-anonymous.io/87fb1478-ac46-406a-8463-96ce05645219",
+ AccountID: "01F8MH5ZK5VRH73AKHQM6Y9VNX",
+ TargetAccountID: "01F8MH5NBDF2MV7CTC4Q5128HF",
+ Comment: "this is a turtle, not a person, therefore should not be a poster",
+ StatusIDs: []string{},
+ Forwarded: TrueBool(),
+ ActionTaken: "user was warned not to be a turtle anymore",
+ ActionTakenAt: TimeMustParse("2022-05-15T17:01:56+02:00"),
+ ActionTakenByAccountID: "01AY6P665V14JJR0AFVRT7311Y",
+ },
+ }
+}
+
// ActivityWithSignature wraps a pub.Activity along with its signature headers, for testing.
type ActivityWithSignature struct {
Activity pub.Activity