Fix tests & lint
This commit is contained in:
parent
733f26f017
commit
c7f337f303
2 changed files with 9 additions and 3 deletions
|
@ -17,7 +17,6 @@
|
||||||
package files
|
package files
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.vikunja.io/api/pkg/log"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -25,6 +24,7 @@ import (
|
||||||
|
|
||||||
"code.vikunja.io/api/pkg/config"
|
"code.vikunja.io/api/pkg/config"
|
||||||
"code.vikunja.io/api/pkg/db"
|
"code.vikunja.io/api/pkg/db"
|
||||||
|
"code.vikunja.io/api/pkg/log"
|
||||||
"code.vikunja.io/web"
|
"code.vikunja.io/web"
|
||||||
"github.com/c2h5oh/datasize"
|
"github.com/c2h5oh/datasize"
|
||||||
"github.com/spf13/afero"
|
"github.com/spf13/afero"
|
||||||
|
|
|
@ -195,7 +195,13 @@ func TestTaskComment_ReadAll(t *testing.T) {
|
||||||
comments := result.([]*TaskComment)
|
comments := result.([]*TaskComment)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Len(t, comments, 2)
|
assert.Len(t, comments, 2)
|
||||||
assert.Equal(t, int64(-2), comments[0].AuthorID)
|
var foundComment bool
|
||||||
assert.NotNil(t, comments[0].Author)
|
for _, comment := range comments {
|
||||||
|
if comment.AuthorID == -2 {
|
||||||
|
foundComment = true
|
||||||
|
}
|
||||||
|
assert.NotNil(t, comment.Author)
|
||||||
|
}
|
||||||
|
assert.True(t, foundComment)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue