add tests for content type json
@@ -116,6 +116,10 @@ var _ = Describe("Resources API", func() {
Expect(response.StatusCode).To(Equal(http.StatusOK))
})
+ It("returns application/json", func() {
+ Expect(response.Header.Get("Content-Type")).To(Equal("application/json"))
+ })
+
It("returns each resource, excluding their check failure", func() {
body, err := ioutil.ReadAll(response.Body)
Expect(err).NotTo(HaveOccurred())
@@ -161,6 +165,10 @@ var _ = Describe("Resources API", func() {
Expect(response.StatusCode).To(Equal(http.StatusOK))
})
+ It("returns application/json", func() {
+ Expect(response.Header.Get("Content-Type")).To(Equal("application/json"))
+ })
+
It("returns each resource, including their check failure", func() {
body, err := ioutil.ReadAll(response.Body)
Expect(err).NotTo(HaveOccurred())
@@ -204,6 +212,11 @@ var _ = Describe("Resources API", func() {
It("returns 200", func() {
Expect(response.StatusCode).To(Equal(http.StatusOK))
})
+
+ It("returns application/json", func() {
+ Expect(response.Header.Get("Content-Type")).To(Equal("application/json"))
+ })
+
})
Context("with an unknown error", func() {
