user4122863
user4122863

Reputation:

Assert HTTP Status Code in MUnit for Mule 4

How do I assert my HTTP Status Code in MUnit Version 2.2.1 for Mule 4?

I have checked all the vars and attributes being returned and none of them have the HTTP Status Code.

Upvotes: 1

Views: 2597

Answers (1)

Diego Strubolini
Diego Strubolini

Reputation: 66

It should be present in the attributes

<munit-tools:assert-that expression="#[attributes.statusCode]" is="#[MunitTools::equalTo(400)]"/>

Upvotes: 1

Related Questions