summaryrefslogtreecommitdiff
path: root/internal/db/bundb/domain_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-04-04 18:29:22 +0200
committerLibravatar GitHub <noreply@github.com>2025-04-04 18:29:22 +0200
commitb1844323314dd1f0832f1fcdb765a7f67ca01dbc (patch)
treee568a5941a6155e9ca55f3e4194b3256ad2fe352 /internal/db/bundb/domain_test.go
parent[chore] bump ncruces/go-sqlite3 to v0.25.0 (#3966) (diff)
downloadgotosocial-b1844323314dd1f0832f1fcdb765a7f67ca01dbc.tar.xz
[feature] Allow editing domain blocks/allows, fix comment import (#3967)
* start implementing editing of existing domain permissions * [feature] Allow editing domain blocks/allows, fix comment import * [bugfix] Use "comment" via /api/v1/instance * fix the stuff
Diffstat (limited to 'internal/db/bundb/domain_test.go')
-rw-r--r--internal/db/bundb/domain_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/db/bundb/domain_test.go b/internal/db/bundb/domain_test.go
index 8164259e8..a56f469c4 100644
--- a/internal/db/bundb/domain_test.go
+++ b/internal/db/bundb/domain_test.go
@@ -46,7 +46,7 @@ func (suite *DomainTestSuite) TestIsDomainBlocked() {
suite.NoError(err)
suite.False(blocked)
- err = suite.db.CreateDomainBlock(ctx, domainBlock)
+ err = suite.db.PutDomainBlock(ctx, domainBlock)
suite.NoError(err)
// domain block now exists
@@ -75,7 +75,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedWithAllow() {
suite.False(blocked)
// Block this domain.
- if err := suite.db.CreateDomainBlock(ctx, domainBlock); err != nil {
+ if err := suite.db.PutDomainBlock(ctx, domainBlock); err != nil {
suite.FailNow(err.Error())
}
@@ -96,7 +96,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedWithAllow() {
CreatedByAccount: suite.testAccounts["admin_account"],
}
- if err := suite.db.CreateDomainAllow(ctx, domainAllow); err != nil {
+ if err := suite.db.PutDomainAllow(ctx, domainAllow); err != nil {
suite.FailNow(err.Error())
}
@@ -124,7 +124,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedWildcard() {
suite.NoError(err)
suite.False(blocked)
- err = suite.db.CreateDomainBlock(ctx, domainBlock)
+ err = suite.db.PutDomainBlock(ctx, domainBlock)
suite.NoError(err)
// Start with the base block domain
@@ -164,7 +164,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII() {
suite.NoError(err)
suite.False(blocked)
- err = suite.db.CreateDomainBlock(ctx, domainBlock)
+ err = suite.db.PutDomainBlock(ctx, domainBlock)
suite.NoError(err)
// domain block now exists
@@ -200,7 +200,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII2() {
suite.NoError(err)
suite.False(blocked)
- err = suite.db.CreateDomainBlock(ctx, domainBlock)
+ err = suite.db.PutDomainBlock(ctx, domainBlock)
suite.NoError(err)
// domain block now exists
@@ -232,7 +232,7 @@ func (suite *DomainTestSuite) TestIsOtherDomainBlockedWildcardAndExplicit() {
}
for _, block := range blocks {
- if err := suite.db.CreateDomainBlock(ctx, block); err != nil {
+ if err := suite.db.PutDomainBlock(ctx, block); err != nil {
suite.FailNow(err.Error())
}
}