@@ -209,7 +209,7 class ProjectsControllerTest < ActionController::TestCase | |||||
209 | assert_response :success |
|
209 | assert_response :success | |
210 | project = assigns(:project) |
|
210 | project = assigns(:project) | |
211 | assert_kind_of Project, project |
|
211 | assert_kind_of Project, project | |
212 |
assert_not_ |
|
212 | assert_not_equal [], project.errors[:parent_id] | |
213 | end |
|
213 | end | |
214 |
|
214 | |||
215 | test "#create by non-admin user with add_subprojects permission should create a project with a parent_id" do |
|
215 | test "#create by non-admin user with add_subprojects permission should create a project with a parent_id" do | |
@@ -244,7 +244,7 class ProjectsControllerTest < ActionController::TestCase | |||||
244 | assert_response :success |
|
244 | assert_response :success | |
245 | project = assigns(:project) |
|
245 | project = assigns(:project) | |
246 | assert_kind_of Project, project |
|
246 | assert_kind_of Project, project | |
247 |
assert_not_ |
|
247 | assert_not_equal [], project.errors[:parent_id] | |
248 | end |
|
248 | end | |
249 |
|
249 | |||
250 | test "#create by non-admin user with add_subprojects permission should fail with unauthorized parent_id" do |
|
250 | test "#create by non-admin user with add_subprojects permission should fail with unauthorized parent_id" do | |
@@ -265,7 +265,7 class ProjectsControllerTest < ActionController::TestCase | |||||
265 | assert_response :success |
|
265 | assert_response :success | |
266 | project = assigns(:project) |
|
266 | project = assigns(:project) | |
267 | assert_kind_of Project, project |
|
267 | assert_kind_of Project, project | |
268 |
assert_not_ |
|
268 | assert_not_equal [], project.errors[:parent_id] | |
269 | end |
|
269 | end | |
270 |
|
270 | |||
271 | def test_create_subproject_with_inherit_members_should_inherit_members |
|
271 | def test_create_subproject_with_inherit_members_should_inherit_members |
@@ -93,7 +93,7 class AttachmentTest < ActiveSupport::TestCase | |||||
93 | def test_description_length_should_be_validated |
|
93 | def test_description_length_should_be_validated | |
94 | a = Attachment.new(:description => 'a' * 300) |
|
94 | a = Attachment.new(:description => 'a' * 300) | |
95 | assert !a.save |
|
95 | assert !a.save | |
96 |
assert_not_ |
|
96 | assert_not_equal [], a.errors[:description] | |
97 | end |
|
97 | end | |
98 |
|
98 | |||
99 | def test_destroy |
|
99 | def test_destroy |
@@ -57,7 +57,7 class IssueNestedSetTest < ActiveSupport::TestCase | |||||
57 | child = Issue.new(:project_id => 2, :tracker_id => 1, :author_id => 1, |
|
57 | child = Issue.new(:project_id => 2, :tracker_id => 1, :author_id => 1, | |
58 | :subject => 'child', :parent_issue_id => issue.id) |
|
58 | :subject => 'child', :parent_issue_id => issue.id) | |
59 | assert !child.save |
|
59 | assert !child.save | |
60 |
assert_not_ |
|
60 | assert_not_equal [], child.errors[:parent_issue_id] | |
61 | end |
|
61 | end | |
62 |
|
62 | |||
63 | def test_move_a_root_to_child |
|
63 | def test_move_a_root_to_child | |
@@ -163,7 +163,7 class IssueNestedSetTest < ActiveSupport::TestCase | |||||
163 | child.reload |
|
163 | child.reload | |
164 | child.parent_issue_id = grandchild.id |
|
164 | child.parent_issue_id = grandchild.id | |
165 | assert !child.save |
|
165 | assert !child.save | |
166 |
assert_not_ |
|
166 | assert_not_equal [], child.errors[:parent_issue_id] | |
167 | end |
|
167 | end | |
168 |
|
168 | |||
169 | def test_destroy_should_destroy_children |
|
169 | def test_destroy_should_destroy_children |
@@ -115,7 +115,7 class IssueRelationTest < ActiveSupport::TestCase | |||||
115 | :relation_type => IssueRelation::TYPE_PRECEDES |
|
115 | :relation_type => IssueRelation::TYPE_PRECEDES | |
116 | ) |
|
116 | ) | |
117 | assert !r.save |
|
117 | assert !r.save | |
118 |
assert_not_ |
|
118 | assert_not_equal [], r.errors[:base] | |
119 | end |
|
119 | end | |
120 |
|
120 | |||
121 | def test_validates_circular_dependency_of_subtask |
|
121 | def test_validates_circular_dependency_of_subtask | |
@@ -166,7 +166,7 class IssueRelationTest < ActiveSupport::TestCase | |||||
166 | :relation_type => IssueRelation::TYPE_BLOCKED |
|
166 | :relation_type => IssueRelation::TYPE_BLOCKED | |
167 | ) |
|
167 | ) | |
168 | assert !r.save |
|
168 | assert !r.save | |
169 |
assert_not_ |
|
169 | assert_not_equal [], r.errors[:base] | |
170 | end |
|
170 | end | |
171 |
|
171 | |||
172 | def test_create_should_make_journal_entry |
|
172 | def test_create_should_make_journal_entry |
@@ -490,7 +490,7 class IssueTest < ActiveSupport::TestCase | |||||
490 | issue.tracker_id = 2 |
|
490 | issue.tracker_id = 2 | |
491 | issue.subject = 'New subject' |
|
491 | issue.subject = 'New subject' | |
492 | assert !issue.save |
|
492 | assert !issue.save | |
493 |
assert_not_ |
|
493 | assert_not_equal [], issue.errors[:tracker_id] | |
494 | end |
|
494 | end | |
495 |
|
495 | |||
496 | def test_category_based_assignment |
|
496 | def test_category_based_assignment | |
@@ -1045,7 +1045,7 class IssueTest < ActiveSupport::TestCase | |||||
1045 | :status_id => 1, :fixed_version_id => 1, |
|
1045 | :status_id => 1, :fixed_version_id => 1, | |
1046 | :subject => 'New issue') |
|
1046 | :subject => 'New issue') | |
1047 | assert !issue.save |
|
1047 | assert !issue.save | |
1048 |
assert_not_ |
|
1048 | assert_not_equal [], issue.errors[:fixed_version_id] | |
1049 | end |
|
1049 | end | |
1050 |
|
1050 | |||
1051 | def test_should_not_be_able_to_assign_a_new_issue_to_a_locked_version |
|
1051 | def test_should_not_be_able_to_assign_a_new_issue_to_a_locked_version | |
@@ -1053,7 +1053,7 class IssueTest < ActiveSupport::TestCase | |||||
1053 | :status_id => 1, :fixed_version_id => 2, |
|
1053 | :status_id => 1, :fixed_version_id => 2, | |
1054 | :subject => 'New issue') |
|
1054 | :subject => 'New issue') | |
1055 | assert !issue.save |
|
1055 | assert !issue.save | |
1056 |
assert_not_ |
|
1056 | assert_not_equal [], issue.errors[:fixed_version_id] | |
1057 | end |
|
1057 | end | |
1058 |
|
1058 | |||
1059 | def test_should_be_able_to_assign_a_new_issue_to_an_open_version |
|
1059 | def test_should_be_able_to_assign_a_new_issue_to_an_open_version | |
@@ -1074,7 +1074,7 class IssueTest < ActiveSupport::TestCase | |||||
1074 | issue = Issue.find(11) |
|
1074 | issue = Issue.find(11) | |
1075 | issue.status_id = 1 |
|
1075 | issue.status_id = 1 | |
1076 | assert !issue.save |
|
1076 | assert !issue.save | |
1077 |
assert_not_ |
|
1077 | assert_not_equal [], issue.errors[:base] | |
1078 | end |
|
1078 | end | |
1079 |
|
1079 | |||
1080 | def test_should_be_able_to_reopen_and_reassign_an_issue_assigned_to_a_closed_version |
|
1080 | def test_should_be_able_to_reopen_and_reassign_an_issue_assigned_to_a_closed_version |
@@ -401,7 +401,7 class UserTest < ActiveSupport::TestCase | |||||
401 | u = User.new |
|
401 | u = User.new | |
402 | u.mail_notification = 'foo' |
|
402 | u.mail_notification = 'foo' | |
403 | u.save |
|
403 | u.save | |
404 |
assert_not_ |
|
404 | assert_not_equal [], u.errors[:mail_notification] | |
405 | end |
|
405 | end | |
406 |
|
406 | |||
407 | def test_password |
|
407 | def test_password |
General Comments 0
You need to be logged in to leave comments.
Login now