File: handles_compressed_responses.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 (27 lines) | stat: -rw-r--r-- 1,172 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Feature: Handles Compressed Responses

  In order to save bandwidth
  As a developer
  I want to uncompress compressed responses

  Scenario: Supports deflate encoding
    Given a remote deflate service
    And the response from the service has a body of '<h1>Some HTML</h1>'
    And that service is accessed at the path '/deflate_service.html'
    When I call HTTParty#get with '/deflate_service.html'
    Then the return value should match '<h1>Some HTML</h1>'

  Scenario: Supports gzip encoding
    Given a remote gzip service
    And the response from the service has a body of '<h1>Some HTML</h1>'
    And that service is accessed at the path '/gzip_service.html'
    When I call HTTParty#get with '/gzip_service.html'
    Then the return value should match '<h1>Some HTML</h1>'

  Scenario: Supports HEAD request with gzip encoding
    Given a remote gzip service
    And that service is accessed at the path '/gzip_head.gz.js'
    When I call HTTParty#head with '/gzip_head.gz.js'
    Then it should return a response with a 200 response code
    Then it should return a response with a gzip content-encoding
    Then it should return a response with a blank body