Sha256: aa44de43e47320b5c39d3881f5bf6fb7cfd7868ba326e0a5d3d98abc65a4652f
Contents?: true
Size: 1008 Bytes
Versions: 62
Compression:
Stored size: 1008 Bytes
Contents
require 'test_helper' module Workarea class Fulfillment class PackageTest < TestCase def test_create events = [ Event.new( status: 'shipped', quantity: 1, data: { 'tracking_number' => '1z1' } ), Event.new( status: 'shipped', quantity: 1, data: { 'tracking_number' => '1z2' } ), Event.new( status: 'canceled', quantity: 1 ), Event.new( status: 'shipped', quantity: 1, data: {} ), Event.new( status: 'shipped', quantity: 1, data: {} ), ] result = Package.create(events) assert_equal(3, result.length) assert_equal('1z1', result.first.tracking_number) assert_equal('1z2', result.second.tracking_number) assert_nil(result.third.tracking_number) end end end end
Version data entries
62 entries across 62 versions & 1 rubygems
Version | Path |
---|---|
workarea-core-3.4.13 | test/models/workarea/fulfillment/package_test.rb |
workarea-core-3.4.12 | test/models/workarea/fulfillment/package_test.rb |