summaryrefslogtreecommitdiffstats
path: root/test/unit/mail_handler_test.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-24 16:26:50 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-24 16:26:50 +0000
commit17a5f26e5027c0efc4dae45e379fe2d9ce76490e (patch)
tree223cac10d8c1e178e9a5b4523ffdc4c79a4fbc39 /test/unit/mail_handler_test.rb
parent0829ac775d9462ea1ff52f68cc78d2c6e57b68ae (diff)
downloadredmine-17a5f26e5027c0efc4dae45e379fe2d9ce76490e.tar.gz
redmine-17a5f26e5027c0efc4dae45e379fe2d9ce76490e.zip
adjust tests to awesome_nested_set new node lft and rgt value behavior change
git-svn-id: http://svn.redmine.org/redmine/trunk@12693 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mail_handler_test.rb')
-rw-r--r--test/unit/mail_handler_test.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb
index 570cdd662..1a036dade 100644
--- a/test/unit/mail_handler_test.rb
+++ b/test/unit/mail_handler_test.rb
@@ -41,6 +41,7 @@ class MailHandlerTest < ActiveSupport::TestCase
def test_add_issue
ActionMailer::Base.deliveries.clear
+ lft1 = new_issue_lft
# This email contains: 'Project: onlinestore'
issue = submit_email('ticket_on_given_project.eml')
assert issue.is_a?(Issue)
@@ -58,7 +59,7 @@ class MailHandlerTest < ActiveSupport::TestCase
assert_equal Version.find_by_name('Alpha'), issue.fixed_version
assert_equal 2.5, issue.estimated_hours
assert_equal 30, issue.done_ratio
- assert_equal [issue.id, 1, 2], [issue.root_id, issue.lft, issue.rgt]
+ assert_equal [issue.id, lft1, lft1 + 1], [issue.root_id, issue.lft, issue.rgt]
# keywords should be removed from the email body
assert !issue.description.match(/^Project:/i)
assert !issue.description.match(/^Status:/i)
@@ -264,6 +265,7 @@ class MailHandlerTest < ActiveSupport::TestCase
end
def test_add_issue_by_anonymous_user_on_private_project_without_permission_check
+ lft1 = new_issue_lft
assert_no_difference 'User.count' do
assert_difference 'Issue.count' do
issue = submit_email(
@@ -275,7 +277,7 @@ class MailHandlerTest < ActiveSupport::TestCase
assert issue.is_a?(Issue)
assert issue.author.anonymous?
assert !issue.project.is_public?
- assert_equal [issue.id, 1, 2], [issue.root_id, issue.lft, issue.rgt]
+ assert_equal [issue.id, lft1, lft1 + 1], [issue.root_id, issue.lft, issue.rgt]
end
end
end