Sha256: b32021cdde4dca6a265e78a031b9bff31f5a429385490d055ad94b0f06ad7275
Contents?: true
Size: 698 Bytes
Versions: 21
Compression:
Stored size: 698 Bytes
Contents
require 'rails_helper' describe "accepts/index" do fixtures :all before(:each) do assign(:accepts, Kaminari::paginate_array([ stub_model(Accept, item_id: 1, created_at: Time.zone.now ), stub_model(Accept, item_id: 1, created_at: Time.zone.now ) ]).page(1)) basket = FactoryBot.create(:basket) assign(:basket, basket) assign(:accept, basket.accepts.new) end it "renders a list of accepts" do allow(view).to receive(:policy).and_return double(create?: true, destroy?: true) render # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "tr>td" end end
Version data entries
21 entries across 21 versions & 1 rubygems