Sha256: 538d73041aced9ab79040486976b4d1e733ade2cd4dfdbe2c317281db3c17b00
Contents?: true
Size: 714 Bytes
Versions: 17
Compression:
Stored size: 714 Bytes
Contents
require 'rails_helper' RSpec.describe "withdraws/index", type: :view do fixtures :all before(:each) do assign(:withdraws, Kaminari::paginate_array([ stub_model(Withdraw, :item_id => 1, :created_at => Time.zone.now ), stub_model(Withdraw, :item_id => 1, :created_at => Time.zone.now ) ]).page(1)) basket = FactoryGirl.create(:basket) assign(:basket, basket) assign(:withdraw, basket.withdraws.new) view.stub(:current_user).and_return(User.friendly.find('enjuadmin')) end it "renders a list of withdraws" do allow(view).to receive(:policy).and_return double(destroy?: true) render assert_select "tr>td" end end
Version data entries
17 entries across 15 versions & 2 rubygems