search for: test_add_product_to_report

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

2006 Jan 10
1
Can somebody explain when to reload an ActiveRecord
...he following test method in my controller_test which increment the ''qty'' attribute in a has_many association, ''sa_report_products''. The ''item_count'' method returns the sum of all qty''s in ''sa_report_products'': def test_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 =&...