diff --git a/app/views/workouts/index.html.erb b/app/views/workouts/index.html.erb index e7d8549..5ec41c6 100644 --- a/app/views/workouts/index.html.erb +++ b/app/views/workouts/index.html.erb @@ -1,5 +1,5 @@ diff --git a/spec/factories/workouts.rb b/spec/factories/workouts.rb index 25c7c34..654d45d 100644 --- a/spec/factories/workouts.rb +++ b/spec/factories/workouts.rb @@ -2,6 +2,6 @@ FactoryGirl.define do factory :workout do - date "2013-08-04 20:31:21" + date Time.now end end diff --git a/spec/features/workouts_spec.rb b/spec/features/workouts_spec.rb index 04321c9..f249aee 100644 --- a/spec/features/workouts_spec.rb +++ b/spec/features/workouts_spec.rb @@ -18,6 +18,14 @@ describe "Workouts" do end describe "GET /workouts/(:id)" do + it "should visit a workout" do + visit workouts_path + click_link @workout.date + + current_path.should == workout_path(@workout.id) + page.should have_content @workout.date + end + it "should return 200" do visit "#{workouts_path}/#{@workout.id}" page.status_code.should be 200