Commit 20e51596 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

fix(001_02): expected error types when content is invalid

parent 042fd9db
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -4,22 +4,22 @@ Resource ${EXECDIR}/resources/ApiUtils.resource
Resource          ${EXECDIR}/resources/AssertionUtils.resource
Test Template     Create Entity With Invalid Request Scenarios

*** Test Cases ***    FILENAME
*** Test Cases ***    FILENAME                      ERROR_TYPE
001_02_01_InvalidJson
                      invalid-json-sample.jsonld
                      invalid-json-sample.jsonld    ${ERROR_TYPE_INVALID_REQUEST}

001_02_02_EmptyJson
                      empty-sample.jsonld
                      empty-sample.jsonld           ${ERROR_TYPE_INVALID_REQUEST}

001_02_03_EntityWithNoContext
                      building-minimal-without-context-sample.jsonld
                      building-minimal-without-context-sample.jsonld    ${ERROR_TYPE_BAD_REQUEST_DATA}

*** Keywords ***
Create Entity With Invalid Request Scenarios
    [Arguments]    ${filename}
    [Arguments]    ${filename}      ${error_type}
    [Documentation]    Check that you cannot create an entity with an invalid request
    [Tags]    e-create    5_6_1
    Request Entity From File    ${filename}
    Check RL Response Status Code Set To    400
    Check RL Response Body Containing ProblemDetails Element Containing Type Element set to    ${response}    ${ERROR_TYPE_BAD_REQUEST_DATA}
    Check RL Response Body Containing ProblemDetails Element Containing Type Element set to    ${response}    ${error_type}
    Check RL Response Body Containing ProblemDetails Element Containing Title Element    ${response}