Sha256: 2c5f82863bafa44c5fe6cf9786317f5e63ff469dcc6a4973e0c85a53d18f2624
Contents?: true
Size: 1.07 KB
Versions: 3
Compression:
Stored size: 1.07 KB
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' describe "import_requests/index" do fixtures :users before(:each) do assign(:import_requests, Kaminari::paginate_array([ stub_model(ImportRequest, :id => 1, :isbn => "1111111111", :created_at => Time.zone.now, :user_id => 1 ), stub_model(ImportRequest, :id => 2, :isbn => "1111111112", :created_at => Time.zone.now, :user_id => 2 ) ]).page(1)) end it "renders a list of import_requests" do allow(view).to receive(:policy).and_return double(destroy?: true) render # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "tr>td:nth-child(1)", text: "1" # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "tr>td:nth-child(2)", /admin\n 1111111111\n/ # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "tr>td:nth-child(3)", text: localized_state('pending') end end
Version data entries
3 entries across 3 versions & 1 rubygems