Sha256: 10c0c1910bf2a0a3bf007abf42e1626fcd0834468d644647a07bcb4bdff53a59

Contents?: true

Size: 525 Bytes

Versions: 3

Compression:

Stored size: 525 Bytes

Contents

require 'test_helper'

class RESTResponseTest < Minitest::Test

  def setup
    @http_response = mock
    @http_response.stubs(body: 'result.a=123&result.b.c=456&result.camelCase=789')
    @response = Adyen::REST::Response.new(@http_response, prefix: 'result')
  end

  def test_getting_attributes
    assert_equal '123', @response[:a]
    assert_equal '123', @response['a']
    assert_equal '123', @response['result.a']
    assert_equal '789', @response['camelCase']
    assert_equal '789', @response[:camel_case]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adyen-2.0.0 test/rest_response_test.rb
adyen-2.0.0.pre2 test/rest_response_test.rb
adyen-2.0.0.pre1 test/rest_response_test.rb