Add more fields to workout

This commit is contained in:
Andrew Tomaka 2013-08-10 22:15:26 -04:00
parent 6b377a577e
commit 1fc9dda21f
9 changed files with 57 additions and 5 deletions

View file

@ -3,5 +3,6 @@
FactoryGirl.define do
factory :workout do
date Time.now
day_type { %w(heavy medium light).sample }
end
end

View file

@ -63,6 +63,7 @@ describe "Workouts" do
click_link 'Create'
fill_in 'Date', :with => Date.today
select 'Heavy', :from => 'Day type'
click_button 'Create Workout'
page.should have_content 'Workout created'
@ -83,6 +84,7 @@ describe "Workouts" do
visit workouts_path
click_link 'Create'
fill_in 'Date', :with => '2013-13-13'
select 'Heavy', :from => 'Day type'
click_button 'Create Workout'
page.should have_content "Date is not a valid date"