File: supports_redirection.feature

package info (click to toggle)
ruby-httparty 0.13.7-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 736 kB
  • sloc: ruby: 4,741; xml: 425; sh: 35; makefile: 11
file content (22 lines) | stat: -rw-r--r-- 940 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Feature: Supports Redirection

  As a developer
  I want to work with services that may redirect me
  And I want it to follow a reasonable number of redirects
  Because sometimes web services do that

  Scenario: A service that redirects once
    Given a remote service that returns 'Service Response'
    And that service is accessed at the path '/landing_service.html'
    And the url '/redirector.html' redirects to '/landing_service.html'
    When I call HTTParty#get with '/redirector.html'
    Then the return value should match 'Service Response'

  # TODO: Look in to why this actually fails...
  Scenario: A service that redirects to a relative URL

  Scenario: A service that redirects infinitely
    Given the url '/first.html' redirects to '/second.html'
    And the url '/second.html' redirects to '/first.html'
    When I call HTTParty#get with '/first.html'
    Then it should raise an HTTParty::RedirectionTooDeep exception