Advertisement
Guest User

line_items_spec.rb

a guest
Feb 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.34 KB | None | 0 0
  1. require 'rails_helper'
  2.  
  3. describe  LineItem do
  4.   it "test" do
  5.     product1 = Product.new(price: 50)
  6.     product2 = Product.new(price: 150)
  7.  
  8.     item1 = LineItem.new(product_id: product1, quantity: 1)
  9.     item2 = LineItem.new(product_id: product2, quantity: 1)
  10.  
  11.     line_item = LineItem.new
  12.     line_item.total_price == 200
  13.   end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement