summaryrefslogtreecommitdiffstats
path: root/test/functional/custom_fields_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-17 08:41:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-17 08:41:30 +0000
commit48295a6c4b9ac47263631b653153743b43afdf66 (patch)
tree7f6e0207773017c25f68caf1019ce6f78de83fcc /test/functional/custom_fields_controller_test.rb
parent5ed2e78ae2abc249c410665f65b1ed9e84c4d6c5 (diff)
downloadredmine-48295a6c4b9ac47263631b653153743b43afdf66.tar.gz
redmine-48295a6c4b9ac47263631b653153743b43afdf66.zip
CustomFieldsController refactoring.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2273 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/custom_fields_controller_test.rb')
-rw-r--r--test/functional/custom_fields_controller_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb
index d77bad527..c37368da2 100644
--- a/test/functional/custom_fields_controller_test.rb
+++ b/test/functional/custom_fields_controller_test.rb
@@ -22,7 +22,7 @@ require 'custom_fields_controller'
class CustomFieldsController; def rescue_action(e) raise e end; end
class CustomFieldsControllerTest < Test::Unit::TestCase
- fixtures :custom_fields, :trackers
+ fixtures :custom_fields, :trackers, :users
def setup
@controller = CustomFieldsController.new
@@ -53,4 +53,9 @@ class CustomFieldsControllerTest < Test::Unit::TestCase
assert_equal ["0.1", "0.2"], field.possible_values
assert_equal 1, field.trackers.size
end
+
+ def test_invalid_custom_field_class_should_redirect_to_list
+ get :new, :type => 'UnknownCustomField'
+ assert_redirected_to '/custom_fields/list'
+ end
end