Sha256: b717b4f738c641a31179b9270fb93df85f11561c8c639c8680f44410f67f0ac9

Contents?: true

Size: 724 Bytes

Versions: 9

Compression:

Stored size: 724 Bytes

Contents

require 'spec_helper'

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

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

    assign(:reserves, Reserve.page(1))
    view.stub(:current_user).and_return(User.where(username: 'enjuadmin').first)
  end

  it "renders a list of reserves" do
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td:nth-child(1)", :text => reserves(:reserve_00001).id.to_s
    assert_select "tr>td:nth-child(2)", :text => /#{reserves(:reserve_00001).user.username}/
    assert_select "tr>td:nth-child(2)", :text => /#{reserves(:reserve_00002).manifestation.original_title}/
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
enju_circulation-0.1.0.pre47 spec/views/reserves/index.html.erb_spec.rb
enju_circulation-0.1.0.pre46 spec/views/reserves/index.html.erb_spec.rb
enju_circulation-0.1.0.pre45 spec/views/reserves/index.html.erb_spec.rb
enju_circulation-0.1.0.pre44 spec/views/reserves/index.html.erb_spec.rb
enju_circulation-0.1.0.pre43 spec/views/reserves/index.html.erb_spec.rb
enju_circulation-0.1.0.pre42 spec/views/reserves/index.html.erb_spec.rb
enju_circulation-0.1.0.pre41 spec/views/reserves/index.html.erb_spec.rb
enju_circulation-0.1.0.pre40 spec/views/reserves/index.html.erb_spec.rb
enju_circulation-0.1.0.pre39 spec/views/reserves/index.html.erb_spec.rb