MCPcopy
hub / github.com/gotify/server / AssertUserExist

Method AssertUserExist

test/testdb/database.go:224–228  ·  view source on GitHub ↗

AssertUserExist asserts that the user does exist.

(id uint)

Source from the content-addressed store, hash-verified

222
223// AssertUserExist asserts that the user does exist.
224func (d *Database) AssertUserExist(id uint) {
225 if user, err := d.GetUserByID(id); assert.NoError(d.t, err) {
226 assert.False(d.t, user == nil, "user %d must exist", id)
227 }
228}
229
230// AssertClientExist asserts that the client does exist.
231func (d *Database) AssertClientExist(id uint) {

Callers 1

Test_UsersMethod · 0.80

Implementers 1

GormDatabasedatabase/database.go

Calls 1

GetUserByIDMethod · 0.95

Tested by 1

Test_UsersMethod · 0.64