read client messages in tests

This commit is contained in:
tobi 2025-04-11 12:31:58 +02:00
commit 8ea352bb25

View file

@ -352,6 +352,10 @@ func (suite *AccountUpdateTestSuite) TestAccountUpdateBotNotBot() {
// Returned profile should be updated.
suite.True(apiAccount.Bot)
// We should have an update in the client api channel.
msg, _ := suite.getClientMsg(5 * time.Second)
suite.NotNil(msg)
// Check database model of account as well.
dbAccount, err := suite.db.GetAccountByID(ctx, testAccount.ID)
if err != nil {
@ -374,6 +378,10 @@ func (suite *AccountUpdateTestSuite) TestAccountUpdateBotNotBot() {
// Returned profile should be updated.
suite.False(apiAccount.Bot)
// We should have an update in the client api channel.
msg, _ = suite.getClientMsg(5 * time.Second)
suite.NotNil(msg)
// Check database model of account as well.
dbAccount, err = suite.db.GetAccountByID(ctx, testAccount.ID)
if err != nil {