post_test.rb: add more metatag search tests.

This commit is contained in:
evazion
2017-02-06 01:58:45 -06:00
parent cac5eae3c4
commit 35b3398142
5 changed files with 340 additions and 167 deletions

View File

@@ -94,7 +94,7 @@ class Note < ActiveRecord::Base
end
def initialize_creator
self.creator_id = CurrentUser.id
self.creator_id ||= CurrentUser.id
end
def initialize_updater

View File

@@ -173,7 +173,7 @@ class Post < ActiveRecord::Base
end
def is_animated_png?
if file_ext =~ /png/i
if file_ext =~ /png/i && File.exists?(file_path)
apng = APNGInspector.new(file_path)
apng.inspect!
return apng.animated?