diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-10 17:38:17 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-10 17:38:17 +0000 |
commit | 83bcc1f043511d85414ca3cafc1e10dc84b9da24 (patch) | |
tree | ad4f5fb681005732796c43266467c2e59228db79 /test/test_helper.rb | |
parent | b0013d9f68a0ce4347f568b7f8809ea8ef9f1d8b (diff) | |
download | redmine-83bcc1f043511d85414ca3cafc1e10dc84b9da24.tar.gz redmine-83bcc1f043511d85414ca3cafc1e10dc84b9da24.zip |
Adds a setting to allow subtasks to belong to other projects (#5487).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10587 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 12e70b9bf..66a6f2646 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -156,6 +156,14 @@ class ActiveSupport::TestCase hs end + def assert_save(object) + saved = object.save + message = "#{object.class} could not be saved" + errors = object.errors.full_messages.map {|m| "- #{m}"} + message << ":\n#{errors.join("\n")}" if errors.any? + assert_equal true, saved, message + end + def assert_error_tag(options={}) assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options)) end |