Add read one test
continuous-integration/drone/pr Build was killed Details

This commit is contained in:
kolaente 2020-09-09 00:12:27 +02:00
parent 4af80613d0
commit 0f7339ae3d
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,17 @@ func TestSavedFilter_Create(t *testing.T) {
}
func TestSavedFilter_ReadOne(t *testing.T) {
user1 := &user.User{ID: 1}
db.LoadAndAssertFixtures(t)
sf := &SavedFilter{
ID: 1,
}
// canRead pre-populates the struct
_, _, err := sf.CanRead(user1)
assert.NoError(t, err)
err = sf.ReadOne()
assert.NoError(t, err)
assert.NotNil(t, sf.Owner)
}
func TestSavedFilter_Update(t *testing.T) {