Sha256: a3a7abbd95361211c4227ebdfdc5dbb4cf570913d8b683c22bdf177f2dde26ad

Contents?: true

Size: 912 Bytes

Versions: 15

Compression:

Stored size: 912 Bytes

Contents

require 'spec_helper'

describe "use_restrictions/index" do
  fixtures :users, :roles, :user_has_roles

  before(:each) do
    view.extend EnjuLeaf::EnjuLeafHelper

    assign(:use_restrictions, Kaminari::paginate_array([
      stub_model(UseRestriction,
        :name => "Not For Loan",
        :display_name => "Not For Loan",
        :note => "MyText",
        :position => 1
      ),
      stub_model(UseRestriction,
        :name => "On Loan",
        :display_name => "On Loan",
        :note => "MyText",
        :position => 2
      )
    ]).page(1))
  end

  it "renders a list of use_restrictions" do
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td:nth-child(3)", /Not For Loan/
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td:nth-child(3)", /MyText/
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
enju_circulation-0.1.2 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.1 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre49 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre48 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre47 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre46 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre45 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre44 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre43 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre42 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre41 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre40 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre39 spec/views/use_restrictions/index.html.erb_spec.rb
enju_circulation-0.1.0.pre38 spec/views/use_restrictions/index.html.erb_spec.rb