do not fail if there are no releases

they might just not be created yet
This commit is contained in:
Alex Suraci
2015-08-08 11:53:25 -07:00
parent d2c9a5e136
commit b682cc93ad
2 changed files with 9 additions and 8 deletions

View File

@@ -35,9 +35,10 @@ var _ = Describe("Check Command", func() {
returnedReleases = []github.RepositoryRelease{}
})
It("returns an error when there are no releases", func() {
_, err := command.Run(resource.CheckRequest{})
Ω(err).Should(HaveOccurred())
It("returns no versions", func() {
versions, err := command.Run(resource.CheckRequest{})
Ω(err).ShouldNot(HaveOccurred())
Ω(versions).Should(BeEmpty())
})
})
@@ -70,9 +71,10 @@ var _ = Describe("Check Command", func() {
returnedReleases = []github.RepositoryRelease{}
})
It("returns an error when there are no releases", func() {
_, err := command.Run(resource.CheckRequest{})
Ω(err).Should(HaveOccurred())
It("returns no versions", func() {
versions, err := command.Run(resource.CheckRequest{})
Ω(err).ShouldNot(HaveOccurred())
Ω(versions).Should(BeEmpty())
})
})