add metadata to in command output

[#76848252]

Signed-off-by: Chris Brown <cbrown@pivotal.io>
This commit is contained in:
Alex Suraci
2015-02-18 09:55:42 -08:00
committed by Chris Brown
parent 2878392b08
commit 3dc650adc8
3 changed files with 24 additions and 2 deletions

View File

@@ -55,9 +55,16 @@ var _ = Describe("In Command", func() {
})
buildRelease := func(id int, tag string) github.RepositoryRelease {
url := "http://google.com"
name := "release-name"
body := "*markdown*"
return github.RepositoryRelease{
ID: &id,
TagName: &tag,
HTMLURL: &url,
Name: &name,
Body: &body,
}
}
@@ -106,6 +113,14 @@ var _ = Describe("In Command", func() {
Ω(inResponse.Version).Should(Equal(resource.Version{Tag: "v0.35.0"}))
})
It("has some sweet metadata", func() {
Ω(inResponse.Metadata).Should(ConsistOf(
resource.MetadataPair{Name: "url", Value: "http://google.com"},
resource.MetadataPair{Name: "name", Value: "release-name", URL: "http://google.com"},
resource.MetadataPair{Name: "body", Value: "*markdown*", Markdown: true},
))
})
It("downloads only the files that match the globs", func() {
_, err := os.Stat(filepath.Join(destDir, "example.txt"))
Ω(err).ShouldNot(HaveOccurred())