#
# Explore and cover resources API with gabbi tests when there are a
# small number of pre-existing resources
#

fixtures:
    - ConfigFixture
    - SampleDataFixture

tests:

    - name: list all resources
      GET: /v2/resources
      response_json_paths:
          $[0].user_id: farmerjon
          $[0].links[1].rel: livestock
      response_strings:
          - /telemetry/

    - name: get one resource
      desc: get a resource via the links in the first resource listed above
      GET: $RESPONSE['$[0].links[0].href']
      response_json_paths:
          $.resource_id: $RESPONSE['$[0].resource_id']
