summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redmine/wiki_formatting.rb2
-rw-r--r--test/functional/attachments_controller_test.rb2
-rw-r--r--test/unit/attachment_test.rb6
-rw-r--r--test/unit/changeset_test.rb4
-rw-r--r--test/unit/wiki_content_test.rb4
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb
index 558d3e117..ce6097646 100644
--- a/lib/redmine/wiki_formatting.rb
+++ b/lib/redmine/wiki_formatting.rb
@@ -88,7 +88,7 @@ module Redmine
def to_html(format, text, options = {})
text =
- if Setting.cache_formatted_text? && text.size > 2.kilobyte && cache_store &&
+ if Setting.cache_formatted_text? && text.size > 2.kilobytes && cache_store &&
cache_key = cache_key_for(format, text, options[:object], options[:attribute])
# Text retrieved from the cache store may be frozen
# We need to dup it so we can do in-place substitutions with gsub!
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb
index 2af340f6d..61c71b312 100644
--- a/test/functional/attachments_controller_test.rb
+++ b/test/functional/attachments_controller_test.rb
@@ -201,7 +201,7 @@ class AttachmentsControllerTest < Redmine::ControllerTest
def test_show_text_file_should_show_other_if_too_big
@request.session[:user_id] = 2
with_settings :file_max_size_displayed => 512 do
- Attachment.find(4).update_attribute :filesize, 754.kilobyte
+ Attachment.find(4).update_attribute :filesize, 754.kilobytes
get(:show, :params => {:id => 4})
assert_response :success
assert_equal 'text/html', @response.media_type
diff --git a/test/unit/attachment_test.rb b/test/unit/attachment_test.rb
index 1b292b9bf..6af8b79d7 100644
--- a/test/unit/attachment_test.rb
+++ b/test/unit/attachment_test.rb
@@ -113,13 +113,13 @@ class AttachmentTest < ActiveSupport::TestCase
end
def test_filesize_greater_than_2gb_should_be_supported
- with_settings :attachment_max_size => (50.gigabyte / 1024) do
+ with_settings :attachment_max_size => (50.gigabytes / 1024) do
a = Attachment.create!(:container => Issue.find(1),
:file => uploaded_test_file("testfile.txt", "text/plain"),
:author => User.find(1))
- a.filesize = 20.gigabyte
+ a.filesize = 20.gigabytes
a.save!
- assert_equal 20.gigabyte, a.reload.filesize
+ assert_equal 20.gigabytes, a.reload.filesize
end
end
diff --git a/test/unit/changeset_test.rb b/test/unit/changeset_test.rb
index 5a7773afb..655282189 100644
--- a/test/unit/changeset_test.rb
+++ b/test/unit/changeset_test.rb
@@ -661,10 +661,10 @@ class ChangesetTest < ActiveSupport::TestCase
:committed_on => Time.now,
:revision => '123',
:scmid => '12345',
- :comments => "a" * 500.kilobyte)
+ :comments => "a" * 500.kilobytes)
assert c.save
c.reload
- assert_equal 500.kilobyte, c.comments.size
+ assert_equal 500.kilobytes, c.comments.size
end
def test_identifier
diff --git a/test/unit/wiki_content_test.rb b/test/unit/wiki_content_test.rb
index 05cfc13d0..0e3b95860 100644
--- a/test/unit/wiki_content_test.rb
+++ b/test/unit/wiki_content_test.rb
@@ -120,10 +120,10 @@ class WikiContentTest < ActiveSupport::TestCase
def test_large_text_should_not_be_truncated_to_64k
page = WikiPage.new(:wiki => @wiki, :title => "Big page")
- page.content = WikiContent.new(:text => "a" * 500.kilobyte, :author => User.find(1))
+ page.content = WikiContent.new(:text => "a" * 500.kilobytes, :author => User.find(1))
assert page.save
page.reload
- assert_equal 500.kilobyte, page.content.text.size
+ assert_equal 500.kilobytes, page.content.text.size
end
def test_current_version