Fixed unit tests
This commit is contained in:
parent
b17827a158
commit
1d51ac92ca
|
@ -8,6 +8,7 @@ package models
|
|||
|
||||
import (
|
||||
"code.vikunja.io/api/pkg/db"
|
||||
"code.vikunja.io/api/pkg/files"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/d4l3k/messagediff.v1"
|
||||
"sort"
|
||||
|
@ -68,6 +69,29 @@ func sortTasksForTesting(by SortBy) (tasks []*Task) {
|
|||
},
|
||||
},
|
||||
},
|
||||
Attachments: []*TaskAttachment{
|
||||
{
|
||||
ID: 1,
|
||||
TaskID: 1,
|
||||
FileID: 1,
|
||||
CreatedByID: 1,
|
||||
CreatedBy: user1,
|
||||
File: &files.File{
|
||||
ID: 1,
|
||||
Name: "test",
|
||||
Size: 100,
|
||||
CreatedUnix: 1570998791,
|
||||
CreatedByID: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: 2,
|
||||
TaskID: 1,
|
||||
FileID: 9999,
|
||||
CreatedByID: 1,
|
||||
CreatedBy: user1,
|
||||
},
|
||||
},
|
||||
Created: 1543626724,
|
||||
Updated: 1543626724,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue