search for: new_product_item_qty

Displaying 1 result from an estimated 1 matches for "new_product_item_qty".

2006 Jan 10
1
Can somebody explain when to reload an ActiveRecord
...t_add_product_to_report sa_rpt = SaReport.find(1) assert_equal 3, c = sa_rpt.item_count, ''initial count is 3'' assert_equal 2, sa_rpt.sa_report_products[0].qty, ''initial qty is 2'' post :add_item, :id => sa_rpt.id, :new_product_item_id => 1, :new_product_item_qty => 3 sa_rpt.reload # MUST HAVE THIS TO WORK, WHY?? assert_equal 2, sa_rpt.sa_report_products.length, ''still have 2 item lines'' assert_equal 5, sa_rpt.sa_report_products[0].qty, ''3 added'' sa_rpt.update assert_equal c + 3, sa_rpt.item_count...