duplicates test
This commit is contained in:
parent
81c630ba31
commit
a06563d4c9
@ -16,3 +16,24 @@ func TestArgsParam(t *testing.T) {
|
|||||||
t.Fatal("Expected 2 instead", len(result))
|
t.Fatal("Expected 2 instead", len(result))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestDuplicates(t *testing.T) {
|
||||||
|
projects := []Project{
|
||||||
|
{
|
||||||
|
Name: "a",
|
||||||
|
}, {
|
||||||
|
Name: "b",
|
||||||
|
}, {
|
||||||
|
Name: "c",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
_, err := duplicates(projects[0], projects)
|
||||||
|
if err == nil {
|
||||||
|
t.Fatal("Error unexpected", err)
|
||||||
|
}
|
||||||
|
_, err = duplicates(Project{}, projects)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal("Error unexpected", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user