From 11fb7c5b0e57dab1e82eb46f25e6a6ed53360131 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Sun, 4 Nov 2007 05:18:13 +0000 Subject: [PATCH] Fixed #595, an error when creating a new action, context and project at the same time, from the new action form. Thanks to SK for the bug report. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@627 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/controllers/todos_controller.rb | 2 ++ .../create_new_todo_with_new_action_and_new_context.rsel | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 tracks/test/selenium/home/create_new_todo_with_new_action_and_new_context.rsel diff --git a/tracks/app/controllers/todos_controller.rb b/tracks/app/controllers/todos_controller.rb index 64f049db..767b72f6 100644 --- a/tracks/app/controllers/todos_controller.rb +++ b/tracks/app/controllers/todos_controller.rb @@ -92,6 +92,8 @@ class TodosController < ApplicationController end format.js do determine_down_count if @saved + @contexts = current_user.contexts.find(:all) if @new_context_created + @projects = current_user.projects.find(:all) if @new_project_created render :action => 'create' end format.xml do diff --git a/tracks/test/selenium/home/create_new_todo_with_new_action_and_new_context.rsel b/tracks/test/selenium/home/create_new_todo_with_new_action_and_new_context.rsel new file mode 100644 index 00000000..63a266d6 --- /dev/null +++ b/tracks/test/selenium/home/create_new_todo_with_new_action_and_new_context.rsel @@ -0,0 +1,9 @@ +setup :fixtures => :all +login :as => 'admin' +open "/" +assert_context_count_incremented do + type "todo_description", "tttt" + type "todo_project_name", "pppp" + type "todo_context_name", "cccc" + click "css=#todo-form-new-action .submit_box button" +end \ No newline at end of file