Skip to content

Commit

Permalink
test(cdevents-webhooks): test for cdevents API
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalander Ramagiri committed Apr 11, 2023
1 parent a691cc9 commit 021bbc4
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,16 @@ class WebhooksControllerSpec extends Specification {
NestedServletException ex = thrown()
ex.message.startsWith("Request processing failed; nested exception is retrofit.RetrofitError: Failed to connect to localhost")
}

void 'handles CDEvents API with BAD_REQUEST'() {
given:

when:
MockHttpServletResponse response = mockMvc.perform(post("/webhooks/cdevents/artifactPackaged")
.accept(MediaType.APPLICATION_JSON))
.andReturn().response

then:
response.status == 400
}
}

0 comments on commit 021bbc4

Please sign in to comment.