require 'rails_helper'

RSpec.describe Invoice, type: :model do
  describe "validations" do
    it { should validate_presence_of :customer_id}
    it { should validate_presence_of :merchant_id}
    it { should validate_presence_of :status}
  end

  describe "relationships" do
    it { should belong_to :customer}
    it { should belong_to :merchant }
    it { should have_many :invoice_items }
    it { should have_many(:items).through(:invoice_items) }
  end

  # need to mockn stub scope test. HOW?
end