thomaspoignant / api-scenario

API-scenario is a command-line tool that allows you to execute easily a scenario to test your APIs.
https://github.com/thomaspoignant/api-scenario#api-scenario
The Unlicense
17 stars 3 forks source link

Contains does not work on arrays #59

Closed thomaspoignant closed 4 years ago

thomaspoignant commented 4 years ago

Observed behavior

Assertion

{
    "comparison": "contains",
    "property": "schemas",
    "value": "urn:ietf:params:scim:schemas:core:2.0:User",
    "source": "response_json"
}

on body

{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "userName": "randomUsername",
  "name": {
    "givenName": "randomGivenName",
    "familyName": "randomFamilyName"
  },
  "emails": [
    {
      "primary": true,
      "value": "random@email.com",
      "type": "work"
    }
  ],
  "displayName": "randomGivenName randomFamilyName",
  "active": true,
  "id": "id_tcumw"
}

return error :

X   body.schemas - the comparison contains was not supported for the source

Expected behavior

contains should test if the value exist in the array.