Sha256: daa810a7dd982a0e5c1fcaae45f4e18febe7c4e14018d7ec09754a84e408f988

Contents?: true

Size: 1.02 KB

Versions: 27

Compression:

Stored size: 1.02 KB

Contents

require 'rails_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

27 entries across 27 versions & 1 rubygems

Version Path
enju_biblio-0.3.18 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.17 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.16 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.15 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.14 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.13 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.12 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.11 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.10 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.10.rc.3 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.10.rc.2 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.10.rc.1 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.9 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.4.0.rc.1 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.8 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.7 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.6 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.4.0.beta.2 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.4.0.beta.1 spec/views/import_requests/index.html.erb_spec.rb
enju_biblio-0.3.5 spec/views/import_requests/index.html.erb_spec.rb