##// END OF EJS Templates
code layout clean up VersionTest...
Toshi MARUYAMA -
r11651:eeeada0773de
parent child
Show More
@@ -18,17 +18,20
18 18 require File.expand_path('../../test_helper', __FILE__)
19 19
20 20 class VersionTest < ActiveSupport::TestCase
21 fixtures :projects, :users, :issues, :issue_statuses, :trackers, :enumerations, :versions, :projects_trackers
21 fixtures :projects, :users, :issues, :issue_statuses, :trackers,
22 :enumerations, :versions, :projects_trackers
22 23
23 24 def test_create
24 v = Version.new(:project => Project.find(1), :name => '1.1', :effective_date => '2011-03-25')
25 v = Version.new(:project => Project.find(1), :name => '1.1',
26 :effective_date => '2011-03-25')
25 27 assert v.save
26 28 assert_equal 'open', v.status
27 29 assert_equal 'none', v.sharing
28 30 end
29 31
30 32 def test_invalid_effective_date_validation
31 v = Version.new(:project => Project.find(1), :name => '1.1', :effective_date => '99999-01-01')
33 v = Version.new(:project => Project.find(1), :name => '1.1',
34 :effective_date => '99999-01-01')
32 35 assert !v.valid?
33 36 v.effective_date = '2012-11-33'
34 37 assert !v.valid?
@@ -213,11 +216,13 class VersionTest < ActiveSupport::TestCase
213 216
214 217 # Project 1 now out of the shared scope
215 218 project_1_issue.reload
216 assert_equal nil, project_1_issue.fixed_version, "Fixed version is still set after changing the Version's sharing"
219 assert_equal nil, project_1_issue.fixed_version,
220 "Fixed version is still set after changing the Version's sharing"
217 221
218 222 # Project 5 now out of the shared scope
219 223 project_5_issue.reload
220 assert_equal nil, project_5_issue.fixed_version, "Fixed version is still set after changing the Version's sharing"
224 assert_equal nil, project_5_issue.fixed_version,
225 "Fixed version is still set after changing the Version's sharing"
221 226
222 227 # Project 2 issue remains
223 228 project_2_issue.reload
General Comments 0
You need to be logged in to leave comments. Login now