[feature] Add list command to admin account (#1648)

* [feature] Add list command to admin account

Relates to: #388

* Print booleans as yes/no too
This commit is contained in:
Daenney 2023-03-27 16:02:26 +02:00 committed by GitHub
commit 7d09863393
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 0 deletions

View file

@ -29,6 +29,12 @@ type UserTestSuite struct {
BunDBStandardTestSuite
}
func (suite *UserTestSuite) TestGetAllUsers() {
users, err := suite.db.GetAllUsers(context.Background())
suite.NoError(err)
suite.Len(users, len(suite.testUsers))
}
func (suite *UserTestSuite) TestGetUser() {
user, err := suite.db.GetUserByID(context.Background(), suite.testUsers["local_account_1"].ID)
suite.NoError(err)