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

Version Path
enju_purchase_request-0.1.1 spec/models/order_list_spec.rb
enju_purchase_request-0.1.0 spec/models/order_list_spec.rb
enju_purchase_request-0.1.0.pre15 spec/models/order_list_spec.rb
enju_purchase_request-0.1.0.pre14 spec/models/order_list_spec.rb
enju_purchase_request-0.1.0.pre13 spec/models/order_list_spec.rb
enju_purchase_request-0.1.0.pre12 spec/models/order_list_spec.rb
enju_purchase_request-0.1.0.pre11 spec/models/order_list_spec.rb
enju_purchase_request-0.1.0.pre10 spec/models/order_list_spec.rb