openactive-test-suite

< Return to Summary File Generated: Fri Oct 01 2021 08:08:36 GMT+0000 (Coordinated Universal Time)

common-error-conditions » unknown-endpoint

Booking Flow:

Opportunity Type:

Feature: Core / Common error conditions (Implemented)

Test: Expect an UnknownOrIncorrectEndpointError for requests to unknown endpoints

Send a request to an endpoint that does not exist, and expect an UnknownOrIncorrectEndpointError to be returned

Running only this test

npm start -- --runInBand test/features/core/common-error-conditions/implemented/unknown-endpoint-test.js

✅ 2 passed with 0 failures, 0 warnings and 0 suggestions


Unknown Endpoint - JSON PUT

UnknownEndpoint Request

PUT https://localhost:5001/api/openbooking/ordeeeeers/abc

{
  "hi": "there"
}

Response status code: 404 Not Found. Responded in 106.699011ms.

{
  "@context": "https://openactive.io/",
  "@type": "UnknownOrIncorrectEndpointError",
  "name": "The Booking System has no endpoint matching the one requested.",
  "statusCode": 404
}

Specs

Unknown Endpoint - GET

UnknownEndpoint Request

GET https://localhost:5001/api/openbooking/ordeeeeers/abc


Response status code: 404 Not Found. Responded in 49.132097ms.

{
  "@context": "https://openactive.io/",
  "@type": "UnknownOrIncorrectEndpointError",
  "name": "The Booking System has no endpoint matching the one requested.",
  "statusCode": 404
}

Specs