I have test(!) code of RESTAssured, that checks that REST endpoint returns me 0 as status code;
given()
.contentType(CONTENT_TYPE_APPLICATION_JSON)
.when()
.get(getRestOperationPath())
.then()
.statusCode(STATUS_CODE_OK);
But now it is possible that it also can supply code 404, that is considered valid output. I need my test to check that status code is one of the two, but I cannot wrap my head on how to do actually do it. Can you point me as to how I can do it, or if it is impossible?
upd:
.get(getRestOperationPath()) returns Response -> you can get status code and compare it. closed.