Assert team test exists
continuous-integration/drone/pr Build is failing
Details
continuous-integration/drone/pr Build is failing
Details
Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
parent
4c8d0353ae
commit
b919c99704
|
@ -37,6 +37,11 @@ func TestTeam_Create(t *testing.T) {
|
|||
}
|
||||
err := team.Create(doer)
|
||||
assert.NoError(t, err)
|
||||
db.AssertDBExists(t, "teams", map[string]interface{}{
|
||||
"id": team.ID,
|
||||
"name": "Testteam293",
|
||||
"description": "Lorem Ispum",
|
||||
}, false)
|
||||
})
|
||||
t.Run("empty name", func(t *testing.T) {
|
||||
db.LoadAndAssertFixtures(t)
|
||||
|
@ -95,6 +100,10 @@ func TestTeam_Update(t *testing.T) {
|
|||
}
|
||||
err := team.Update()
|
||||
assert.NoError(t, err)
|
||||
db.AssertDBExists(t, "teams", map[string]interface{}{
|
||||
"id": team.ID,
|
||||
"name": "SomethingNew",
|
||||
}, false)
|
||||
})
|
||||
t.Run("empty name", func(t *testing.T) {
|
||||
db.LoadAndAssertFixtures(t)
|
||||
|
@ -126,6 +135,9 @@ func TestTeam_Delete(t *testing.T) {
|
|||
}
|
||||
err := team.Delete()
|
||||
assert.NoError(t, err)
|
||||
db.AssertDBMissing(t, "teams", map[string]interface{}{
|
||||
"id": 1,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue