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
This commit is contained in:
tobi 2021-09-11 13:19:06 +02:00 committed by GitHub
commit 9dc2255a8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 537 additions and 163 deletions

View file

@ -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))
}