Sha256: 5c94a9d3bc3b85ee881af6ed5f606ae48081da8a94490ebf17b67b4d35c20066
Contents?: true
Size: 796 Bytes
Versions: 7
Compression:
Stored size: 796 Bytes
Contents
# frozen_string_literal: true require 'helper' require 'peddler/errors/parser' class TestPeddlerErrorsParser < MiniTest::Test def setup body = <<-XML <ErrorResponse> <Error> <Type>Foo</Type> <Code>Bar</Code> <Message>Baz</Message> </Error> <RequestID>123</RequestID> </ErrorResponse> XML res = OpenStruct.new( body: body, headers: { 'Content-Type' => 'text/xml', 'Content-Length' => body.size.to_s } ) @parser = Peddler::Errors::Parser.new(res) end def test_parses_data assert @parser.parse end def test_has_a_message assert @parser.message end def test_has_code assert @parser.code end def test_has_type assert @parser.type end end
Version data entries
7 entries across 7 versions & 1 rubygems