Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rails_helper'
- describe LineItem do
- it "test" do
- product1 = Product.new(price: 50)
- product2 = Product.new(price: 150)
- item1 = LineItem.new(product_id: product1, quantity: 1)
- item2 = LineItem.new(product_id: product2, quantity: 1)
- line_item = LineItem.new
- line_item.total_price == 200
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement