mirror of https://kolaente.dev/vikunja/api.git
fix(test): cast result before comparing
This commit is contained in:
parent
574c7f218e
commit
ea7527a3cf
|
@ -62,7 +62,7 @@ func TestLabel_ReadAll(t *testing.T) {
|
||||||
name string
|
name string
|
||||||
fields fields
|
fields fields
|
||||||
args args
|
args args
|
||||||
wantLs interface{}
|
wantLs []*LabelWithTaskID
|
||||||
wantErr bool
|
wantErr bool
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
|
@ -143,7 +143,10 @@ func TestLabel_ReadAll(t *testing.T) {
|
||||||
t.Errorf("Label.ReadAll() error = %v, wantErr %v", err, tt.wantErr)
|
t.Errorf("Label.ReadAll() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if diff, equal := messagediff.PrettyDiff(gotLs, tt.wantLs); !equal {
|
|
||||||
|
got := gotLs.([]*LabelWithTaskID)
|
||||||
|
|
||||||
|
if diff, equal := messagediff.PrettyDiff(got, tt.wantLs); !equal {
|
||||||
t.Errorf("Label.ReadAll() = %v, want %v, diff: %v", gotLs, tt.wantLs, diff)
|
t.Errorf("Label.ReadAll() = %v, want %v, diff: %v", gotLs, tt.wantLs, diff)
|
||||||
}
|
}
|
||||||
s.Close()
|
s.Close()
|
||||||
|
|
Loading…
Reference in New Issue