Sha256: aa8772d555893fb664616ee877b5a8d90764cae71e7d6287fd161e019b7fd75d

Contents?: true

Size: 890 Bytes

Versions: 3

Compression:

Stored size: 890 Bytes

Contents

# frozen_string_literal: true

require_relative '../test_helper'

module Excon
  # ResourceObjectTest
  #
  # Validate the workings of `Excon::HyperResource::ResourceObject`.
  #
  class ResponseTest < HyperMediaTest
    def response
      @response ||= Excon.get('https://example.org/product/bicycle')
    end

    def test_response
      assert_equal Excon::Response, response.class
    end

    def test_links
      assert_equal response.resource._links, response.links
      assert_equal response.resource._links, response._links
    end

    def test_embedded
      assert_equal response.resource._embedded, response.embedded
      assert_equal response.resource._embedded, response._embedded
    end

    def test_properties
      assert_equal response.resource._properties, response.properties
      assert_equal response.resource._properties, response._properties
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
excon-hypermedia-0.5.2 test/excon/response_test.rb
excon-hypermedia-0.5.1 test/excon/response_test.rb
excon-hypermedia-0.5.0 test/excon/response_test.rb