Merge pull request #82 from maddentim/fixes

Some fixes
This commit is contained in:
Reinier Balt 2012-06-27 14:46:11 -07:00
commit 0a7c19ab39
11 changed files with 23 additions and 24 deletions

View file

@ -49,7 +49,7 @@ class TodosControllerTest < ActionController::TestCase
assert_difference 'Todo.count' do
put :create, :_source_view => 'todo', "context_name"=>"library", "project_name"=>"Build a working time machine", "todo"=>{
"notes"=>"", "description"=>"test tags", "due"=>"30/11/2006"},
"todo_tag_list"=>"1234,5667,9876"
"tag_list"=>"1234,5667,9876"
# default has_many_polymorphs will fail on these high numbers as tags with those id's do not exist
end
t = assigns['todo']
@ -63,7 +63,7 @@ class TodosControllerTest < ActionController::TestCase
assert_difference 'Todo.count' do
put :create, :_source_view => 'todo', "context_name"=>"library", "project_name"=>"Build a working time machine", "todo"=>{
"notes"=>"", "description"=>"test tags", "due"=>"30/11/2006"},
"todo_tag_list"=>"a,,b"
"tag_list"=>"a,,b"
# default has_many_polymorphs will fail on the empty tag
end
t = assigns['todo']

View file

@ -34,7 +34,7 @@ class TodoCreateParamsHelperTest < ActiveSupport::TestCase
end
def test_tag_list_accessor
params = { 'todo' => { }, 'todo_tag_list' => 'foo, bar'}
params = { 'todo' => { }, 'tag_list' => 'foo, bar'}
prefs = users(:admin_user).prefs
params_helper = TodosController::TodoCreateParamsHelper.new(params, prefs)
assert_equal('foo, bar', params_helper.tag_list)
@ -133,4 +133,4 @@ class TodoCreateParamsHelperTest < ActiveSupport::TestCase
assert_equal false, params_helper.context_specified_by_name?
end
end
end