Sha256: d682ae56a36e3f4c69dc42cc2e3e775646168d862758d979014fa65768a74704
Contents?: true
Size: 896 Bytes
Versions: 2
Compression:
Stored size: 896 Bytes
Contents
require 'parser_helper' require 'mws/orders/parsers/service_status' class OrdersServiceStatusParserTest < ParserTest def setup node = fixture('orders/service_status').xpath('//xmlns:GetServiceStatusResult').first @service_status = MWS::Orders::Parsers::ServiceStatus.new(node) end def test_status assert_kind_of String, @service_status.status end def test_timestamp assert_kind_of Time, @service_status.timestamp end def test_message_id assert_kind_of String, @service_status.message_id end def test_messages assert_kind_of Array, @service_status.messages end def test_ok? @service_status.stub(:status, 'GREEN') do assert @service_status.ok? end @service_status.stub(:status, 'RED') do refute @service_status.ok? end end def test_inspect assert_equal @service_status.status, @service_status.to_s end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
peddler-0.6.5 | test/mws/orders/parsers/test_service_status.rb |
peddler-0.6.4 | test/mws/orders/parsers/test_service_status.rb |