summaryrefslogtreecommitdiff
path: root/internal/db/bundb/basic_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/bundb/basic_test.go')
-rw-r--r--internal/db/bundb/basic_test.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/internal/db/bundb/basic_test.go b/internal/db/bundb/basic_test.go
index d8067fb9d..e5f7e159a 100644
--- a/internal/db/bundb/basic_test.go
+++ b/internal/db/bundb/basic_test.go
@@ -23,6 +23,7 @@ import (
"testing"
"github.com/stretchr/testify/suite"
+ "github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
)
@@ -42,7 +43,25 @@ func (suite *BasicTestSuite) TestGetAllStatuses() {
s := []*gtsmodel.Status{}
err := suite.db.GetAll(context.Background(), &s)
suite.NoError(err)
- suite.Len(s, 12)
+ suite.Len(s, 13)
+}
+
+func (suite *BasicTestSuite) TestGetAllNotNull() {
+ where := []db.Where{{
+ Key: "domain",
+ Value: nil,
+ Not: true,
+ }}
+
+ a := []*gtsmodel.Account{}
+
+ err := suite.db.GetWhere(context.Background(), where, &a)
+ suite.NoError(err)
+ suite.NotEmpty(a)
+
+ for _, acct := range a {
+ suite.NotEmpty(acct.Domain)
+ }
}
func TestBasicTestSuite(t *testing.T) {