Sha256: c34d4bf2db17e280586761c95d2e57b794746e928ad513f08793ea2d68de377f

Contents?: true

Size: 1.2 KB

Versions: 24

Compression:

Stored size: 1.2 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

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

  Scenario: add redirect rule
    Given blank slate
    When I create redirect from "^/api/(.*)" to "http://example.com/\1"
    And I request "/api/something"
    Then it should redirect to "http://example.com/something"

  Scenario: add second redirect that match the same request
    Given there is redirect from "/api/something" to "http://example.com"
    When I create redirect from "/api/some.*" to "http://real.com"
    And I request "/api/something"
    Then it should redirect to "http://example.com/"

  Scenario: add second redirect that does not match the same request
    Given there is redirect from "/api/thing" to "http://real.com"
    When I create redirect from "/api/some.*" to "http://example.com"
    And I request "/api/something"
    Then it should redirect to "http://example.com/"

  Scenario: clear redirects
    Given there are some redirects
    When I delete all redirects
    Then there should be no redirects

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rest-assured-4.0.0 features/rest_api/redirects.feature
rest-assured-3.0.1 features/rest_api/redirects.feature
rest-assured-3.0.0 features/rest_api/redirects.feature
rest-assured-2.2.0 features/rest_api/redirects.feature
rest-assured-2.1.0 features/rest_api/redirects.feature
rest-assured-2.0.2 features/rest_api/redirects.feature
rest-assured-2.0.1 features/rest_api/redirects.feature
rest-assured-2.0.0 features/rest_api/redirects.feature
rest-assured-1.2.2 features/rest_api/redirects.feature
rest-assured-1.2.1 features/rest_api/redirects.feature
rest-assured-1.2.0 features/rest_api/redirects.feature
rest-assured-1.1.10 features/rest_api/redirects.feature
rest-assured-1.1.9 features/rest_api/redirects.feature
rest-assured-1.1.8 features/rest_api/redirects.feature
rest-assured-1.1.7 features/rest_api/redirects.feature
rest-assured-1.1.6 features/rest_api/redirects.feature
rest-assured-1.1.5 features/rest_api/redirects.feature
rest-assured-1.1.4 features/rest_api/redirects.feature
rest-assured-1.1.3 features/rest_api/redirects.feature
rest-assured-1.1.2 features/rest_api/redirects.feature