if no body specified, do not update it value

[#102280580]
This commit is contained in:
Alex Suraci
2015-10-27 14:47:27 -07:00
parent d30a1d0197
commit 6c3c5e9cbd
2 changed files with 22 additions and 2 deletions

View File

@@ -140,6 +140,20 @@ var _ = Describe("Out Command", func() {
})
})
Context("when a body is not supplied", func() {
BeforeEach(func() {
request.Params.BodyPath = ""
})
It("does not blow away the body", func() {
Ω(githubClient.UpdateReleaseCallCount()).Should(Equal(1))
updatedRelease := githubClient.UpdateReleaseArgsForCall(0)
Ω(*updatedRelease.Name).Should(Equal("v0.3.12"))
Ω(updatedRelease.Body).Should(BeNil())
})
})
Context("when a commitish is not supplied", func() {
It("updates the existing release", func() {
Ω(githubClient.UpdateReleaseCallCount()).Should(Equal(1))