Sha256: 864cf08f7a2f0ae43e6dc06f5ed2974cad305e7d9c55e273a3617500bff02e4a
Contents?: true
Size: 1.13 KB
Versions: 1
Compression:
Stored size: 1.13 KB
Contents
require 'spec_helper' describe "manifestations/index" do fixtures :all before(:each) do @manifestations = assign(:manifestations, Kaminari.paginate_array( [ FactoryGirl.create(:manifestation), ], total_count: 1).page(1) ) @count = { query_result: 1 } @reservable_facet = @carrier_type_facet = @language_facet = @library_facet = @pub_year_facet = [] @index_agent = {} @seconds = 0 @max_number_of_results = 500 @ability = Object.new @ability.extend(CanCan::Ability) controller.stub(:current_ability) { @ability } view.stub(:params).and_return(ActionController::Parameters.new) end it "render works" do allow(view).to receive(:policy).and_return double(create?: true, update?: true) render expect( rendered ).to match(/1/) end it "render items for checkouts" do 3.times do |i| item = FactoryGirl.create( :item_for_checkout ) @manifestations.first.items << item end expect( @manifestations.first.items.size ).to eq 3 render #expect( rendered ).to have_selector( "div.holding_index tr td:first-child", count: 3, visible: false ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
enju_flower-0.1.2 | spec/views/manifestations/index.html.erb_spec.rb |