Sha256: d0fd02f4f05cbad19c3e33b5014ff8d56f4fe83eb2d9604737a511b58b26cdd0

Contents?: true

Size: 477 Bytes

Versions: 4

Compression:

Stored size: 477 Bytes

Contents

require 'spec_helper'

module Borutus
  describe EntriesController do
    routes { Borutus::Engine.routes }

    def mock_entry(stubs={})
      @mock_entry ||= FactoryBot.create(:entry_with_credit_and_debit)
    end

    describe "GET index" do
      it "assigns all entries as @entries" do
        allow(Entry).to receive_message_chain(:per, :order).and_return([mock_entry])
        get :index
        expect(assigns[:entries]).to eq([mock_entry])
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
borutus-1.0.0 spec/controllers/entries_controller_spec.rb
borutus-0.2.4 spec/controllers/entries_controller_spec.rb
borutus-0.2.3 spec/controllers/entries_controller_spec.rb
borutus-0.2.2 spec/controllers/entries_controller_spec.rb