Sha256: ffe22249f97d7594dad2ef3813ca9be239d66ca957ff8bd829abbfe4462983e9
Contents?: true
Size: 923 Bytes
Versions: 1
Compression:
Stored size: 923 Bytes
Contents
require_relative 'test_helper' class PoLineTest < Skr::TestCase def test_creation po = skr_purchase_orders(:first) skuloc = skr_sku_locs(:hatdefault) pol = po.lines.build({ sku_loc: skuloc, description: 'a test item', uom_code: 'EA', uom_size: 1, price: 33.3 }) assert_saves pol end def test_recieving line = skr_po_lines(:second_on_first) line.qty_received = 1 assert_saves line line.reload assert_equal 0, line.qty_received, "qty received saved, even though it should be locked" line.unlock_fields( :qty_received ) do line.qty_received = 33 assert_saves line end line.reload assert_equal 33, line.qty_received line.qty_received = 3 assert_saves line line.reload assert_equal 33, line.qty_received end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stockor-core-0.2 | test/po_line_test.rb |