Sha256: 1badca479d7528ff2e9c7fd518b400fd11ecb1af6f78b4fb8758bc5e146b6450
Contents?: true
Size: 783 Bytes
Versions: 2
Compression:
Stored size: 783 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_parsing_data assert @parser.parse end def test_message assert @parser.message end def test_code assert @parser.code end def test_type assert @parser.type end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
peddler-2.1.1 | test/unit/peddler/errors/test_parser.rb |
peddler-2.1.0 | test/unit/peddler/errors/test_parser.rb |