Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Inventory Unit Test
- require 'test_helper'
- class InventoryTest < ActiveSupport::TestCase
- should_belong_to :product
- should_belong_to :warehouse
- context "Inventory" do
- setup do
- @inventory = inventories(:nashville_bct30ma)
- end
- should "have a quantity on hand" do
- assert_equal 100, @inventory.quantity_on_hand
- assert_equal @inventory.product.model, products(:bct30ma).model
- end
- end
- end
- ## Inventory Fixture
- nashville_bct30ma:
- warehouse: nashville
- product: bct30ma
- quantity_on_hand: 100
- ## Product Fixture
- bct30ma:
- id: 1
- model: BCT30MA//F
- internal_reference: VSP-BCT-30MA
- brand_id: 1
- classification_id: 1
- permalink: sony-bct-30ma
- weight: 0.68
- state: active
- invoice_description: "Really popular Betacam tape."
- text_description: "Really popular Betacam tape."
Add Comment
Please, Sign In to add comment