MD5: "not-supported-yet", AWSObjectKey: createProductFileConfig.AWSObjectKey, }, } }) It("creates the release with the minimum required fields", func() { server.AppendHandlers( ghttp.CombineHandlers( ghttp.VerifyRequest("POST", apiPrefix+"/products/"+productSlug+"/product_files"), ghttp.VerifyJSONRepresenting(&expectedRequestBody), ghttp.RespondWith(http.StatusCreated, validResponse), ), ) release, err := client.CreateProductFile(createProductFileConfig) Expect(err).NotTo(HaveOccurred()) Expect(release.ID).To(Equal(1234)) }) }) Context("when the server responds with a non-201 status code", func() { It("returns an error", func() { server.AppendHandlers( ghttp.CombineHandlers( ghttp.VerifyRequest("POST", apiPrefix+"/products/"+productSlug+"/product_files"), ghttp.RespondWith(http.StatusTeapot, nil), ), ) _, err := client.CreateProductFile(createProductFileConfig)