clean up pointerisms, fix building real client
google github library returns *Foo in singular case and []Foo if there are many results. seems like the best approach is to pass them around by-value, since *Foo seems to only be so that they can return 'nil' instead of a zero-value.
This commit is contained in:
@@ -109,8 +109,8 @@ var _ = Describe("In Command", func() {
|
||||
})
|
||||
|
||||
It("downloads only the files that match the globs", func() {
|
||||
Ω(*githubClient.DownloadReleaseAssetArgsForCall(0)).Should(Equal(buildAsset(0, "example.txt")))
|
||||
Ω(*githubClient.DownloadReleaseAssetArgsForCall(1)).Should(Equal(buildAsset(1, "example.rtf")))
|
||||
Ω(githubClient.DownloadReleaseAssetArgsForCall(0)).Should(Equal(buildAsset(0, "example.txt")))
|
||||
Ω(githubClient.DownloadReleaseAssetArgsForCall(1)).Should(Equal(buildAsset(1, "example.rtf")))
|
||||
})
|
||||
})
|
||||
|
||||
@@ -151,9 +151,9 @@ var _ = Describe("In Command", func() {
|
||||
})
|
||||
|
||||
It("downloads all of the files", func() {
|
||||
Ω(*githubClient.DownloadReleaseAssetArgsForCall(0)).Should(Equal(buildAsset(0, "example.txt")))
|
||||
Ω(*githubClient.DownloadReleaseAssetArgsForCall(1)).Should(Equal(buildAsset(1, "example.rtf")))
|
||||
Ω(*githubClient.DownloadReleaseAssetArgsForCall(2)).Should(Equal(buildAsset(2, "example.wtf")))
|
||||
Ω(githubClient.DownloadReleaseAssetArgsForCall(0)).Should(Equal(buildAsset(0, "example.txt")))
|
||||
Ω(githubClient.DownloadReleaseAssetArgsForCall(1)).Should(Equal(buildAsset(1, "example.rtf")))
|
||||
Ω(githubClient.DownloadReleaseAssetArgsForCall(2)).Should(Equal(buildAsset(2, "example.wtf")))
|
||||
})
|
||||
})
|
||||
|
||||
@@ -232,7 +232,7 @@ var _ = Describe("In Command", func() {
|
||||
})
|
||||
|
||||
It("fetches from the latest release", func() {
|
||||
Ω(*githubClient.DownloadReleaseAssetArgsForCall(0)).Should(Equal(buildAsset(0, "something.tgz")))
|
||||
Ω(githubClient.DownloadReleaseAssetArgsForCall(0)).Should(Equal(buildAsset(0, "something.tgz")))
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user