add some more cucumber scenarios

This commit is contained in:
Reinier Balt 2011-04-21 16:54:35 +02:00
parent 423926337d
commit 31118d8c8c
5 changed files with 122 additions and 23 deletions

View file

@ -11,6 +11,14 @@ When /^I edit the context of "([^"]*)" to "([^"]*)"$/ do |context_old_name, cont
When "I change the context_name field of \"#{context_old_name}\" to \"#{context_new_name}\""
end
When /^I edit the description of "([^"]*)" to "([^"]*)"$/ do |action_description, new_description|
todo = @current_user.todos.find_by_description(action_description)
todo.should_not be_nil
open_edit_form_for(todo)
fill_in "todo_description", :with => new_description
submit_edit_todo_form(todo)
end
When /^I edit the due date of "([^"]*)" to tomorrow$/ do |action_description|
todo = @current_user.todos.find_by_description(action_description)
todo.should_not be_nil