Skip to content

Commit

Permalink
Fix object name in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Genevieve LEsperance committed May 5, 2018
1 parent 02f2edf commit 955aaa9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions aws/ec2/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ var _ = Describe("Image", func() {
imageId *string
resourceTags *fakes.ResourceTags

address ec2.Image
image ec2.Image
)

BeforeEach(func() {
client = &fakes.ImagesClient{}
imageId = aws.String("the-image-id")
resourceTags = &fakes.ResourceTags{}

address = ec2.NewImage(client, imageId, resourceTags)
image = ec2.NewImage(client, imageId, resourceTags)
})

Describe("Delete", func() {
It("releases the address", func() {
err := address.Delete()
It("deletes the resource", func() {
err := image.Delete()
Expect(err).NotTo(HaveOccurred())

Expect(client.DeregisterImageCall.CallCount).To(Equal(1))
Expand All @@ -47,7 +47,7 @@ var _ = Describe("Image", func() {
})

It("returns the error", func() {
err := address.Delete()
err := image.Delete()
Expect(err).To(MatchError("Delete: banana"))
})
})
Expand All @@ -58,21 +58,21 @@ var _ = Describe("Image", func() {
})

It("returns the error", func() {
err := address.Delete()
err := image.Delete()
Expect(err).To(MatchError("Delete tags: banana"))
})
})
})

Describe("Name", func() {
It("returns the identifier", func() {
Expect(address.Name()).To(Equal("the-image-id"))
Expect(image.Name()).To(Equal("the-image-id"))
})
})

Describe("Type", func() {
It("returns the type", func() {
Expect(address.Type()).To(Equal("EC2 Image"))
Expect(image.Type()).To(Equal("EC2 Image"))
})
})
})

0 comments on commit 955aaa9

Please sign in to comment.