get edit a todo to pass

This commit is contained in:
Reinier Balt 2012-05-01 17:25:45 +02:00
parent d7aebf03a0
commit 28b7df87a8
6 changed files with 14 additions and 6 deletions

View file

@ -63,8 +63,8 @@ Given /^I have ([0-9]+) todos$/ do |count|
end
Given /^I have a todo with description "([^"]*)" in project "([^"]*)" with tags "([^"]*)" in the context "([^"]*)"$/ do |action_description, project_name, tags, context_name|
context = @current_user.contexts.find_or_create(:name => context_name)
project = @current_user.projects.find_or_create(:name => project_name)
context = @current_user.contexts.find_or_create_by_name(context_name)
project = @current_user.projects.find_or_create_by_name(project_name)
@todo = @current_user.todos.create!(:context_id => context.id, :project_id => project.id, :description => action_description)
@todo.tag_with(tags)
@todo.save

View file

@ -173,7 +173,7 @@ When /^I edit the tags of "([^"]*)" to "([^"]*)"$/ do |action_description, tags|
todo.should_not be_nil
open_edit_form_for(todo)
fill_in "tag_list", :with => tags
fill_in "todo_tag_list", :with => tags
submit_edit_todo_form(todo)
end