Add more fields to workout
This commit is contained in:
parent
6b377a577e
commit
1fc9dda21f
9 changed files with 57 additions and 5 deletions
|
@ -3,5 +3,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :workout do
|
||||
date Time.now
|
||||
day_type { %w(heavy medium light).sample }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue