Skip to content

Commit

Permalink
fixed time edit test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltreger committed May 15, 2012
1 parent 0906987 commit 12e0ef1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions spec/views/time_edits/index.html.haml_spec.rb
Expand Up @@ -2,17 +2,21 @@

describe "time_edits/index" do
before(:each) do
Lab.create(:name=>"lab", :initials=>"l", :max_employees=>2, :min_employees=>1)
User.create!(:name => "Jim", :activated => true, :initials => "J")
assign(:time_edits, [
stub_model(TimeEdit,
:user_id => 1,
:duration => 2,
:lab_id => 3,
:lab_id => 1,
:start_time=>Time.now,
:comment => "Comment"
),
stub_model(TimeEdit,
:user_id => 1,
:duration => 2,
:lab_id => 3,
:lab_id => 1,
:start_time=>Time.now,
:comment => "Comment"
)
])
Expand All @@ -21,11 +25,11 @@
it "renders a list of time_edits" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => 1.to_s, :count => 2
assert_select "tr>td", :text => "J", :count => 2
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => 2.to_s, :count => 2
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => 3.to_s, :count => 2
assert_select "tr>td", :text => "l", :count => 2
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "tr>td", :text => "Comment".to_s, :count => 2
end
Expand Down

0 comments on commit 12e0ef1

Please sign in to comment.