Sha256: f8e0469503df6929aff7b863d8e2d7568f22d509e02d7e42b933cc543b2387e5

Contents?: true

Size: 1.16 KB

Versions: 102

Compression:

Stored size: 1.16 KB

Contents

Feature: Deals with HTTP error codes

  As a developer
  I want to be informed of non-successful responses
  Because sometimes thing explode
  And I should probably know what happened

  Scenario: A response of '404 - Not Found'
    Given a remote service that returns a 404 status code
    And that service is accessed at the path '/404_service.html'
    When I call HTTParty#get with '/404_service.html'
    Then it should return a response with a 404 response code

  Scenario: A response of '500 - Internal Server Error'
    Given a remote service that returns a 500 status code
    And that service is accessed at the path '/500_service.html'
    When I call HTTParty#get with '/500_service.html'
    Then it should return a response with a 500 response code

  Scenario: A non-successful response where I need the body
    Given a remote service that returns a 400 status code
    And the response from the service has a body of 'Bad response'
    And that service is accessed at the path '/400_service.html'
    When I call HTTParty#get with '/400_service.html'
    Then it should return a response with a 400 response code
    And the return value should match 'Bad response'

Version data entries

102 entries across 100 versions & 15 rubygems

Version Path
alloy_sdk-0.1.0 vendor/bundle/ruby/3.0.0/gems/httparty-0.13.1/features/deals_with_http_error_codes.feature
alloy_sdk-0.1.0 vendor/bundle/ruby/2.6.0/gems/httparty-0.13.1/features/deals_with_http_error_codes.feature
httparty-0.17.0 features/deals_with_http_error_codes.feature
httparty-0.16.4 features/deals_with_http_error_codes.feature
httparty-0.16.3 features/deals_with_http_error_codes.feature
httparty-0.16.2 features/deals_with_http_error_codes.feature
httparty-0.16.1 features/deals_with_http_error_codes.feature
httparty-0.16.0 features/deals_with_http_error_codes.feature
httparty-0.15.7 features/deals_with_http_error_codes.feature
httparty-0.15.6 features/deals_with_http_error_codes.feature
httparty-0.15.5 features/deals_with_http_error_codes.feature
httparty-0.15.4 features/deals_with_http_error_codes.feature
httparty-0.15.3 features/deals_with_http_error_codes.feature
httparty-0.15.2 features/deals_with_http_error_codes.feature
httparty-0.15.1 features/deals_with_http_error_codes.feature
httparty-0.15.0 features/deals_with_http_error_codes.feature
httparty-0.14.0 features/deals_with_http_error_codes.feature
simplenet-client-0.2.0 ./vendor/bundle/ruby/1.9.1/gems/httparty-0.13.7/features/deals_with_http_error_codes.feature
simplenet-client-0.2.0 ./vendor/bundle/ruby/2.0.0/gems/httparty-0.13.7/features/deals_with_http_error_codes.feature
httparty-0.13.7 features/deals_with_http_error_codes.feature