summaryrefslogtreecommitdiffstats
path: root/test/unit/tracker_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-21 15:43:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-21 15:43:44 +0000
commit387836f8aa736eba4dfe0da879ad71bbc19dd224 (patch)
tree6ffbc47a0cb736113519c1d6a33d9c7997575bc6 /test/unit/tracker_test.rb
parent1f84a8d83ea8dce0285828a6f50d53b8893d868b (diff)
downloadredmine-387836f8aa736eba4dfe0da879ad71bbc19dd224.tar.gz
redmine-387836f8aa736eba4dfe0da879ad71bbc19dd224.zip
Fixed that settings raises an error if not trackers exist (#11467).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10067 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/tracker_test.rb')
-rw-r--r--test/unit/tracker_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/tracker_test.rb b/test/unit/tracker_test.rb
index e1b1663e8..64f1078d1 100644
--- a/test/unit/tracker_test.rb
+++ b/test/unit/tracker_test.rb
@@ -83,6 +83,11 @@ class TrackerTest < ActiveSupport::TestCase
assert_equal Tracker::CORE_FIELDS - %w(assigned_to_id due_date done_ratio), Tracker.disabled_core_fields(trackers)
end
+ def test_core_fields_should_return_all_fields_for_an_empty_argument
+ assert_equal Tracker::CORE_FIELDS, Tracker.core_fields([])
+ assert_equal [], Tracker.disabled_core_fields([])
+ end
+
def test_sort_should_sort_by_position
a = Tracker.new(:name => 'Tracker A', :position => 2)
b = Tracker.new(:name => 'Tracker B', :position => 1)