Sha256: 32fbb2cf62fb9cb374166edda34319e4c8bf2776b26b6ffadc7d5fc9db5fb6d3
Contents?: true
Size: 676 Bytes
Versions: 2
Compression:
Stored size: 676 Bytes
Contents
require 'spec_helper' module Plutus describe ReportsController do routes { Plutus::Engine.routes } def mock_entry(stubs={}) @mock_entry ||= FactoryGirl.create(:entry_with_credit_and_debit) end describe "GET balance_sheet" do it "renders when one entry exists" do allow(Entry).to receive_message_chain(:order).and_return([mock_entry]) get :balance_sheet assert_template 'reports/balance_sheet' end it "renders when no entries exist" do allow(Entry).to receive_message_chain(:order).and_return([]) get :balance_sheet assert_template 'reports/balance_sheet' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
plutus-0.17 | spec/controllers/reports_controller_spec.rb |
plutus-0.16 | spec/controllers/reports_controller_spec.rb |