Sha256: 53436f09ce661bbd85fc7d2b9f0ed53226a81de6abf9fffd49f33d54d38a1f23
Contents?: true
Size: 657 Bytes
Versions: 1
Compression:
Stored size: 657 Bytes
Contents
require 'spec_helper' module Plutus describe ReportsController do routes { Plutus::Engine.routes } def mock_entry(stubs={}) @mock_entry ||= FactoryBot.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 expect(response).to be_success end it "renders when no entries exist" do allow(Entry).to receive_message_chain(:order).and_return([]) get :balance_sheet expect(response).to be_success end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tyche-0.14 | spec/controllers/reports_controller_spec.rb |