summaryrefslogtreecommitdiff
path: root/internal/db/bundb/basic_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-11 13:19:06 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-11 13:19:06 +0200
commit9dc2255a8fab8ef0bc4b9f417c6131e4c468cb9c (patch)
treeae528bf14a3475bbea264ff26e5ffded3dfadf8a /internal/db/bundb/basic_test.go
parentTest both dbs (#205) (diff)
downloadgotosocial-9dc2255a8fab8ef0bc4b9f417c6131e4c468cb9c.tar.xz
kim is a reply guy (#208)
* bun debug * bun trace logging hooks * more tests * fix up some stuffffff * drop the frontend cache until a proper fix is made * go fmt
Diffstat (limited to 'internal/db/bundb/basic_test.go')
-rw-r--r--internal/db/bundb/basic_test.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/internal/db/bundb/basic_test.go b/internal/db/bundb/basic_test.go
index acdfb6640..e5f7e159a 100644
--- a/internal/db/bundb/basic_test.go
+++ b/internal/db/bundb/basic_test.go
@@ -64,40 +64,6 @@ func (suite *BasicTestSuite) TestGetAllNotNull() {
}
}
-func (suite *BasicTestSuite) TestUpdateOneByPrimaryKeySetEmpty() {
- testAccount := suite.testAccounts["local_account_1"]
-
- // try removing the note from zork
- err := suite.db.UpdateOneByPrimaryKey(context.Background(), "note", "", testAccount)
- suite.NoError(err)
-
- // get zork out of the database
- dbAccount, err := suite.db.GetAccountByID(context.Background(), testAccount.ID)
- suite.NoError(err)
- suite.NotNil(dbAccount)
-
- // note should be empty now
- suite.Empty(dbAccount.Note)
-}
-
-func (suite *BasicTestSuite) TestUpdateOneByPrimaryKeySetValue() {
- testAccount := suite.testAccounts["local_account_1"]
-
- note := "this is my new note :)"
-
- // try updating the note on zork
- err := suite.db.UpdateOneByPrimaryKey(context.Background(), "note", note, testAccount)
- suite.NoError(err)
-
- // get zork out of the database
- dbAccount, err := suite.db.GetAccountByID(context.Background(), testAccount.ID)
- suite.NoError(err)
- suite.NotNil(dbAccount)
-
- // note should be set now
- suite.Equal(note, dbAccount.Note)
-}
-
func TestBasicTestSuite(t *testing.T) {
suite.Run(t, new(BasicTestSuite))
}