Sha256: a81380c399ad9ddf37416f63a04034ce4165f6c3eb5f1f3b9cdc6c430980e772
Contents?: true
Size: 703 Bytes
Versions: 4
Compression:
Stored size: 703 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.find('admin')) 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
4 entries across 4 versions & 1 rubygems