nhsconnect / gpconnect-provider-testing

GP Connect automated test suite for API providers
Apache License 2.0
11 stars 5 forks source link

Error responses for invalid resources #261

Closed jonnyry closed 5 years ago

jonnyry commented 5 years ago

The following tests are currently looking for a 400/BAD_REQUEST error response, but 422/INVALID_RESOURCE is more accurate according to the following spec page - https://developer.nhs.uk/apis/gpconnect-1-2-3/development_fhir_error_handling_guidance.html

GPConnect.Provider.AcceptanceTests.AppointmentBookFeature.BookAppointmentForPatientAndSendExtraFieldsInTheResource
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElements("Animal",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElements("Communication",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElements("Deceased",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElements("Photo",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("Active",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("Births",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("CareProvider",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("Contact",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("ManagingOrg",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidAdditionalValidElements("Marital",System.String[])
GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithInvalidPatientResourceWithAdditionalElement
SimonFarrowNHS commented 5 years ago

I am querying the last entry on the list above. I cant find a test named: GPConnect.Provider.AcceptanceTests.PatientRegisterFeature.RegisterPatientWithAdditionalNotAllowedElement

PeterGresty commented 5 years ago

Last Entry in list is a duplicate of one further up that appears to have been truncated.. ignoring last entry.

SimonFarrowNHS commented 5 years ago

Removed erroneous last entry

PeterGresty commented 5 years ago

Code Release, tickets can be clsoed