Sha256: 24a741f32335200efdf7905cd0254982f027022051c9b247cf97399ebe81a24b

Contents?: true

Size: 1.14 KB

Versions: 11

Compression:

Stored size: 1.14 KB

Contents

Feature: After a response has been served from Mirage, the request that triggered it can be retrieved. This is useful
  for testing that the correct information was sent by your application code.

  Use a template's ID to retrieve the last request that was last received.


  Background: A template has already be put on Mirage
    Given the following template template:
    """
      {
         "request" : {
            "http_method" : "post"
         },
         "response":{
            "body":"Hello"
         }
      }
    """
    And 'response.body' is base64 encoded
    And the template is sent using PUT to 'http://localhost:7001/mirage/templates/greeting'


  Scenario: Getting request data when the data was in the body.
    Given I send POST to 'http://localhost:7001/mirage/responses/greeting' with request entity
    """
    Hello Mirage
    """
    When GET is sent to 'http://localhost:7001/mirage/requests/1'
    Then request data should have been retrieved


  Scenario: Getting request data for a template that has not yet served a response.
    Given GET is sent to 'http://localhost:7001/mirage/requests/1'
    Then a 404 should be returned

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mirage-3.0.0.alpha.11 features/server/requests/get.feature
mirage-3.0.0.alpha.10 features/server/requests/get.feature
mirage-3.0.0.alpha.9 features/server/requests/get.feature
mirage-3.0.0.alpha.8 features/server/requests/get.feature
mirage-3.0.0.alpha.7 features/server/requests/get.feature
mirage-3.0.0.alpha.6 features/server/requests/get.feature
mirage-3.0.0.alpha.5 features/server/requests/get.feature
mirage-3.0.0.alpha.4 features/server/requests/get.feature
mirage-3.0.0.alpha.3 features/server/requests/get.feature
mirage-3.0.0.alpha.2 features/server/requests/get.feature
mirage-3.0.0.alpha.1 features/server/requests/get.feature