Sha256: a5712b2b252ec90fcec25a841a0b2f47780b7c20fd89c7918426d514f3b6dfe8

Contents?: true

Size: 1.97 KB

Versions: 25

Compression:

Stored size: 1.97 KB

Contents

Feature: Templates can be deleted, doing so means that the coresponding response is no longer hosted and it 
  also deletes any associated request data.


  Background: The MockServer has already got a response for greeting and leaving on it.
    Given I send PUT to 'http://localhost:7001/mirage/templates/greeting' with body 'Hello'
    And I send GET to 'http://localhost:7001/mirage/responses/greeting'

    And I send PUT to 'http://localhost:7001/mirage/templates/leaving' with body 'Goodbye'
    And I send GET to 'http://localhost:7001/mirage/responses/leaving'


  Scenario: Deleting all templates
    Given I send DELETE to 'http://localhost:7001/mirage/templates'

    When I send GET to 'http://localhost:7001/mirage/requests/1'
    Then a 404 should be returned
    When I send GET to 'http://localhost:7001/mirage/responses/greeting'
    Then a 404 should be returned
    When I send GET to 'http://localhost:7001/mirage/templates/1'
    Then a 404 should be returned

    When I send GET to 'http://localhost:7001/mirage/requests/2'
    Then a 404 should be returned
    When I send GET to 'http://localhost:7001/mirage/responses/leaving'
    Then a 404 should be returned
    When I send GET to 'http://localhost:7001/mirage/templates/2'
    Then a 404 should be returned


  Scenario: Deleting a particular template
    Given I send DELETE to 'http://localhost:7001/mirage/templates/1'

    When I send GET to 'http://localhost:7001/mirage/templates/1'
    Then a 404 should be returned
    When I send GET to 'http://localhost:7001/mirage/responses/greeting'
    Then a 404 should be returned
    When I send GET to 'http://localhost:7001/mirage/requests/1'
    Then a 404 should be returned

    When I send GET to 'http://localhost:7001/mirage/requests/2'
    Then a 200 should be returned
    When I send GET to 'http://localhost:7001/mirage/responses/leaving'
    Then a 200 should be returned
    When I send GET to 'http://localhost:7001/mirage/templates/2'
    Then a 200 should be returned
    

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mirage-2.4.2 features/server/templates/delete.feature
mirage-2.4.1 features/server/templates/delete.feature
mirage-2.4.0 features/server/templates/delete.feature
mirage-2.3.0 features/server/templates/delete.feature
mirage-2.2.3 features/server/templates/delete.feature
mirage-2.2.2 features/server/templates/delete.feature
mirage-2.1.2 features/server/templates/delete.feature
mirage-2.0.16 features/server/templates/delete.feature
mirage-2.0.15 features/server/templates/delete.feature
mirage-2.0.14 features/server/templates/delete.feature
mirage-2.0.13 features/server/templates/delete.feature
mirage-2.0.12 features/server/templates/delete.feature
mirage-2.0.11 features/server/templates/delete.feature
mirage-2.0.10 features/server/templates/delete.feature
mirage-2.0.9 features/server/templates/delete.feature
mirage-2.0.8 features/server/templates/delete.feature
mirage-2.0.7 features/server/templates/delete.feature
mirage-2.0.6 features/server/templates/delete.feature
mirage-2.0.5 features/server/templates/delete.feature
mirage-2.0.4 features/server/templates/delete.feature