mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-25 13:57:56 +02:00
Implemented progressbar for export/import
This commit is contained in:
parent
ab04eb1123
commit
6e330daf06
24 changed files with 590 additions and 239 deletions
|
@ -77,6 +77,23 @@ func TestLovesListSort(t *testing.T) {
|
|||
assert.Equal(t, love3, list[1])
|
||||
}
|
||||
|
||||
func TestImportResultUpdate(t *testing.T) {
|
||||
result := models.ImportResult{
|
||||
TotalCount: 100,
|
||||
ImportCount: 20,
|
||||
LastTimestamp: time.Now(),
|
||||
}
|
||||
newResult := models.ImportResult{
|
||||
TotalCount: 120,
|
||||
ImportCount: 50,
|
||||
LastTimestamp: time.Now().Add(1 * time.Hour),
|
||||
}
|
||||
result.Update(newResult)
|
||||
assert.Equal(t, 120, result.TotalCount)
|
||||
assert.Equal(t, 70, result.ImportCount)
|
||||
assert.Equal(t, newResult.LastTimestamp, result.LastTimestamp)
|
||||
}
|
||||
|
||||
func TestImportResultUpdateTimestamp(t *testing.T) {
|
||||
timestamp := time.Now()
|
||||
i := models.ImportResult{LastTimestamp: timestamp}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue