summaryrefslogtreecommitdiff
path: root/testrig/testmodels.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-02-25 13:16:30 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-25 12:16:30 +0000
commitc27b4d7ed02cdabac00c3ddedb8201b74f745ec6 (patch)
treed80f621241fd67a4e5de2d21a8c24776552175f5 /testrig/testmodels.go
parent[chore] Update gin to v1.9.0 (#1553) (diff)
downloadgotosocial-c27b4d7ed02cdabac00c3ddedb8201b74f745ec6.tar.xz
[feature] Client API endpoints + v. basic web view for pinned posts (#1547)
* implement status pin client api + web handler * make test names + comments more descriptive * don't use separate table for status pins * remove unused add + remove checking * tidy up + add some more tests
Diffstat (limited to 'testrig/testmodels.go')
-rw-r--r--testrig/testmodels.go20
1 files changed, 3 insertions, 17 deletions
diff --git a/testrig/testmodels.go b/testrig/testmodels.go
index e5fe45d9e..776265813 100644
--- a/testrig/testmodels.go
+++ b/testrig/testmodels.go
@@ -1263,6 +1263,7 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
return map[string]*gtsmodel.Status{
"admin_account_status_1": {
ID: "01F8MH75CBF9JFX4ZAD54N0W0R",
+ PinnedAt: TimeMustParse("2022-05-14T13:21:09+02:00"),
URI: "http://localhost:8080/users/admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R",
URL: "http://localhost:8080/@admin/statuses/01F8MH75CBF9JFX4ZAD54N0W0R",
Content: "hello world! #welcome ! first post on the instance :rainbow: !",
@@ -1283,7 +1284,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1292,6 +1292,7 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
},
"admin_account_status_2": {
ID: "01F8MHAAY43M6RJ473VQFCVH37",
+ PinnedAt: TimeMustParse("2022-05-14T14:21:09+02:00"),
URI: "http://localhost:8080/users/admin/statuses/01F8MHAAY43M6RJ473VQFCVH37",
URL: "http://localhost:8080/@admin/statuses/01F8MHAAY43M6RJ473VQFCVH37",
Content: "🐕🐕🐕🐕🐕",
@@ -1308,7 +1309,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: TrueBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1335,7 +1335,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1363,7 +1362,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: TrueBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGXQRHYF5QPMTMXP78QC2F",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1388,7 +1386,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: TrueBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1413,7 +1410,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
- Pinned: FalseBool(),
Federated: FalseBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1438,7 +1434,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: FalseBool(),
Replyable: FalseBool(),
@@ -1464,7 +1459,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1490,7 +1484,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGY43H3N2C8EWPR2FPYEXG",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1515,7 +1508,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: TrueBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1540,7 +1532,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: TrueBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: FalseBool(),
@@ -1565,7 +1556,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: TrueBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: FalseBool(),
@@ -1590,7 +1580,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: TrueBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
- Pinned: FalseBool(),
Federated: FalseBool(),
Boostable: FalseBool(),
Replyable: TrueBool(),
@@ -1619,7 +1608,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1647,7 +1635,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1656,6 +1643,7 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
},
"local_account_2_status_7": {
ID: "01G20ZM733MGN8J344T4ZDDFY1",
+ PinnedAt: TimeMustParse("2021-03-18T09:13:55+02:00"),
URI: "http://localhost:8080/users/1happyturtle/statuses/01G20ZM733MGN8J344T4ZDDFY1",
URL: "http://localhost:8080/@1happyturtle/statuses/01G20ZM733MGN8J344T4ZDDFY1",
Content: "🐢 hi followers! did u know i'm a turtle? 🐢",
@@ -1673,7 +1661,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "01F8MGYG9E893WRHW0TAEXR8GJ",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),
@@ -1701,7 +1688,6 @@ func NewTestStatuses() map[string]*gtsmodel.Status {
Sensitive: FalseBool(),
Language: "en",
CreatedWithApplicationID: "",
- Pinned: FalseBool(),
Federated: TrueBool(),
Boostable: TrueBool(),
Replyable: TrueBool(),