refactored search

This commit is contained in:
albert
2013-01-10 17:45:52 -05:00
parent 13271e9bf5
commit 8749c43b3e
85 changed files with 946 additions and 304 deletions

View File

@@ -7,11 +7,13 @@ class UploadTest < ActiveSupport::TestCase
CurrentUser.user = user
CurrentUser.ip_addr = "127.0.0.1"
MEMCACHE.flush_all
Delayed::Worker.delay_jobs = false
end
teardown do
CurrentUser.user = nil
CurrentUser.ip_addr = nil
Delayed::Worker.delay_jobs = true
@upload.delete_temp_file if @upload
end
@@ -122,7 +124,7 @@ class UploadTest < ActiveSupport::TestCase
assert(File.exists?(@upload.resized_file_path_for(Danbooru.config.small_image_width)))
assert_equal(6197, File.size(@upload.resized_file_path_for(Danbooru.config.small_image_width)))
assert(File.exists?(@upload.resized_file_path_for(Danbooru.config.large_image_width)))
assert_equal(117877, File.size(@upload.resized_file_path_for(Danbooru.config.large_image_width)))
assert_equal(108224, File.size(@upload.resized_file_path_for(Danbooru.config.large_image_width)))
end
end