summaryrefslogtreecommitdiff
path: root/internal/typeutils/astointernal_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-08-15 12:35:05 +0200
committerLibravatar GitHub <noreply@github.com>2022-08-15 11:35:05 +0100
commitac6ed3d939fe9dad81aadbd04541e905c625ca82 (patch)
tree6116baf25675837dc99f69c49b9fec2ff112ce5c /internal/typeutils/astointernal_test.go
parent[frontend] Sensitive media spoilers (#752) (diff)
downloadgotosocial-ac6ed3d939fe9dad81aadbd04541e905c625ca82.tar.xz
[chore] Update bun / sqlite versions; update gtsmodels (#754)
* upstep bun and sqlite versions * allow specific columns to be updated in the db * only update necessary columns for user * bit tidier * only update necessary fields of media_attachment * only update relevant instance fields * update tests * update only specific account columns * use bool pointers on gtsmodels includes attachment, status, account, user * update columns more selectively * test all default fields on new account insert * updating remaining bools on gtsmodels * initialize pointer fields when extracting AP emoji * copy bools properly * add copyBoolPtr convenience function + test it * initialize false bool ptrs a bit more neatly
Diffstat (limited to 'internal/typeutils/astointernal_test.go')
-rw-r--r--internal/typeutils/astointernal_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/internal/typeutils/astointernal_test.go b/internal/typeutils/astointernal_test.go
index dbd852d3f..7024018d6 100644
--- a/internal/typeutils/astointernal_test.go
+++ b/internal/typeutils/astointernal_test.go
@@ -51,9 +51,9 @@ func (suite *ASToInternalTestSuite) TestParsePerson() {
suite.Equal("Geoff Brando New Personson", acct.DisplayName)
suite.Equal("hey I'm a new person, your instance hasn't seen me yet uwu", acct.Note)
suite.Equal("https://unknown-instance.com/@brand_new_person", acct.URL)
- suite.True(acct.Discoverable)
+ suite.True(*acct.Discoverable)
suite.Equal("https://unknown-instance.com/users/brand_new_person#main-key", acct.PublicKeyURI)
- suite.False(acct.Locked)
+ suite.False(*acct.Locked)
}
func (suite *ASToInternalTestSuite) TestParsePublicStatus() {
@@ -145,10 +145,10 @@ func (suite *ASToInternalTestSuite) TestParseReplyWithMention() {
suite.Equal(inReplyToAccount.ID, status.InReplyToAccountID)
suite.Equal(inReplyToStatus.ID, status.InReplyToID)
suite.Equal(inReplyToStatus.URI, status.InReplyToURI)
- suite.True(status.Federated)
- suite.True(status.Boostable)
- suite.True(status.Replyable)
- suite.True(status.Likeable)
+ suite.True(*status.Federated)
+ suite.True(*status.Boostable)
+ suite.True(*status.Replyable)
+ suite.True(*status.Likeable)
suite.Equal(`<p><span class="h-card"><a href="http://localhost:8080/@the_mighty_zork" class="u-url mention">@<span>the_mighty_zork</span></a></span> nice there it is:</p><p><a href="http://localhost:8080/users/the_mighty_zork/statuses/01F8MHAMCHF6Y650WCRSCP4WMY/activity" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">social.pixie.town/users/f0x/st</span><span class="invisible">atuses/106221628567855262/activity</span></a></p>`, status.Content)
suite.Len(status.Mentions, 1)
m1 := status.Mentions[0]
@@ -177,9 +177,9 @@ func (suite *ASToInternalTestSuite) TestParseOwncastService() {
suite.Equal("https://owncast.example.org/logo/external", acct.HeaderRemoteURL)
suite.Equal("Rob's Owncast Server", acct.DisplayName)
suite.Equal("linux audio stuff ", acct.Note)
- suite.True(acct.Bot)
- suite.False(acct.Locked)
- suite.True(acct.Discoverable)
+ suite.True(*acct.Bot)
+ suite.False(*acct.Locked)
+ suite.True(*acct.Discoverable)
suite.Equal("https://owncast.example.org/federation/user/rgh", acct.URI)
suite.Equal("https://owncast.example.org/federation/user/rgh", acct.URL)
suite.Equal("https://owncast.example.org/federation/user/rgh/inbox", acct.InboxURI)