+@@ -62,3 +63,5 @@
+
+
+ <% end -%>
++
++<%= l(:text_diff_truncated) if diff.truncated? %>
+Index: lang/lt.yml
+===================================================================
+--- config/settings.yml (revision 2094)
++++ config/settings.yml (working copy)
+@@ -61,6 +61,9 @@
+ feeds_limit:
+ format: int
+ default: 15
++diff_max_lines_displayed:
++ format: int
++ default: 1500
+ enabled_scm:
+ serialized: true
+ default:
+Index: lib/redmine/unified_diff.rb
+===================================================================
+--- lib/redmine/unified_diff.rb (revision 2110)
++++ lib/redmine/unified_diff.rb (working copy)
+@@ -19,8 +19,11 @@
+ # Class used to parse unified diffs
+ class UnifiedDiff < Array
+ def initialize(diff, options={})
++ options.assert_valid_keys(:type, :max_lines)
+ diff_type = options[:type] || 'inline'
+
++ lines = 0
++ @truncated = false
+ diff_table = DiffTable.new(diff_type)
+ diff.each do |line|
+ if line =~ /^(---|\+\+\+) (.*)$/
+@@ -28,10 +31,17 @@
+ diff_table = DiffTable.new(diff_type)
+ end
+ diff_table.add_line line
++ lines += 1
++ if options[:max_lines] && lines > options[:max_lines]
++ @truncated = true
++ break
++ end
+ end
+ self << diff_table unless diff_table.empty?
+ self
+ end
++
++ def truncated?; @truncated; end
+ end
+
+ # Class that represents a file diff
diff --git a/test/fixtures/documents.yml b/test/fixtures/documents.yml
new file mode 100644
index 000000000..9398a5b4a
--- /dev/null
+++ b/test/fixtures/documents.yml
@@ -0,0 +1,14 @@
+documents_001:
+ created_on: 2007-01-27 15:08:27 +01:00
+ project_id: 1
+ title: "Test document"
+ id: 1
+ description: "Document description"
+ category_id: 1
+documents_002:
+ created_on: 2007-02-12 15:08:27 +01:00
+ project_id: 1
+ title: "An other document"
+ id: 2
+ description: ""
+ category_id: 1
diff --git a/test/fixtures/enabled_modules.yml b/test/fixtures/enabled_modules.yml
new file mode 100644
index 000000000..edb2e6972
--- /dev/null
+++ b/test/fixtures/enabled_modules.yml
@@ -0,0 +1,105 @@
+---
+enabled_modules_001:
+ name: issue_tracking
+ project_id: 1
+ id: 1
+enabled_modules_002:
+ name: time_tracking
+ project_id: 1
+ id: 2
+enabled_modules_003:
+ name: news
+ project_id: 1
+ id: 3
+enabled_modules_004:
+ name: documents
+ project_id: 1
+ id: 4
+enabled_modules_005:
+ name: files
+ project_id: 1
+ id: 5
+enabled_modules_006:
+ name: wiki
+ project_id: 1
+ id: 6
+enabled_modules_007:
+ name: repository
+ project_id: 1
+ id: 7
+enabled_modules_008:
+ name: boards
+ project_id: 1
+ id: 8
+enabled_modules_009:
+ name: repository
+ project_id: 3
+ id: 9
+enabled_modules_010:
+ name: wiki
+ project_id: 3
+ id: 10
+enabled_modules_011:
+ name: issue_tracking
+ project_id: 2
+ id: 11
+enabled_modules_012:
+ name: time_tracking
+ project_id: 3
+ id: 12
+enabled_modules_013:
+ name: issue_tracking
+ project_id: 3
+ id: 13
+enabled_modules_014:
+ name: issue_tracking
+ project_id: 5
+ id: 14
+enabled_modules_015:
+ name: wiki
+ project_id: 2
+ id: 15
+enabled_modules_016:
+ name: boards
+ project_id: 2
+ id: 16
+enabled_modules_017:
+ name: calendar
+ project_id: 1
+ id: 17
+enabled_modules_018:
+ name: gantt
+ project_id: 1
+ id: 18
+enabled_modules_019:
+ name: calendar
+ project_id: 2
+ id: 19
+enabled_modules_020:
+ name: gantt
+ project_id: 2
+ id: 20
+enabled_modules_021:
+ name: calendar
+ project_id: 3
+ id: 21
+enabled_modules_022:
+ name: gantt
+ project_id: 3
+ id: 22
+enabled_modules_023:
+ name: calendar
+ project_id: 5
+ id: 23
+enabled_modules_024:
+ name: gantt
+ project_id: 5
+ id: 24
+enabled_modules_025:
+ name: news
+ project_id: 2
+ id: 25
+enabled_modules_026:
+ name: repository
+ project_id: 2
+ id: 26
diff --git a/test/fixtures/encoding/iso-8859-1.txt b/test/fixtures/encoding/iso-8859-1.txt
new file mode 100644
index 000000000..8ad6cc0f2
--- /dev/null
+++ b/test/fixtures/encoding/iso-8859-1.txt
@@ -0,0 +1 @@
+Texte encod en ISO-8859-1.
\ No newline at end of file
diff --git a/test/fixtures/enumerations.yml b/test/fixtures/enumerations.yml
new file mode 100644
index 000000000..f97571221
--- /dev/null
+++ b/test/fixtures/enumerations.yml
@@ -0,0 +1,103 @@
+---
+enumerations_001:
+ name: Uncategorized
+ id: 1
+ type: DocumentCategory
+ active: true
+ position: 1
+enumerations_002:
+ name: User documentation
+ id: 2
+ type: DocumentCategory
+ active: true
+ position: 2
+enumerations_003:
+ name: Technical documentation
+ id: 3
+ type: DocumentCategory
+ active: true
+ position: 3
+enumerations_004:
+ name: Low
+ id: 4
+ type: IssuePriority
+ active: true
+ position: 1
+ position_name: lowest
+enumerations_005:
+ name: Normal
+ id: 5
+ type: IssuePriority
+ is_default: true
+ active: true
+ position: 2
+ position_name: default
+enumerations_006:
+ name: High
+ id: 6
+ type: IssuePriority
+ active: true
+ position: 3
+ position_name: high3
+enumerations_007:
+ name: Urgent
+ id: 7
+ type: IssuePriority
+ active: true
+ position: 4
+ position_name: high2
+enumerations_008:
+ name: Immediate
+ id: 8
+ type: IssuePriority
+ active: true
+ position: 5
+ position_name: highest
+enumerations_009:
+ name: Design
+ id: 9
+ type: TimeEntryActivity
+ position: 1
+ active: true
+enumerations_010:
+ name: Development
+ id: 10
+ type: TimeEntryActivity
+ position: 2
+ is_default: true
+ active: true
+enumerations_011:
+ name: QA
+ id: 11
+ type: TimeEntryActivity
+ position: 3
+ active: true
+enumerations_012:
+ name: Default Enumeration
+ id: 12
+ type: Enumeration
+ is_default: true
+ active: true
+enumerations_013:
+ name: Another Enumeration
+ id: 13
+ type: Enumeration
+ active: true
+enumerations_014:
+ name: Inactive Activity
+ id: 14
+ type: TimeEntryActivity
+ position: 4
+ active: false
+enumerations_015:
+ name: Inactive Priority
+ id: 15
+ type: IssuePriority
+ position: 6
+ active: false
+enumerations_016:
+ name: Inactive Document Category
+ id: 16
+ type: DocumentCategory
+ active: false
+ position: 4
diff --git a/test/fixtures/files/2006/07/060719210727_archive.zip b/test/fixtures/files/2006/07/060719210727_archive.zip
new file mode 100644
index 000000000..5467885d4
Binary files /dev/null and b/test/fixtures/files/2006/07/060719210727_archive.zip differ
diff --git a/test/fixtures/files/2006/07/060719210727_changeset_iso8859-1.diff b/test/fixtures/files/2006/07/060719210727_changeset_iso8859-1.diff
new file mode 100644
index 000000000..1eca56444
--- /dev/null
+++ b/test/fixtures/files/2006/07/060719210727_changeset_iso8859-1.diff
@@ -0,0 +1,13 @@
+Index: trunk/app/controllers/issues_controller.rb
+===================================================================
+--- trunk/app/controllers/issues_controller.rb (rvision 1483)
++++ trunk/app/controllers/issues_controller.rb (rvision 1484)
+@@ -149,7 +149,7 @@
+ attach_files(@issue, params[:attachments])
+ flash[:notice] = 'Demande cre avec succs'
+ Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added')
+- redirect_to :controller => 'issues', :action => 'show', :id => @issue, :project_id => @project
++ redirect_to :controller => 'issues', :action => 'show', :id => @issue
+ return
+ end
+ end
diff --git a/test/fixtures/files/2006/07/060719210727_changeset_utf8.diff b/test/fixtures/files/2006/07/060719210727_changeset_utf8.diff
new file mode 100644
index 000000000..e594f203a
--- /dev/null
+++ b/test/fixtures/files/2006/07/060719210727_changeset_utf8.diff
@@ -0,0 +1,13 @@
+Index: trunk/app/controllers/issues_controller.rb
+===================================================================
+--- trunk/app/controllers/issues_controller.rb (révision 1483)
++++ trunk/app/controllers/issues_controller.rb (révision 1484)
+@@ -149,7 +149,7 @@
+ attach_files(@issue, params[:attachments])
+ flash[:notice] = 'Demande créée avec succès'
+ Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added')
+- redirect_to :controller => 'issues', :action => 'show', :id => @issue, :project_id => @project
++ redirect_to :controller => 'issues', :action => 'show', :id => @issue
+ return
+ end
+ end
diff --git a/test/fixtures/files/2006/07/060719210727_source.rb b/test/fixtures/files/2006/07/060719210727_source.rb
new file mode 100644
index 000000000..3f9289631
--- /dev/null
+++ b/test/fixtures/files/2006/07/060719210727_source.rb
@@ -0,0 +1,10 @@
+# The Greeter class
+class Greeter
+ def initialize(name)
+ @name = name.capitalize
+ end
+
+ def salute
+ puts "Hello #{@name}!"
+ end
+end
diff --git a/test/fixtures/files/2010/11/101123161450_testfile_1.png b/test/fixtures/files/2010/11/101123161450_testfile_1.png
new file mode 100644
index 000000000..6dad7f1d8
Binary files /dev/null and b/test/fixtures/files/2010/11/101123161450_testfile_1.png differ
diff --git a/test/fixtures/files/2010/12/101223161450_testfile_2.png b/test/fixtures/files/2010/12/101223161450_testfile_2.png
new file mode 100644
index 000000000..aec3fcfdf
Binary files /dev/null and b/test/fixtures/files/2010/12/101223161450_testfile_2.png differ
diff --git a/test/fixtures/files/hg-export.diff b/test/fixtures/files/hg-export.diff
new file mode 100644
index 000000000..54dfdf5c0
--- /dev/null
+++ b/test/fixtures/files/hg-export.diff
@@ -0,0 +1,13 @@
+# HG changeset patch
+# User test
+# Date 1348014182 -32400
+# Node ID d1c871b8ef113df7f1c56d41e6e3bfbaff976e1f
+# Parent 180b6605936cdc7909c5f08b59746ec1a7c99b3e
+modify test1.txt
+
+diff -r 180b6605936c -r d1c871b8ef11 test1.txt
+--- a/test1.txt
++++ b/test1.txt
+@@ -1,1 +1,1 @@
+-test1
++modify test1
diff --git a/test/fixtures/files/iso8859-1.txt b/test/fixtures/files/iso8859-1.txt
new file mode 100644
index 000000000..1eca56444
--- /dev/null
+++ b/test/fixtures/files/iso8859-1.txt
@@ -0,0 +1,13 @@
+Index: trunk/app/controllers/issues_controller.rb
+===================================================================
+--- trunk/app/controllers/issues_controller.rb (rvision 1483)
++++ trunk/app/controllers/issues_controller.rb (rvision 1484)
+@@ -149,7 +149,7 @@
+ attach_files(@issue, params[:attachments])
+ flash[:notice] = 'Demande cre avec succs'
+ Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added')
+- redirect_to :controller => 'issues', :action => 'show', :id => @issue, :project_id => @project
++ redirect_to :controller => 'issues', :action => 'show', :id => @issue
+ return
+ end
+ end
diff --git a/test/fixtures/files/japanese-utf-8.txt b/test/fixtures/files/japanese-utf-8.txt
new file mode 100644
index 000000000..c77dbef7f
--- /dev/null
+++ b/test/fixtures/files/japanese-utf-8.txt
@@ -0,0 +1 @@
+日本語
diff --git a/test/fixtures/files/testfile.txt b/test/fixtures/files/testfile.txt
new file mode 100644
index 000000000..84f601ee6
--- /dev/null
+++ b/test/fixtures/files/testfile.txt
@@ -0,0 +1,2 @@
+this is a text file for upload tests
+with multiple lines
diff --git a/test/fixtures/groups_users.yml b/test/fixtures/groups_users.yml
new file mode 100644
index 000000000..e5da17389
--- /dev/null
+++ b/test/fixtures/groups_users.yml
@@ -0,0 +1,7 @@
+---
+groups_users_001:
+ group_id: 10
+ user_id: 8
+groups_users_002:
+ group_id: 11
+ user_id: 8
diff --git a/test/fixtures/issue_categories.yml b/test/fixtures/issue_categories.yml
new file mode 100644
index 000000000..0a5c820ba
--- /dev/null
+++ b/test/fixtures/issue_categories.yml
@@ -0,0 +1,21 @@
+---
+issue_categories_001:
+ name: Printing
+ project_id: 1
+ assigned_to_id: 2
+ id: 1
+issue_categories_002:
+ name: Recipes
+ project_id: 1
+ assigned_to_id:
+ id: 2
+issue_categories_003:
+ name: Stock management
+ project_id: 2
+ assigned_to_id:
+ id: 3
+issue_categories_004:
+ name: Printing
+ project_id: 2
+ assigned_to_id:
+ id: 4
diff --git a/test/fixtures/issue_relations.yml b/test/fixtures/issue_relations.yml
new file mode 100644
index 000000000..7a1d5a204
--- /dev/null
+++ b/test/fixtures/issue_relations.yml
@@ -0,0 +1,12 @@
+issue_relation_001:
+ id: 1
+ issue_from_id: 10
+ issue_to_id: 9
+ relation_type: blocks
+ delay:
+issue_relation_002:
+ id: 2
+ issue_from_id: 2
+ issue_to_id: 3
+ relation_type: relates
+ delay:
diff --git a/test/fixtures/issue_statuses.yml b/test/fixtures/issue_statuses.yml
new file mode 100644
index 000000000..a2212bd38
--- /dev/null
+++ b/test/fixtures/issue_statuses.yml
@@ -0,0 +1,37 @@
+---
+issue_statuses_001:
+ id: 1
+ name: New
+ is_default: true
+ is_closed: false
+ position: 1
+issue_statuses_002:
+ id: 2
+ name: Assigned
+ is_default: false
+ is_closed: false
+ position: 2
+issue_statuses_003:
+ id: 3
+ name: Resolved
+ is_default: false
+ is_closed: false
+ position: 3
+issue_statuses_004:
+ name: Feedback
+ id: 4
+ is_default: false
+ is_closed: false
+ position: 4
+issue_statuses_005:
+ id: 5
+ name: Closed
+ is_default: false
+ is_closed: true
+ position: 5
+issue_statuses_006:
+ id: 6
+ name: Rejected
+ is_default: false
+ is_closed: true
+ position: 6
diff --git a/test/fixtures/issues.yml b/test/fixtures/issues.yml
new file mode 100644
index 000000000..68f5fb275
--- /dev/null
+++ b/test/fixtures/issues.yml
@@ -0,0 +1,268 @@
+---
+issues_001:
+ created_on: <%= 3.days.ago.to_s(:db) %>
+ project_id: 1
+ updated_on: <%= 1.day.ago.to_s(:db) %>
+ priority_id: 4
+ subject: Can't print recipes
+ id: 1
+ fixed_version_id:
+ category_id: 1
+ description: Unable to print recipes
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+ start_date: <%= 1.day.ago.to_date.to_s(:db) %>
+ due_date: <%= 10.day.from_now.to_date.to_s(:db) %>
+ root_id: 1
+ lft: 1
+ rgt: 2
+ lock_version: 3
+issues_002:
+ created_on: 2006-07-19 21:04:21 +02:00
+ project_id: 1
+ updated_on: 2006-07-19 21:09:50 +02:00
+ priority_id: 5
+ subject: Add ingredients categories
+ id: 2
+ fixed_version_id: 2
+ category_id:
+ description: Ingredients of the recipe should be classified by categories
+ tracker_id: 2
+ assigned_to_id: 3
+ author_id: 2
+ status_id: 2
+ start_date: <%= 2.day.ago.to_date.to_s(:db) %>
+ due_date:
+ root_id: 2
+ lft: 1
+ rgt: 2
+ lock_version: 3
+ done_ratio: 30
+issues_003:
+ created_on: 2006-07-19 21:07:27 +02:00
+ project_id: 1
+ updated_on: 2006-07-19 21:07:27 +02:00
+ priority_id: 4
+ subject: Error 281 when updating a recipe
+ id: 3
+ fixed_version_id:
+ category_id:
+ description: Error 281 is encountered when saving a recipe
+ tracker_id: 1
+ assigned_to_id: 3
+ author_id: 2
+ status_id: 1
+ start_date: <%= 15.day.ago.to_date.to_s(:db) %>
+ due_date: <%= 5.day.ago.to_date.to_s(:db) %>
+ root_id: 3
+ lft: 1
+ rgt: 2
+issues_004:
+ created_on: <%= 5.days.ago.to_s(:db) %>
+ project_id: 2
+ updated_on: <%= 2.days.ago.to_s(:db) %>
+ priority_id: 4
+ subject: Issue on project 2
+ id: 4
+ fixed_version_id:
+ category_id:
+ description: Issue on project 2
+ tracker_id: 1
+ assigned_to_id: 2
+ author_id: 2
+ status_id: 1
+ root_id: 4
+ lft: 1
+ rgt: 2
+issues_005:
+ created_on: <%= 5.days.ago.to_s(:db) %>
+ project_id: 3
+ updated_on: <%= 2.days.ago.to_s(:db) %>
+ priority_id: 4
+ subject: Subproject issue
+ id: 5
+ fixed_version_id:
+ category_id:
+ description: This is an issue on a cookbook subproject
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+ root_id: 5
+ lft: 1
+ rgt: 2
+issues_006:
+ created_on: <%= 1.minute.ago.to_s(:db) %>
+ project_id: 5
+ updated_on: <%= 1.minute.ago.to_s(:db) %>
+ priority_id: 4
+ subject: Issue of a private subproject
+ id: 6
+ fixed_version_id:
+ category_id:
+ description: This is an issue of a private subproject of cookbook
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+ start_date: <%= Date.today.to_s(:db) %>
+ due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
+ root_id: 6
+ lft: 1
+ rgt: 2
+issues_007:
+ created_on: <%= 10.days.ago.to_s(:db) %>
+ project_id: 1
+ updated_on: <%= 10.days.ago.to_s(:db) %>
+ priority_id: 5
+ subject: Issue due today
+ id: 7
+ fixed_version_id:
+ category_id:
+ description: This is an issue that is due today
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+ start_date: <%= 10.days.ago.to_s(:db) %>
+ due_date: <%= Date.today.to_s(:db) %>
+ lock_version: 0
+ root_id: 7
+ lft: 1
+ rgt: 2
+issues_008:
+ created_on: <%= 10.days.ago.to_s(:db) %>
+ project_id: 1
+ updated_on: <%= 10.days.ago.to_s(:db) %>
+ priority_id: 5
+ subject: Closed issue
+ id: 8
+ fixed_version_id:
+ category_id:
+ description: This is a closed issue.
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 5
+ start_date:
+ due_date:
+ lock_version: 0
+ root_id: 8
+ lft: 1
+ rgt: 2
+ closed_on: <%= 3.days.ago.to_s(:db) %>
+issues_009:
+ created_on: <%= 1.minute.ago.to_s(:db) %>
+ project_id: 5
+ updated_on: <%= 1.minute.ago.to_s(:db) %>
+ priority_id: 5
+ subject: Blocked Issue
+ id: 9
+ fixed_version_id:
+ category_id:
+ description: This is an issue that is blocked by issue #10
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+ start_date: <%= Date.today.to_s(:db) %>
+ due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
+ root_id: 9
+ lft: 1
+ rgt: 2
+issues_010:
+ created_on: <%= 1.minute.ago.to_s(:db) %>
+ project_id: 5
+ updated_on: <%= 1.minute.ago.to_s(:db) %>
+ priority_id: 5
+ subject: Issue Doing the Blocking
+ id: 10
+ fixed_version_id:
+ category_id:
+ description: This is an issue that blocks issue #9
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+ start_date: <%= Date.today.to_s(:db) %>
+ due_date: <%= 1.days.from_now.to_date.to_s(:db) %>
+ root_id: 10
+ lft: 1
+ rgt: 2
+issues_011:
+ created_on: <%= 3.days.ago.to_s(:db) %>
+ project_id: 1
+ updated_on: <%= 1.day.ago.to_s(:db) %>
+ priority_id: 5
+ subject: Closed issue on a closed version
+ id: 11
+ fixed_version_id: 1
+ category_id: 1
+ description:
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 5
+ start_date: <%= 1.day.ago.to_date.to_s(:db) %>
+ due_date:
+ root_id: 11
+ lft: 1
+ rgt: 2
+ closed_on: <%= 1.day.ago.to_s(:db) %>
+issues_012:
+ created_on: <%= 3.days.ago.to_s(:db) %>
+ project_id: 1
+ updated_on: <%= 1.day.ago.to_s(:db) %>
+ priority_id: 5
+ subject: Closed issue on a locked version
+ id: 12
+ fixed_version_id: 2
+ category_id: 1
+ description:
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 3
+ status_id: 5
+ start_date: <%= 1.day.ago.to_date.to_s(:db) %>
+ due_date:
+ root_id: 12
+ lft: 1
+ rgt: 2
+ closed_on: <%= 1.day.ago.to_s(:db) %>
+issues_013:
+ created_on: <%= 5.days.ago.to_s(:db) %>
+ project_id: 3
+ updated_on: <%= 2.days.ago.to_s(:db) %>
+ priority_id: 4
+ subject: Subproject issue two
+ id: 13
+ fixed_version_id:
+ category_id:
+ description: This is a second issue on a cookbook subproject
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+ root_id: 13
+ lft: 1
+ rgt: 2
+issues_014:
+ id: 14
+ created_on: <%= 15.days.ago.to_s(:db) %>
+ project_id: 3
+ updated_on: <%= 15.days.ago.to_s(:db) %>
+ priority_id: 5
+ subject: Private issue on public project
+ fixed_version_id:
+ category_id:
+ description: This is a private issue
+ tracker_id: 1
+ assigned_to_id:
+ author_id: 2
+ status_id: 1
+ is_private: true
+ root_id: 14
+ lft: 1
+ rgt: 2
diff --git a/test/fixtures/journal_details.yml b/test/fixtures/journal_details.yml
new file mode 100644
index 000000000..77f9318f0
--- /dev/null
+++ b/test/fixtures/journal_details.yml
@@ -0,0 +1,43 @@
+---
+journal_details_001:
+ old_value: "1"
+ property: attr
+ id: 1
+ value: "2"
+ prop_key: status_id
+ journal_id: 1
+journal_details_002:
+ old_value: "40"
+ property: attr
+ id: 2
+ value: "30"
+ prop_key: done_ratio
+ journal_id: 1
+journal_details_003:
+ old_value:
+ property: attr
+ id: 3
+ value: "6"
+ prop_key: fixed_version_id
+ journal_id: 4
+journal_details_004:
+ old_value: "This word was removed and an other was"
+ property: attr
+ id: 4
+ value: "This word was and an other was added"
+ prop_key: description
+ journal_id: 3
+journal_details_005:
+ old_value: Old value
+ property: cf
+ id: 5
+ value: New value
+ prop_key: 2
+ journal_id: 3
+journal_details_006:
+ old_value:
+ property: attachment
+ id: 6
+ value: 060719210727_picture.jpg
+ prop_key: 4
+ journal_id: 3
diff --git a/test/fixtures/ldap/slapd.conf b/test/fixtures/ldap/slapd.conf
new file mode 100644
index 000000000..78c44fb9e
--- /dev/null
+++ b/test/fixtures/ldap/slapd.conf
@@ -0,0 +1,19 @@
+# Sample OpenLDAP configuration file for Redmine LDAP test server
+#
+ucdata-path ./ucdata
+include ./schema/core.schema
+include ./schema/cosine.schema
+include ./schema/inetorgperson.schema
+include ./schema/openldap.schema
+include ./schema/nis.schema
+
+pidfile ./run/slapd.pid
+argsfile ./run/slapd.args
+
+database bdb
+suffix "dc=redmine,dc=org"
+rootdn "cn=Manager,dc=redmine,dc=org"
+rootpw secret
+directory ./redmine
+# Indices to maintain
+index objectClass eq
diff --git a/test/fixtures/ldap/test-ldap.ldif b/test/fixtures/ldap/test-ldap.ldif
new file mode 100644
index 000000000..f4cc5557a
--- /dev/null
+++ b/test/fixtures/ldap/test-ldap.ldif
@@ -0,0 +1,82 @@
+dn: dc=redmine,dc=org
+objectClass: top
+objectClass: dcObject
+objectClass: organization
+o: redmine.org
+dc: redmine
+structuralObjectClass: organization
+entryUUID: 886f5fca-0a87-102e-8d06-67c361d9bd2d
+creatorsName:
+createTimestamp: 20090721211642Z
+entryCSN: 20090721211642.955188Z#000000#000#000000
+modifiersName:
+modifyTimestamp: 20090721211642Z
+
+dn: cn=admin,dc=redmine,dc=org
+objectClass: simpleSecurityObject
+objectClass: organizationalRole
+cn: admin
+description: LDAP administrator
+userPassword:: e2NyeXB0fWlWTU9DcUt6WWxXRDI=
+structuralObjectClass: organizationalRole
+entryUUID: 88704e44-0a87-102e-8d07-67c361d9bd2d
+creatorsName:
+createTimestamp: 20090721211642Z
+entryCSN: 20090721211642.961418Z#000000#000#000000
+modifiersName:
+modifyTimestamp: 20090721211642Z
+
+dn: ou=Person,dc=redmine,dc=org
+ou: Person
+objectClass: top
+objectClass: organizationalUnit
+structuralObjectClass: organizationalUnit
+entryUUID: d39dd388-0c84-102e-82fa-dff86c63a7d6
+creatorsName: cn=admin,dc=redmine,dc=org
+createTimestamp: 20090724100222Z
+entryCSN: 20090724100222.924226Z#000000#000#000000
+modifiersName: cn=admin,dc=redmine,dc=org
+modifyTimestamp: 20090724100222Z
+
+dn: uid=example1,ou=Person,dc=redmine,dc=org
+objectClass: posixAccount
+objectClass: top
+objectClass: inetOrgPerson
+gidNumber: 0
+givenName: Example
+sn: One
+uid: example1
+homeDirectory: /home/example1
+cn: Example One
+structuralObjectClass: inetOrgPerson
+entryUUID: 285d304e-0c8a-102e-82fc-dff86c63a7d6
+creatorsName: cn=admin,dc=redmine,dc=org
+createTimestamp: 20090724104032Z
+uidNumber: 0
+mail: example1@redmine.org
+userPassword:: e1NIQX1mRXFOQ2NvM1lxOWg1WlVnbEQzQ1pKVDRsQnM9
+entryCSN: 20090724105945.375801Z#000000#000#000000
+modifiersName: cn=admin,dc=redmine,dc=org
+modifyTimestamp: 20090724105945Z
+
+dn: uid=edavis,ou=Person,dc=redmine,dc=org
+objectClass: posixAccount
+objectClass: top
+objectClass: inetOrgPerson
+gidNumber: 0
+givenName: Eric
+sn: Davis
+uid: edavis
+mail: edavis@littlestreamsoftware.com
+structuralObjectClass: inetOrgPerson
+entryUUID: 9c5f0502-0c8b-102e-82fe-dff86c63a7d6
+creatorsName: cn=admin,dc=redmine,dc=org
+createTimestamp: 20090724105056Z
+homeDirectory: /home/edavis
+cn: Eric Davis
+uidNumber: 0
+userPassword:: e1NIQX1mRXFOQ2NvM1lxOWg1WlVnbEQzQ1pKVDRsQnM9
+entryCSN: 20090724105937.734480Z#000000#000#000000
+modifiersName: cn=admin,dc=redmine,dc=org
+modifyTimestamp: 20090724105937Z
+
diff --git a/test/fixtures/mail_handler/apple_mail_with_attachment.eml b/test/fixtures/mail_handler/apple_mail_with_attachment.eml
new file mode 100644
index 000000000..1485d7e9e
--- /dev/null
+++ b/test/fixtures/mail_handler/apple_mail_with_attachment.eml
@@ -0,0 +1,240 @@
+From JSmith@somenet.foo Mon Jun 27 06:55:56 2011
+Return-Path:
+X-Original-To: redmine@somenet.foo
+Delivered-To: redmine@somenet.foo
+From: John Smith
+Mime-Version: 1.0 (Apple Message framework v1084)
+Content-Type: multipart/alternative; boundary=Apple-Mail-3-163265085
+Subject: Test attaching images to tickets by HTML mail
+Date: Mon, 27 Jun 2011 16:55:46 +0300
+To: redmine@somenet.foo
+Message-Id: <7ABE3636-07E8-47C9-90A1-FCB1AA894DA1@somenet.foo>
+X-Mailer: Apple Mail (2.1084)
+
+
+--Apple-Mail-3-163265085
+Content-Transfer-Encoding: quoted-printable
+Content-Type: text/plain;
+ charset=us-ascii
+
+Yet another test!
+
+
+--Apple-Mail-3-163265085
+Content-Type: multipart/related;
+ type="text/html";
+ boundary=Apple-Mail-4-163265085
+
+
+--Apple-Mail-4-163265085
+Content-Transfer-Encoding: quoted-printable
+Content-Type: text/html;
+ charset=us-ascii
+
+
+ =
+
+--Apple-Mail-4-163265085
+Content-Transfer-Encoding: base64
+Content-Disposition: inline;
+ filename=paella.jpg
+Content-Type: image/jpg;
+ x-unix-mode=0644;
+ name="paella.jpg"
+Content-Id: <1207F0B5-9F9D-4AB4-B547-AF9033E82111>
+
+/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcU
+FhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgo
+KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wA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pZz0oeygoUpWetSpWVmz1O
+c6Ol9o9lDoaBIkPMOZS4obTg4URUqUzWAeDE7SVPEYrXrSZb30ORGwhwDG4rUr/M0SXri+SpYcYu
+EiMMcJbVx9alSgtpad27aMw6ai0pjdKFz1nqJuSn/wAtIJIznj+lfQu11VueVdJm9weohwjNSpWj
+UigYAmfsck8wPPlPKz5jzyz33LJoOt1SieSB7VKlGQQDk5n2w35qwCaYLbEQEBwgY7CpUrlphaAC
+3MIkBKc0DuUUKC5CcJIPI96lSh18GH1AyINiI8x9CM4x3Fat4f6okWOY0qKkFv8AKpCgCFp75qVK
+xqfUY+MUENmMmv7bHbDV5tqPJjTFcsK6pVgE4+Kz68xy41vZUEKPvUqUovDyufKjmfrVmYbiHd6n
+cbis+/WpUqUcMZKdF44n/9k=
+
+--Apple-Mail-4-163265085--
+
+--Apple-Mail-3-163265085--
diff --git a/test/fixtures/mail_handler/fullname_of_sender_as_utf8_encoded.eml b/test/fixtures/mail_handler/fullname_of_sender_as_utf8_encoded.eml
new file mode 100644
index 000000000..e8e520639
--- /dev/null
+++ b/test/fixtures/mail_handler/fullname_of_sender_as_utf8_encoded.eml
@@ -0,0 +1,5 @@
+From: =?utf-8?b?w4TDpCDDlsO2?=
+Subject: foo
+Content-Type: text/plain; charset=utf-8
+
+testing user creation with quoted From-header
diff --git a/test/fixtures/mail_handler/gmail_with_attachment_iso-8859-1.eml b/test/fixtures/mail_handler/gmail_with_attachment_iso-8859-1.eml
new file mode 100644
index 000000000..4f1f6f347
--- /dev/null
+++ b/test/fixtures/mail_handler/gmail_with_attachment_iso-8859-1.eml
@@ -0,0 +1,26 @@
+Date: Tue, 20 Nov 2012 23:08:25 +0900
+Message-ID:
+Subject: test
+From: John Smith
+To: redmine@somenet.foo
+Content-Type: multipart/mixed; boundary=14dae93a13bf76ca5d04ceedc458
+
+--14dae93a13bf76ca5d04ceedc458
+Content-Type: text/plain; charset=ISO-8859-1
+
+test
+
+--14dae93a13bf76ca5d04ceedc458
+Content-Type: text/plain; charset=US-ASCII;
+ name="=?ISO-8859-1?B?xOTW9tz8xOTW9tz8xOTW9tz8xOTW9tz8xOTW9tw=?=
+ =?ISO-8859-1?B?/MTk1vbc/MTk1vbc/MTk1vbc/MTk1vbc/MTk1vbc?=
+ =?ISO-8859-1?B?/MTk1vbc/C50eHQ=?="
+Content-Disposition: attachment;
+ filename="=?ISO-8859-1?B?xOTW9tz8xOTW9tz8xOTW9tz8xOTW9tz8xOTW9tw=?=
+ =?ISO-8859-1?B?/MTk1vbc/MTk1vbc/MTk1vbc/MTk1vbc/MTk1vbc?=
+ =?ISO-8859-1?B?/MTk1vbc/C50eHQ=?="
+Content-Transfer-Encoding: base64
+X-Attachment-Id: f_h9r3mcjz0
+
+dGVzdAo=
+--14dae93a13bf76ca5d04ceedc458--
diff --git a/test/fixtures/mail_handler/gmail_with_attachment_ja.eml b/test/fixtures/mail_handler/gmail_with_attachment_ja.eml
new file mode 100644
index 000000000..8d4e4f334
--- /dev/null
+++ b/test/fixtures/mail_handler/gmail_with_attachment_ja.eml
@@ -0,0 +1,20 @@
+Date: Mon, 19 Nov 2012 10:17:45 +0900
+Message-ID:
+Subject: test
+From: John Smith
+To: redmine@somenet.foo
+Content-Type: multipart/mixed; boundary=bcaec54ee4ea84f77904cecee22e
+
+--bcaec54ee4ea84f77904cecee22e
+Content-Type: text/plain; charset=ISO-8859-1
+
+test
+
+--bcaec54ee4ea84f77904cecee22e
+Content-Type: text/plain; charset=US-ASCII; name="=?ISO-2022-JP?B?GyRCJUYlOSVIGyhCLnR4dA==?="
+Content-Disposition: attachment; filename="=?ISO-2022-JP?B?GyRCJUYlOSVIGyhCLnR4dA==?="
+Content-Transfer-Encoding: base64
+X-Attachment-Id: f_h9owndpv0
+
+dGVzdAo=
+--bcaec54ee4ea84f77904cecee22e--
diff --git a/test/fixtures/mail_handler/issue_update_with_multiple_quoted_reply_above.eml b/test/fixtures/mail_handler/issue_update_with_multiple_quoted_reply_above.eml
new file mode 100644
index 000000000..ff8f63fda
--- /dev/null
+++ b/test/fixtures/mail_handler/issue_update_with_multiple_quoted_reply_above.eml
@@ -0,0 +1,48 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+In-Reply-To:
+From: "John Smith"
+To:
+Subject: Re: update to issue 2
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+An update to the issue by the sender.
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris --- Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+>> > --- Reply above. Do not remove this line. ---
+>> >
+>> > Issue #6779 has been updated by Eric Davis.
+>> >
+>> > Subject changed from Projects with JSON to Project JSON API
+>> > Status changed from New to Assigned
+>> > Assignee set to Eric Davis
+>> > Priority changed from Low to Normal
+>> > Estimated time deleted (1.00)
+>> >
+>> > Looks like the JSON api for projects was missed. I'm going to be
+>> > reviewing the existing APIs and trying to clean them up over the next
+>> > few weeks.
diff --git a/test/fixtures/mail_handler/issue_update_with_quoted_reply_above.eml b/test/fixtures/mail_handler/issue_update_with_quoted_reply_above.eml
new file mode 100644
index 000000000..848382ca4
--- /dev/null
+++ b/test/fixtures/mail_handler/issue_update_with_quoted_reply_above.eml
@@ -0,0 +1,48 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+In-Reply-To:
+From: "John Smith"
+To:
+Subject: Re: update to issue 2
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+An update to the issue by the sender.
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris --- Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+> --- Reply above. Do not remove this line. ---
+>
+> Issue #6779 has been updated by Eric Davis.
+>
+> Subject changed from Projects with JSON to Project JSON API
+> Status changed from New to Assigned
+> Assignee set to Eric Davis
+> Priority changed from Low to Normal
+> Estimated time deleted (1.00)
+>
+> Looks like the JSON api for projects was missed. I'm going to be
+> reviewing the existing APIs and trying to clean them up over the next
+> few weeks.
diff --git a/test/fixtures/mail_handler/japanese_keywords_iso_2022_jp.eml b/test/fixtures/mail_handler/japanese_keywords_iso_2022_jp.eml
new file mode 100644
index 000000000..cb4e3ce9e
--- /dev/null
+++ b/test/fixtures/mail_handler/japanese_keywords_iso_2022_jp.eml
@@ -0,0 +1,60 @@
+Message-ID: <001101ca9762$293d68c0$0600a8c0@osiris>
+From: "jsmith"
+To:
+Subject: Japanese Character pattern matching
+Date: Sun, 17 Jan 2010 11:45:18 +0100
+MIME-Version: 1.0
+Content-Type: multipart/alternative;
+ boundary="----=_NextPart_000_000E_01CA976A.8AF5E9E0"
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+This is a multi-part message in MIME format.
+
+------=_NextPart_000_000E_01CA976A.8AF5E9E0
+Content-Type: text/plain;
+ charset="iso-2022-jp"
+Content-Transfer-Encoding: quoted-printable
+
+It should be noted that I am receiving emails using pop and the patch in =
+Issue #2420 but I don't think the problem lies with this.
+
+When I try and send emails to the redmine server with Japanese =
+characters in them it appears to work apart from the pattern matching.
+
+For example if I send an email with the following keywords.
+
+Tracker: =1B$B3+H/=1B(B
+
+------=_NextPart_000_000E_01CA976A.8AF5E9E0
+Content-Type: text/html;
+ charset="iso-2022-jp"
+Content-Transfer-Encoding: quoted-printable
+
+
+
+
+
+
+
+
+
+
It should be noted that I am receiving emails using pop and the patch =
+in=20
+Issue #2420 but I don't think =
+the=20
+problem lies with this.
+
When I try and send emails to the redmine server with Japanese =
+characters in=20
+them it appears to work apart from the pattern matching.
+
For example if I send an email with the following keywords.
+
Tracker: =
+=1B$B3+H/=1B(B
+
+------=_NextPart_000_000E_01CA976A.8AF5E9E0--
+
diff --git a/test/fixtures/mail_handler/message_reply.eml b/test/fixtures/mail_handler/message_reply.eml
new file mode 100644
index 000000000..78e7f1107
--- /dev/null
+++ b/test/fixtures/mail_handler/message_reply.eml
@@ -0,0 +1,15 @@
+Message-ID: <4974C93E.3070005@somenet.foo>
+Date: Mon, 19 Jan 2009 19:41:02 +0100
+From: "John Smith"
+User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
+MIME-Version: 1.0
+To: redmine@somenet.foo
+Subject: Reply via email
+References:
+In-Reply-To:
+Content-Type: text/plain; charset=UTF-8; format=flowed
+Content-Transfer-Encoding: 7bit
+
+This is a reply to a forum message.
+
+
diff --git a/test/fixtures/mail_handler/message_reply_by_subject.eml b/test/fixtures/mail_handler/message_reply_by_subject.eml
new file mode 100644
index 000000000..05d65861b
--- /dev/null
+++ b/test/fixtures/mail_handler/message_reply_by_subject.eml
@@ -0,0 +1,13 @@
+Message-ID: <4974C93E.3070005@somenet.foo>
+Date: Mon, 19 Jan 2009 19:41:02 +0100
+From: "John Smith"
+User-Agent: Thunderbird 2.0.0.19 (Windows/20081209)
+MIME-Version: 1.0
+To: redmine@somenet.foo
+Subject: Re: [eCookbook - Help board - msg2] Reply to the first post
+Content-Type: text/plain; charset=UTF-8; format=flowed
+Content-Transfer-Encoding: 7bit
+
+This is a reply to a forum message.
+
+
diff --git a/test/fixtures/mail_handler/no_subject_header.eml b/test/fixtures/mail_handler/no_subject_header.eml
new file mode 100644
index 000000000..465a636b4
--- /dev/null
+++ b/test/fixtures/mail_handler/no_subject_header.eml
@@ -0,0 +1,10 @@
+Content-Type: application/ms-tnef; name="winmail.dat"
+Content-Transfer-Encoding: binary
+From: John Smith
+To: "redmine@somenet.foo"
+Date: Fri, 1 Jun 2012 14:39:38 +0200
+Message-ID: <87C31D42249DD0489D1A1444E3232DD7019D6183@foo.bar>
+Accept-Language: de-CH, en-US
+Content-Language: de-CH
+
+Fixture
diff --git a/test/fixtures/mail_handler/subject_as_iso-8859-1.eml b/test/fixtures/mail_handler/subject_as_iso-8859-1.eml
new file mode 100644
index 000000000..38699d0f1
--- /dev/null
+++ b/test/fixtures/mail_handler/subject_as_iso-8859-1.eml
@@ -0,0 +1,11 @@
+Content-Type: application/ms-tnef; name="winmail.dat"
+Content-Transfer-Encoding: binary
+From: John Smith
+To: "redmine@somenet.foo"
+Subject: =?iso-8859-1?Q?Testmail_from_Webmail:_=E4_=F6_=FC...?=
+Date: Fri, 1 Jun 2012 14:39:38 +0200
+Message-ID: <87C31D42249DD0489D1A1444E3232DD7019D6183@foo.bar>
+Accept-Language: de-CH, en-US
+Content-Language: de-CH
+
+Fixture
diff --git a/test/fixtures/mail_handler/subject_japanese_1.eml b/test/fixtures/mail_handler/subject_japanese_1.eml
new file mode 100644
index 000000000..8cebfa7b8
--- /dev/null
+++ b/test/fixtures/mail_handler/subject_japanese_1.eml
@@ -0,0 +1,7 @@
+From: John Smith
+To: "redmine@somenet.foo"
+Subject: =?iso-2022-jp?b?GyRCJUYlOSVIGyhCCg=?=
+Date: Fri, 1 Jun 2012 14:39:38 +0200
+Message-ID: <87C31D42249DD0489D1A1444E3232DD7019D6183@foo.bar>
+
+Fixture
diff --git a/test/fixtures/mail_handler/subject_japanese_2.eml b/test/fixtures/mail_handler/subject_japanese_2.eml
new file mode 100644
index 000000000..7577921d4
--- /dev/null
+++ b/test/fixtures/mail_handler/subject_japanese_2.eml
@@ -0,0 +1,7 @@
+From: John Smith
+To: "redmine@somenet.foo"
+Subject: Re: =?iso-2022-jp?b?GyRCJUYlOSVIGyhCCg=?=
+Date: Fri, 1 Jun 2012 14:39:38 +0200
+Message-ID: <87C31D42249DD0489D1A1444E3232DD7019D6183@foo.bar>
+
+Fixture
diff --git a/test/fixtures/mail_handler/thunderbird_with_attachment_iso-8859-1.eml b/test/fixtures/mail_handler/thunderbird_with_attachment_iso-8859-1.eml
new file mode 100644
index 000000000..89ad4a904
--- /dev/null
+++ b/test/fixtures/mail_handler/thunderbird_with_attachment_iso-8859-1.eml
@@ -0,0 +1,34 @@
+Message-ID: <50AB9546.7020800@gmail.com>
+Date: Tue, 20 Nov 2012 23:35:50 +0900
+From: John Smith
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc13 Thunderbird/3.1.10
+MIME-Version: 1.0
+To: redmine@somenet.foo
+Subject: test
+Content-Type: multipart/mixed;
+ boundary="------------050902080306030406090208"
+
+This is a multi-part message in MIME format.
+--------------050902080306030406090208
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+
+test
+
+--------------050902080306030406090208
+Content-Type: image/png;
+ name="=?ISO-8859-1?Q?=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4?=
+ =?ISO-8859-1?Q?=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6?=
+ =?ISO-8859-1?Q?=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6?=
+ =?ISO-8859-1?Q?=DC=FC=C4=E4=D6=F6=DC=FC=2Epng?="
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename*0*=ISO-8859-1''%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6;
+ filename*1*=%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC;
+ filename*2*=%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4;
+ filename*3*=%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%2E%70%6E%67
+
+iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAAXNSR0IArs4c6QAAAAlwSFlz
+AAALEwAACxMBAJqcGAAAAAd0SU1FB9wLFA4fJhRKIUQAAAAUSURBVAjXY/z//z8DEmBiQAWk
+8gHq9gMHP8uZWAAAAABJRU5ErkJggg==
+--------------050902080306030406090208--
diff --git a/test/fixtures/mail_handler/thunderbird_with_attachment_ja.eml b/test/fixtures/mail_handler/thunderbird_with_attachment_ja.eml
new file mode 100644
index 000000000..af7cbdf4c
--- /dev/null
+++ b/test/fixtures/mail_handler/thunderbird_with_attachment_ja.eml
@@ -0,0 +1,26 @@
+Message-ID: <50AA00C6.4070108@gmail.com>
+Date: Mon, 19 Nov 2012 18:49:58 +0900
+From: John Smith
+User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Lightning/1.0b1 Thunderbird/3.0.10
+MIME-Version: 1.0
+To: redmine@somenet.foo
+Subject: test
+Content-Type: multipart/mixed;
+ boundary="------------030104060902010800050907"
+
+This is a multi-part message in MIME format.
+--------------030104060902010800050907
+Content-Type: text/plain; charset=ISO-2022-JP
+Content-Transfer-Encoding: 7bit
+
+test
+
+--------------030104060902010800050907
+Content-Type: text/plain;
+ name="=?ISO-2022-JP?B?GyRCJUYlOSVIGyhCLnR4dA==?="
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename*=ISO-2022-JP''%1B%24%42%25%46%25%39%25%48%1B%28%42%2E%74%78%74
+
+dGVzdAo=
+--------------030104060902010800050907--
diff --git a/test/fixtures/mail_handler/ticket_by_empty_user.eml b/test/fixtures/mail_handler/ticket_by_empty_user.eml
new file mode 100644
index 000000000..e0d168a7d
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_by_empty_user.eml
@@ -0,0 +1,17 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+To:
+Subject: Ticket by unknown user
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+
+This is a ticket submitted by an unknown user.
+
diff --git a/test/fixtures/mail_handler/ticket_by_unknown_user.eml b/test/fixtures/mail_handler/ticket_by_unknown_user.eml
new file mode 100644
index 000000000..a7abb05e0
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_by_unknown_user.eml
@@ -0,0 +1,18 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Doe"
+To:
+Subject: Ticket by unknown user
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+
+This is a ticket submitted by an unknown user.
+
diff --git a/test/fixtures/mail_handler/ticket_from_emission_address.eml b/test/fixtures/mail_handler/ticket_from_emission_address.eml
new file mode 100644
index 000000000..bf7320cef
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_from_emission_address.eml
@@ -0,0 +1,19 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Doe"
+To:
+Subject: Ticket with the Redmine emission address
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+
+This is a ticket submitted with the Redmine emission address.
+It should be ignored.
+
diff --git a/test/fixtures/mail_handler/ticket_html_only.eml b/test/fixtures/mail_handler/ticket_html_only.eml
new file mode 100644
index 000000000..21b7ae4ff
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_html_only.eml
@@ -0,0 +1,22 @@
+x-sender:
+x-receiver:
+Received: from [127.0.0.1] ([127.0.0.1]) by somenet.foo with Quick 'n Easy Mail Server SMTP (1.0.0.0);
+ Sun, 14 Dec 2008 16:18:06 GMT
+Message-ID: <494531B9.1070709@somenet.foo>
+Date: Sun, 14 Dec 2008 17:18:01 +0100
+From: "John Smith"
+User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
+MIME-Version: 1.0
+To: redmine@somenet.foo
+Subject: HTML email
+Content-Type: text/html; charset=ISO-8859-1
+Content-Transfer-Encoding: 7bit
+
+
+
+
+
+
+This is a html-only email.
+
+
diff --git a/test/fixtures/mail_handler/ticket_on_given_project.eml b/test/fixtures/mail_handler/ticket_on_given_project.eml
new file mode 100644
index 000000000..39790f287
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_on_given_project.eml
@@ -0,0 +1,60 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Subject: New ticket on a given project
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris --- Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+--- This line starts with a delimiter and should not be stripped
+
+This paragraph is before delimiters.
+
+BREAK
+
+This paragraph is between delimiters.
+
+---
+
+This paragraph is after the delimiter so it shouldn't appear.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
+Project: onlinestore
+Status: Resolved
+due date: 2010-12-31
+Start Date:2010-01-01
+Assigned to: John Smith
+fixed version: alpha
+estimated hours: 2.5
+done ratio: 30
+
diff --git a/test/fixtures/mail_handler/ticket_reply.eml b/test/fixtures/mail_handler/ticket_reply.eml
new file mode 100644
index 000000000..74724ccf4
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_reply.eml
@@ -0,0 +1,74 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sat, 21 Jun 2008 18:41:39 +0200
+Message-ID: <006a01c8d3bd$ad9baec0$0a00a8c0@osiris>
+In-Reply-To:
+From: "John Smith"
+To:
+References: <485d0ad366c88_d7014663a025f@osiris.tmail>
+Subject: Re: Add ingredients categories
+Date: Sat, 21 Jun 2008 18:41:39 +0200
+MIME-Version: 1.0
+Content-Type: multipart/alternative;
+ boundary="----=_NextPart_000_0067_01C8D3CE.711F9CC0"
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+This is a multi-part message in MIME format.
+
+------=_NextPart_000_0067_01C8D3CE.711F9CC0
+Content-Type: text/plain;
+ charset="utf-8"
+Content-Transfer-Encoding: quoted-printable
+
+This is reply
+------=_NextPart_000_0067_01C8D3CE.711F9CC0
+Content-Type: text/html;
+ charset="utf-8"
+Content-Transfer-Encoding: quoted-printable
+
+=EF=BB=BF
+
+
+
+
+
+
+
This is=20
+reply
+
+------=_NextPart_000_0067_01C8D3CE.711F9CC0--
+
diff --git a/test/fixtures/mail_handler/ticket_reply_with_status.eml b/test/fixtures/mail_handler/ticket_reply_with_status.eml
new file mode 100644
index 000000000..6a2956855
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_reply_with_status.eml
@@ -0,0 +1,80 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sat, 21 Jun 2008 18:41:39 +0200
+Message-ID: <006a01c8d3bd$ad9baec0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+References: <485d0ad366c88_d7014663a025f@osiris.tmail>
+Subject: Re: [Cookbook - Feature #2] (New) Add ingredients categories
+Date: Sat, 21 Jun 2008 18:41:39 +0200
+MIME-Version: 1.0
+Content-Type: multipart/alternative;
+ boundary="----=_NextPart_000_0067_01C8D3CE.711F9CC0"
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+This is a multi-part message in MIME format.
+
+------=_NextPart_000_0067_01C8D3CE.711F9CC0
+Content-Type: text/plain;
+ charset="utf-8"
+Content-Transfer-Encoding: quoted-printable
+
+This is reply
+
+Status: Resolved
+due date: 2010-12-31
+Start Date:2010-01-01
+Assigned to: jsmith@somenet.foo
+float field: 52.6
+
+------=_NextPart_000_0067_01C8D3CE.711F9CC0
+Content-Type: text/html;
+ charset="utf-8"
+Content-Transfer-Encoding: quoted-printable
+
+=EF=BB=BF
+
+
+
+
+
+
+
This is=20
+reply Status: Resolved
+
+------=_NextPart_000_0067_01C8D3CE.711F9CC0--
+
diff --git a/test/fixtures/mail_handler/ticket_with_attachment.eml b/test/fixtures/mail_handler/ticket_with_attachment.eml
new file mode 100644
index 000000000..c85f6b4a2
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_with_attachment.eml
@@ -0,0 +1,248 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sat, 21 Jun 2008 15:53:25 +0200
+Message-ID: <002301c8d3a6$2cdf6950$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Subject: Ticket created by email with attachment
+Date: Sat, 21 Jun 2008 15:53:25 +0200
+MIME-Version: 1.0
+Content-Type: multipart/mixed;
+ boundary="----=_NextPart_000_001F_01C8D3B6.F05C5270"
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+This is a multi-part message in MIME format.
+
+------=_NextPart_000_001F_01C8D3B6.F05C5270
+Content-Type: multipart/alternative;
+ boundary="----=_NextPart_001_0020_01C8D3B6.F05C5270"
+
+
+------=_NextPart_001_0020_01C8D3B6.F05C5270
+Content-Type: text/plain;
+ charset="iso-8859-1"
+Content-Transfer-Encoding: quoted-printable
+
+This is a new ticket with attachments
+------=_NextPart_001_0020_01C8D3B6.F05C5270
+Content-Type: text/html;
+ charset="iso-8859-1"
+Content-Transfer-Encoding: quoted-printable
+
+
+
+
+
+
+
+
+
This is a new ticket with=20
+attachments
+
+------=_NextPart_001_0020_01C8D3B6.F05C5270--
+
+------=_NextPart_000_001F_01C8D3B6.F05C5270
+Content-Type: image/jpeg;
+ name="Paella.jpg"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename="Paella.jpg"
+
+/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcU
+FhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgo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ylKkfiIEr9z
+IjK/K4g9fvR/xBsyLDqF+IwsrjqSl5rd1CFjcAfkZqVKHYIZOonyclpZz0oeygoUpWetSpWVmz1O
+c6Ol9o9lDoaBIkPMOZS4obTg4URUqUzWAeDE7SVPEYrXrSZb30ORGwhwDG4rUr/M0SXri+SpYcYu
+EiMMcJbVx9alSgtpad27aMw6ai0pjdKFz1nqJuSn/wAtIJIznj+lfQu11VueVdJm9weohwjNSpWj
+UigYAmfsck8wPPlPKz5jzyz33LJoOt1SieSB7VKlGQQDk5n2w35qwCaYLbEQEBwgY7CpUrlphaAC
+3MIkBKc0DuUUKC5CcJIPI96lSh18GH1AyINiI8x9CM4x3Fat4f6okWOY0qKkFv8AKpCgCFp75qVK
+xqfUY+MUENmMmv7bHbDV5tqPJjTFcsK6pVgE4+Kz68xy41vZUEKPvUqUovDyufKjmfrVmYbiHd6n
+cbis+/WpUqUcMZKdF44n/9k=
+
+------=_NextPart_000_001F_01C8D3B6.F05C5270--
+
diff --git a/test/fixtures/mail_handler/ticket_with_attributes.eml b/test/fixtures/mail_handler/ticket_with_attributes.eml
new file mode 100644
index 000000000..ca8b19705
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_with_attributes.eml
@@ -0,0 +1,43 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Subject: New ticket on a given project
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris. Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
+Project: onlinestore
+Tracker: Feature Request
+category: stock management
+priority: URGENT
diff --git a/test/fixtures/mail_handler/ticket_with_cc.eml b/test/fixtures/mail_handler/ticket_with_cc.eml
new file mode 100644
index 000000000..a67889d82
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_with_cc.eml
@@ -0,0 +1,40 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Cc:
+Subject: New ticket on a given project
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris. Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
diff --git a/test/fixtures/mail_handler/ticket_with_custom_fields.eml b/test/fixtures/mail_handler/ticket_with_custom_fields.eml
new file mode 100644
index 000000000..e21e116f1
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_with_custom_fields.eml
@@ -0,0 +1,42 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Subject: New ticket with custom field values
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris. Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
+category: Stock management
+searchable field: Value for a custom field
+Database: postgresql
diff --git a/test/fixtures/mail_handler/ticket_with_invalid_attributes.eml b/test/fixtures/mail_handler/ticket_with_invalid_attributes.eml
new file mode 100644
index 000000000..4506078d7
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_with_invalid_attributes.eml
@@ -0,0 +1,47 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Subject: New ticket on a given project
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris. Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
+Project: onlinestore
+Tracker: Feature request
+category: Stock management
+assigned to: miscuser9@foo.bar
+priority: foo
+done ratio: x
+start date: some day
+due date: never
diff --git a/test/fixtures/mail_handler/ticket_with_localized_attributes.eml b/test/fixtures/mail_handler/ticket_with_localized_attributes.eml
new file mode 100644
index 000000000..64fabee60
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_with_localized_attributes.eml
@@ -0,0 +1,43 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Subject: New ticket on a given project
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris. Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
+Projet: onlinestore
+Tracker: Feature request
+catgorie: Stock management
+priorit: Urgent
diff --git a/test/fixtures/mail_handler/ticket_with_long_subject.eml b/test/fixtures/mail_handler/ticket_with_long_subject.eml
new file mode 100644
index 000000000..ee0bfcffd
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_with_long_subject.eml
@@ -0,0 +1,57 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Subject: New ticket on a given project with a very long subject line which exceeds 255 chars and should not be ignored but chopped off. And if the subject line is still not long enough, we just add more text. And more text. Wow, this is really annoying. Especially, if you have nothing to say...
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris --- Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+--- This line starts with a delimiter and should not be stripped
+
+This paragraph is before delimiters.
+
+BREAK
+
+This paragraph is between delimiters.
+
+---
+
+This paragraph is after the delimiter so it shouldn't appear.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
+Project: onlinestore
+Status: Resolved
+due date: 2010-12-31
+Start Date:2010-01-01
+Assigned to: John Smith
+
diff --git a/test/fixtures/mail_handler/ticket_with_spaces_between_attribute_and_separator.eml b/test/fixtures/mail_handler/ticket_with_spaces_between_attribute_and_separator.eml
new file mode 100644
index 000000000..fce1b9a09
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_with_spaces_between_attribute_and_separator.eml
@@ -0,0 +1,43 @@
+Return-Path:
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+From: "John Smith"
+To:
+Subject: New ticket on a given project
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris. Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
+Project : onlinestore
+Tracker: Feature request
+category : Stock management
+priority: Urgent
diff --git a/test/fixtures/mail_handler/ticket_without_from_header.eml b/test/fixtures/mail_handler/ticket_without_from_header.eml
new file mode 100644
index 000000000..7b237261b
--- /dev/null
+++ b/test/fixtures/mail_handler/ticket_without_from_header.eml
@@ -0,0 +1,40 @@
+Received: from osiris ([127.0.0.1])
+ by OSIRIS
+ with hMailServer ; Sun, 22 Jun 2008 12:28:07 +0200
+Message-ID: <000501c8d452$a95cd7e0$0a00a8c0@osiris>
+To:
+Subject: New ticket on a given project
+Date: Sun, 22 Jun 2008 12:28:07 +0200
+MIME-Version: 1.0
+Content-Type: text/plain;
+ format=flowed;
+ charset="iso-8859-1";
+ reply-type=original
+Content-Transfer-Encoding: 7bit
+X-Priority: 3
+X-MSMail-Priority: Normal
+X-Mailer: Microsoft Outlook Express 6.00.2900.2869
+X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas imperdiet
+turpis et odio. Integer eget pede vel dolor euismod varius. Phasellus
+blandit eleifend augue. Nulla facilisi. Duis id diam. Class aptent taciti
+sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In
+in urna sed tellus aliquet lobortis. Morbi scelerisque tortor in dolor. Cras
+sagittis odio eu lacus. Aliquam sem tortor, consequat sit amet, vestibulum
+id, iaculis at, lectus. Fusce tortor libero, congue ut, euismod nec, luctus
+eget, eros. Pellentesque tortor enim, feugiat in, dignissim eget, tristique
+sed, mauris. Pellentesque habitant morbi tristique senectus et netus et
+malesuada fames ac turpis egestas. Quisque sit amet libero. In hac habitasse
+platea dictumst.
+
+Nulla et nunc. Duis pede. Donec et ipsum. Nam ut dui tincidunt neque
+sollicitudin iaculis. Duis vitae dolor. Vestibulum eget massa. Sed lorem.
+Nullam volutpat cursus erat. Cras felis dolor, lacinia quis, rutrum et,
+dictum et, ligula. Sed erat nibh, gravida in, accumsan non, placerat sed,
+massa. Sed sodales, ante fermentum ultricies sollicitudin, massa leo
+pulvinar dui, a gravida orci mi eget odio. Nunc a lacus.
+
+Project: onlinestore
+Status: Resolved
+
diff --git a/test/fixtures/members.yml b/test/fixtures/members.yml
index 5c9f9d3db..10d52f300 100644
--- a/test/fixtures/members.yml
+++ b/test/fixtures/members.yml
@@ -60,27 +60,3 @@ members_010:
project_id: 2
user_id: 8
mail_notification: false
-members_011:
- id: 115
- user_id: 193
- project_id: 39
- created_on: 2013-09-30 08:11:15.000000000 +08:00
- mail_notification: false
-members_012:
- id: 124
- user_id: 193
- project_id: 36
- created_on: 2013-09-30 22:37:31.000000000 +08:00
- mail_notification: false
-members_013:
- id: 140
- user_id: 193
- project_id: 46
- created_on: 2013-10-08 20:52:10.000000000 +08:00
- mail_notification: false
-members_014:
- id: 242
- user_id: 193
- project_id: 74
- created_on: 2013-10-21 20:47:59.000000000 +08:00
- mail_notification: false
diff --git a/test/fixtures/plugins/foo_plugin/_foo_plugin_settings.html.erb b/test/fixtures/plugins/foo_plugin/_foo_plugin_settings.html.erb
new file mode 100644
index 000000000..8ff778f2c
--- /dev/null
+++ b/test/fixtures/plugins/foo_plugin/_foo_plugin_settings.html.erb
@@ -0,0 +1 @@
+
", textilizable(text, :attachments => attachments) }
+ set_tmp_attachments_directory
+ end
+
+ def test_textile_external_links
+ to_test = {
+ 'This is a "link":http://foo.bar' => 'This is a link',
+ 'This is an intern "link":/foo/bar' => 'This is an intern link',
+ '"link (Link title)":http://foo.bar' => 'link',
+ '"link (Link title with "double-quotes")":http://foo.bar' => 'link',
+ "This is not a \"Link\":\n\nAnother paragraph" => "This is not a \"Link\":\n\n\n\t
Another paragraph",
+ # no multiline link text
+ "This is a double quote \"on the first line\nand another on a second line\":test" => "This is a double quote \"on the first line and another on a second line\":test",
+ # mailto link
+ "\"system administrator\":mailto:sysadmin@example.com?subject=redmine%20permissions" => "system administrator",
+ # two exclamation marks
+ '"a link":http://example.net/path!602815048C7B5C20!302.html' => 'a link',
+ # escaping
+ '"test":http://foo"bar' => 'test',
+ }
+ to_test.each { |text, result| assert_equal "
#{result}
", textilizable(text) }
+ end
+
+ if 'ruby'.respond_to?(:encoding)
+ def test_textile_external_links_with_non_ascii_characters
+ to_test = {
+ 'This is a "link":http://foo.bar/тест' => 'This is a link'
+ }
+ to_test.each { |text, result| assert_equal "