Sha256: 6272042e628aef14f2c706a8a7b64727e962725b4f9fb6ec0519e6b98583b495
Contents?: true
Size: 791 Bytes
Versions: 8
Compression:
Stored size: 791 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' describe OrderList do fixtures :all it "should calculate total price" do order_list = order_lists(:order_list_00001) order_list.total_price.should eq 0 order_list.purchase_requests << purchase_requests(:purchase_request_00006) order_list.total_price.should eq purchase_requests(:purchase_request_00006).price end end # == Schema Information # # Table name: order_lists # # id :integer not null, primary key # user_id :integer not null # bookstore_id :integer not null # title :text not null # note :text # ordered_at :datetime # deleted_at :datetime # created_at :datetime not null # updated_at :datetime not null #
Version data entries
8 entries across 8 versions & 1 rubygems