mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 15:26:03 +01:00
Test failure.
git-svn-id: http://svn.redmine.org/redmine/trunk@17725 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -43,7 +43,8 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
:journal_details,
|
||||
:queries,
|
||||
:repositories,
|
||||
:changesets
|
||||
:changesets,
|
||||
:watchers
|
||||
|
||||
include Redmine::I18n
|
||||
|
||||
@@ -5716,6 +5717,8 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
}
|
||||
}
|
||||
assert_response 302
|
||||
# 4 emails for 2 members and 2 issues
|
||||
# 1 email for a watcher of issue #2
|
||||
assert_equal 5, ActionMailer::Base.deliveries.size
|
||||
end
|
||||
end
|
||||
|
||||
@@ -41,6 +41,10 @@ Redmine::SudoMode.disable!
|
||||
$redmine_tmp_attachments_directory = "#{Rails.root}/tmp/test/attachments"
|
||||
FileUtils.mkdir_p $redmine_tmp_attachments_directory
|
||||
|
||||
$redmine_tmp_pdf_directory = "#{Rails.root}/tmp/test/pdf"
|
||||
FileUtils.mkdir_p $redmine_tmp_pdf_directory
|
||||
FileUtils.rm Dir.glob('#$redmine_tmp_pdf_directory/*.pdf')
|
||||
|
||||
class ActionView::TestCase
|
||||
helper :application
|
||||
include ApplicationHelper
|
||||
@@ -329,6 +333,15 @@ module Redmine
|
||||
end
|
||||
assert_equal expected_filters.size, filter_init.scan("addFilter").size, "filters counts don't match"
|
||||
end
|
||||
|
||||
# Saves the generated PDF in tmp/test/pdf
|
||||
def save_pdf
|
||||
assert_equal 'application/pdf', response.content_type
|
||||
filename = "#{self.class.name.underscore}__#{method_name}.pdf"
|
||||
File.open(File.join($redmine_tmp_pdf_directory, filename), "wb") do |f|
|
||||
f.write response.body
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class RepositoryControllerTest < ControllerTest
|
||||
|
||||
Reference in New Issue
Block a user