summaryrefslogtreecommitdiffstats
path: root/test/unit/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/lib')
-rw-r--r--test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb1
-rw-r--r--test/unit/lib/redmine/field_format/bool_format_test.rb1
-rw-r--r--test/unit/lib/redmine/field_format/enumeration_format_test.rb1
-rw-r--r--test/unit/lib/redmine/field_format/field_format_test.rb1
-rw-r--r--test/unit/lib/redmine/field_format/link_format_test.rb5
-rw-r--r--test/unit/lib/redmine/field_format/list_format_test.rb1
-rw-r--r--test/unit/lib/redmine/field_format/numeric_format_test.rb4
-rw-r--r--test/unit/lib/redmine/field_format/user_field_format_test.rb4
8 files changed, 18 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb b/test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb
index 4ce4062bb..8d883f95a 100644
--- a/test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb
+++ b/test/unit/lib/redmine/field_format/attachment_format_visibility_test.rb
@@ -26,6 +26,7 @@ class AttachmentFormatVisibilityTest < ActionView::TestCase
:versions, :issues
def setup
+ User.current = nil
set_tmp_attachments_directory
end
diff --git a/test/unit/lib/redmine/field_format/bool_format_test.rb b/test/unit/lib/redmine/field_format/bool_format_test.rb
index 9041c81e8..2458de1ed 100644
--- a/test/unit/lib/redmine/field_format/bool_format_test.rb
+++ b/test/unit/lib/redmine/field_format/bool_format_test.rb
@@ -23,6 +23,7 @@ class Redmine::BoolFieldFormatTest < ActionView::TestCase
include Redmine::I18n
def setup
+ User.current = nil
set_language_if_valid 'en'
end
diff --git a/test/unit/lib/redmine/field_format/enumeration_format_test.rb b/test/unit/lib/redmine/field_format/enumeration_format_test.rb
index bc9a498d1..9b977b221 100644
--- a/test/unit/lib/redmine/field_format/enumeration_format_test.rb
+++ b/test/unit/lib/redmine/field_format/enumeration_format_test.rb
@@ -22,6 +22,7 @@ class Redmine::EnumerationFieldFormatTest < ActionView::TestCase
include ApplicationHelper
def setup
+ User.current = nil
set_language_if_valid 'en'
@field = IssueCustomField.create!(:name => 'List', :field_format => 'enumeration', :is_required => false)
@foo = CustomFieldEnumeration.new(:name => 'Foo')
diff --git a/test/unit/lib/redmine/field_format/field_format_test.rb b/test/unit/lib/redmine/field_format/field_format_test.rb
index f06638944..7d98f2585 100644
--- a/test/unit/lib/redmine/field_format/field_format_test.rb
+++ b/test/unit/lib/redmine/field_format/field_format_test.rb
@@ -21,6 +21,7 @@ class Redmine::FieldFormatTest < ActionView::TestCase
include ApplicationHelper
def setup
+ User.current = nil
set_language_if_valid 'en'
end
diff --git a/test/unit/lib/redmine/field_format/link_format_test.rb b/test/unit/lib/redmine/field_format/link_format_test.rb
index d5758be17..aa7e8de52 100644
--- a/test/unit/lib/redmine/field_format/link_format_test.rb
+++ b/test/unit/lib/redmine/field_format/link_format_test.rb
@@ -19,6 +19,11 @@ require File.expand_path('../../../../../test_helper', __FILE__)
require 'redmine/field_format'
class Redmine::LinkFieldFormatTest < ActionView::TestCase
+
+ def setup
+ User.current = nil
+ end
+
def test_link_field_should_substitute_value
field = IssueCustomField.new(:field_format => 'link', :url_pattern => 'http://foo/%value%')
custom_value = CustomValue.new(:custom_field => field, :customized => Issue.new, :value => "bar")
diff --git a/test/unit/lib/redmine/field_format/list_format_test.rb b/test/unit/lib/redmine/field_format/list_format_test.rb
index 8a19e3527..06a7fbda4 100644
--- a/test/unit/lib/redmine/field_format/list_format_test.rb
+++ b/test/unit/lib/redmine/field_format/list_format_test.rb
@@ -23,6 +23,7 @@ class Redmine::ListFieldFormatTest < ActionView::TestCase
include Redmine::I18n
def setup
+ User.current = nil
set_language_if_valid 'en'
end
diff --git a/test/unit/lib/redmine/field_format/numeric_format_test.rb b/test/unit/lib/redmine/field_format/numeric_format_test.rb
index e6572d8c6..72e2148d5 100644
--- a/test/unit/lib/redmine/field_format/numeric_format_test.rb
+++ b/test/unit/lib/redmine/field_format/numeric_format_test.rb
@@ -21,6 +21,10 @@ require 'redmine/field_format'
class Redmine::NumericFieldFormatTest < ActionView::TestCase
include ApplicationHelper
+ def setup
+ User.current = nil
+ end
+
def test_integer_field_with_url_pattern_should_format_as_link
field = IssueCustomField.new(:field_format => 'int', :url_pattern => 'http://foo/%value%')
custom_value = CustomValue.new(:custom_field => field, :customized => Issue.new, :value => "3")
diff --git a/test/unit/lib/redmine/field_format/user_field_format_test.rb b/test/unit/lib/redmine/field_format/user_field_format_test.rb
index 2612bb475..e545c6d4f 100644
--- a/test/unit/lib/redmine/field_format/user_field_format_test.rb
+++ b/test/unit/lib/redmine/field_format/user_field_format_test.rb
@@ -25,6 +25,10 @@ class Redmine::UserFieldFormatTest < ActionView::TestCase
:enumerations,
:custom_fields, :custom_fields_trackers, :custom_fields_projects
+ def setup
+ User.current = nil
+ end
+
def test_user_role_should_reject_blank_values
field = IssueCustomField.new(:name => 'Foo', :field_format => 'user', :user_role => ["1", ""])
field.save!