##// END OF EJS Templates
Fixed: Issues associated with a locked version are not copied when copying a project (#11207)....
Fixed: Issues associated with a locked version are not copied when copying a project (#11207). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10334 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r8597:83e7ee6729cd
r10151:ff86c37ed330
Show More
custom_value_test.rb
39 lines | 1.5 KiB | text/x-ruby | RubyLexer
/ test / unit / custom_value_test.rb
Toshi MARUYAMA
remove trailing white-spaces from test/unit/custom_value_test.rb....
r6604 # Redmine - project management software
Jean-Philippe Lang
Extracts custom field values validation from CustomValue so that they can be validated globally from the customized object (#1189)....
r8597 # Copyright (C) 2006-2012 Jean-Philippe Lang
Jean-Philippe Lang
Added "Float" as a custom field format....
r857 #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
Toshi MARUYAMA
remove trailing white-spaces from test/unit/custom_value_test.rb....
r6604 #
Jean-Philippe Lang
Added "Float" as a custom field format....
r857 # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
Toshi MARUYAMA
remove trailing white-spaces from test/unit/custom_value_test.rb....
r6604 #
Jean-Philippe Lang
Added "Float" as a custom field format....
r857 # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Jean-Baptiste Barth
Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050...
r4395 require File.expand_path('../../test_helper', __FILE__)
Jean-Philippe Lang
Added "Float" as a custom field format....
r857
Eric Davis
Upgraded to Rails 2.3.4 (#3597)...
r2773 class CustomValueTest < ActiveSupport::TestCase
Jean-Philippe Lang
Fixes User/CustomValue association broken by r2869 (#3978)....
r2791 fixtures :custom_fields, :custom_values, :users
Jean-Philippe Lang
Added "Float" as a custom field format....
r857
Jean-Philippe Lang
Added default value for custom fields. Fixed javascript on custom field form for project and user custom fields....
r1076 def test_default_value
field = CustomField.find_by_default_value('Default string')
assert_not_nil field
Toshi MARUYAMA
remove trailing white-spaces from test/unit/custom_value_test.rb....
r6604
Jean-Philippe Lang
Added default value for custom fields. Fixed javascript on custom field form for project and user custom fields....
r1076 v = CustomValue.new(:custom_field => field)
assert_equal 'Default string', v.value
v = CustomValue.new(:custom_field => field, :value => 'Not empty')
assert_equal 'Not empty', v.value
end
Toshi MARUYAMA
remove trailing white-spaces from test/unit/custom_value_test.rb....
r6604
Jean-Philippe Lang
Fixes User/CustomValue association broken by r2869 (#3978)....
r2791 def test_sti_polymorphic_association
# Rails uses top level sti class for polymorphic association. See #3978.
assert !User.find(4).custom_values.empty?
assert !CustomValue.find(2).customized.nil?
end
Jean-Philippe Lang
Added "Float" as a custom field format....
r857 end