Expect(attributes[1].Value).To(Equal("ZmFrZS1iYXNlNjQtZGF0YQo=")) Expect(attributes[1].Type.Name).To(Equal("Fake Data")) Expect(attributes[1].Type.Keyname).To(Equal("FAKE_DATA")) }) }) Context("#IsPingable", func() { BeforeEach(func() { virtualGuest.Id = 1234567 }) Context("when there are no API errors", func() { It("checks that the virtual guest instance is pigable", func() { fakeClient.DoRawHttpRequestResponse = []byte("true") pingable, err := virtualGuestService.IsPingable(virtualGuest.Id) Expect(err).ToNot(HaveOccurred()) Expect(pingable).To(BeTrue()) }) It("checks that the virtual guest instance is NOT pigable", func() { fakeClient.DoRawHttpRequestResponse = []byte("false") pingable, err := virtualGuestService.IsPingable(virtualGuest.Id) Expect(err).ToNot(HaveOccurred()) Expect(pingable).To(BeFalse()) }) }) Context("when there are API errors", func() { It("returns false and error", func() {