Sha256: c80bd93f69045bac14d57c1156e09bce3c9bdab0250ef4dcf2e361fe956393b7

Contents?: true

Size: 1.21 KB

Versions: 12

Compression:

Stored size: 1.21 KB

Contents

Feature: manage redirect rules
  In order to be able to mock only part of api
  As a developer
  I want to redirect to real api if there are no doubles for requested fullpath

  Background:
    Given there are no redirect rules
    And there are no doubles

  Scenario: no redirect rules
    When I request "/api/something"
    Then I should get 404

  Scenario: add redirect rule
    When I register redirect with pattern "^/api" and uri "http://real.api.co.uk"
    And I request "/api/something"
    Then it should redirect to "http://real.api.co.uk/api/something"

  Scenario: add second redirect that match the same request
    When I register redirect with pattern "/api/something" and uri "http://real.api.co.uk"
    And I register redirect with pattern "/api/some.*" and uri "http://real.com"
    And I request "/api/something"
    Then it should redirect to "http://real.api.co.uk/api/something"

  Scenario: add second redirect that does not match the same request
    When I register redirect with pattern "/api/something" and uri "http://real.api.co.uk"
    And I register redirect with pattern "/api/some" and uri "http://real.com"
    And I request "/api/someth"
    Then it should redirect to "http://real.com/api/someth"

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rest-assured-0.2.0.rc8 features/redirect_rules_via_api.feature
rest-assured-0.2.0.rc7 features/redirect_rules_via_api.feature
rest-assured-0.2.0.rc5 features/redirect_rules_via_api.feature
rest-assured-0.2.0.rc4 features/redirect_rules_via_api.feature
rest-assured-0.2.0.rc3 features/redirect_rules_via_api.feature
rest-assured-0.2.0.rc2 features/redirect_rules_via_api.feature
rest-assured-0.2.0.rc1 features/redirect_rules_via_api.feature
rest-assured-0.1.4 features/redirect_rules_via_api.feature
rest-assured-0.1.3 features/redirect_rules_via_api.feature
rest-assured-0.1.2 features/redirect_rules_via_api.feature
rest-assured-0.1.1 features/redirect_rules_via_api.feature
rest-assured-0.1.0 features/redirect_rules_via_api.feature