Sha256: 25187382ea3bb73e767f33f7bdae5f8dcd38a72ab34d9ed2972a5725e06e8c36
Contents?: true
Size: 832 Bytes
Versions: 8
Compression:
Stored size: 832 Bytes
Contents
require 'test_helper' class UtilsTest < ActiveSupport::TestCase test 'exists filethumb' do %w(avi doc docx exe gz htm jpg mp3 mpg pdf psd rar swf tar txt wmv xlsx zip).each do |ext| assert_equal "ckeditor/filebrowser/thumbs/#{ext}.gif", Ckeditor::Utils.filethumb("somefile.#{ext}") end assert_equal "ckeditor/filebrowser/thumbs/unknown.gif", Ckeditor::Utils.filethumb("somefile.ddd") end test 'wrong filethumb' do assert_equal "ckeditor/filebrowser/thumbs/unknown.gif", Ckeditor::Utils.filethumb("somefile.ddd") assert_equal "ckeditor/filebrowser/thumbs/unknown.gif", Ckeditor::Utils.filethumb("somefile") assert_equal "ckeditor/filebrowser/thumbs/unknown.gif", Ckeditor::Utils.filethumb("") assert_equal "ckeditor/filebrowser/thumbs/unknown.gif", Ckeditor::Utils.filethumb(nil) end end
Version data entries
8 entries across 8 versions & 2 rubygems