@@ -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 |
@@ -114,7 +114,7 class IssueRelationTest < ActiveSupport::TestCase | |||||
114 | :relation_type => IssueRelation::TYPE_PRECEDES |
|
114 | :relation_type => IssueRelation::TYPE_PRECEDES | |
115 | ) |
|
115 | ) | |
116 | assert !r.save |
|
116 | assert !r.save | |
117 |
assert_not_ |
|
117 | assert_not_equal [], r.errors[:base] | |
118 | end |
|
118 | end | |
119 |
|
119 | |||
120 | def test_validates_circular_dependency_of_subtask |
|
120 | def test_validates_circular_dependency_of_subtask | |
@@ -165,6 +165,6 class IssueRelationTest < ActiveSupport::TestCase | |||||
165 | :relation_type => IssueRelation::TYPE_BLOCKED |
|
165 | :relation_type => IssueRelation::TYPE_BLOCKED | |
166 | ) |
|
166 | ) | |
167 | assert !r.save |
|
167 | assert !r.save | |
168 |
assert_not_ |
|
168 | assert_not_equal [], r.errors[:base] | |
169 | end |
|
169 | end | |
170 | end |
|
170 | end |
@@ -469,7 +469,7 class IssueTest < ActiveSupport::TestCase | |||||
469 | issue.tracker_id = 2 |
|
469 | issue.tracker_id = 2 | |
470 | issue.subject = 'New subject' |
|
470 | issue.subject = 'New subject' | |
471 | assert !issue.save |
|
471 | assert !issue.save | |
472 |
assert_not_ |
|
472 | assert_not_equal [], issue.errors[:tracker_id] | |
473 | end |
|
473 | end | |
474 |
|
474 | |||
475 | def test_category_based_assignment |
|
475 | def test_category_based_assignment | |
@@ -1024,7 +1024,7 class IssueTest < ActiveSupport::TestCase | |||||
1024 | :status_id => 1, :fixed_version_id => 1, |
|
1024 | :status_id => 1, :fixed_version_id => 1, | |
1025 | :subject => 'New issue') |
|
1025 | :subject => 'New issue') | |
1026 | assert !issue.save |
|
1026 | assert !issue.save | |
1027 |
assert_not_ |
|
1027 | assert_not_equal [], issue.errors[:fixed_version_id] | |
1028 | end |
|
1028 | end | |
1029 |
|
1029 | |||
1030 | def test_should_not_be_able_to_assign_a_new_issue_to_a_locked_version |
|
1030 | def test_should_not_be_able_to_assign_a_new_issue_to_a_locked_version | |
@@ -1032,7 +1032,7 class IssueTest < ActiveSupport::TestCase | |||||
1032 | :status_id => 1, :fixed_version_id => 2, |
|
1032 | :status_id => 1, :fixed_version_id => 2, | |
1033 | :subject => 'New issue') |
|
1033 | :subject => 'New issue') | |
1034 | assert !issue.save |
|
1034 | assert !issue.save | |
1035 |
assert_not_ |
|
1035 | assert_not_equal [], issue.errors[:fixed_version_id] | |
1036 | end |
|
1036 | end | |
1037 |
|
1037 | |||
1038 | def test_should_be_able_to_assign_a_new_issue_to_an_open_version |
|
1038 | def test_should_be_able_to_assign_a_new_issue_to_an_open_version | |
@@ -1053,7 +1053,7 class IssueTest < ActiveSupport::TestCase | |||||
1053 | issue = Issue.find(11) |
|
1053 | issue = Issue.find(11) | |
1054 | issue.status_id = 1 |
|
1054 | issue.status_id = 1 | |
1055 | assert !issue.save |
|
1055 | assert !issue.save | |
1056 |
assert_not_ |
|
1056 | assert_not_equal [], issue.errors[:base] | |
1057 | end |
|
1057 | end | |
1058 |
|
1058 | |||
1059 | def test_should_be_able_to_reopen_and_reassign_an_issue_assigned_to_a_closed_version |
|
1059 | def test_should_be_able_to_reopen_and_reassign_an_issue_assigned_to_a_closed_version |
@@ -366,7 +366,7 class UserTest < ActiveSupport::TestCase | |||||
366 | u = User.new |
|
366 | u = User.new | |
367 | u.mail_notification = 'foo' |
|
367 | u.mail_notification = 'foo' | |
368 | u.save |
|
368 | u.save | |
369 |
assert_not_ |
|
369 | assert_not_equal [], u.errors[:mail_notification] | |
370 | end |
|
370 | end | |
371 |
|
371 | |||
372 | context "User#try_to_login" do |
|
372 | context "User#try_to_login" do |
General Comments 0
You need to be logged in to leave comments.
Login now