Show the root namespace "library" in the dropdown even when there are no repos in it

This commit is contained in:
Roman Vynar
2018-08-14 15:39:21 +03:00
parent 7a752d3f8d
commit 7a3bc551b3
4 changed files with 27 additions and 1 deletions

View File

@@ -45,3 +45,13 @@ func TestPrettySize(t *testing.T) {
}
})
}
func TestItemInSlice(t *testing.T) {
a := []string{"abc", "def", "ghi"}
convey.Convey("Check whether element is in slice", t, func() {
convey.So(ItemInSlice("abc", a), convey.ShouldBeTrue)
convey.So(ItemInSlice("ghi", a), convey.ShouldBeTrue)
convey.So(ItemInSlice("abc1", a), convey.ShouldBeFalse)
convey.So(ItemInSlice("gh", a), convey.ShouldBeFalse)
})
}