From 72accf038cacd319fd706d1565776cb178eabaef Mon Sep 17 00:00:00 2001 From: lrbalt Date: Wed, 13 Feb 2008 14:04:42 +0000 Subject: [PATCH] add test to check on correct parsing of multiple tags. Related to previous commit git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@709 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/test/functional/todos_controller_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tracks/test/functional/todos_controller_test.rb b/tracks/test/functional/todos_controller_test.rb index 57d895dd..a3c27859 100644 --- a/tracks/test/functional/todos_controller_test.rb +++ b/tracks/test/functional/todos_controller_test.rb @@ -156,6 +156,15 @@ class TodosControllerTest < Test::Rails::TestCase t = Todo.find(1) assert_equal true, t.tag_list.empty? end + + def test_update_todo_tags_with_whitespace + t = Todo.find(1) + login_as(:admin_user) + taglist = " one , two,three ,four" + xhr :post, :update, :id => 1, :_source_view => 'todo', "todo"=>{"context_id"=>"1", "project_id"=>"2", "id"=>"1", "notes"=>"", "description"=>"Call Warren Buffet to find out how much he makes per day", "due"=>"30/11/2006"}, "tag_list"=>taglist + t = Todo.find(1) + assert_equal "one, two, three, four", t.tag_list + end def test_find_tagged_with login_as(:admin_user)