Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Less confusing spoofing error, hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Yurek committed Feb 14, 2014
1 parent 00787da commit b45eac2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/paperclip/locales/en.yml
Expand Up @@ -2,7 +2,7 @@ en:
errors: errors:
messages: messages:
in_between: "must be in between %{min} and %{max}" in_between: "must be in between %{min} and %{max}"
spoofed_media_type: "media type is spoofed" spoofed_media_type: "has an extension that does not match its contents"


number: number:
human: human:
Expand Down
Expand Up @@ -27,6 +27,6 @@ def build_validator(options = {})
Paperclip::MediaTypeSpoofDetector.stubs(:using).returns(detector) Paperclip::MediaTypeSpoofDetector.stubs(:using).returns(detector)
@validator.validate(@dummy) @validator.validate(@dummy)


assert_equal "media type is spoofed", @dummy.errors[:avatar].first assert_equal "has an extension that does not match its contents", @dummy.errors[:avatar].first
end end
end end

0 comments on commit b45eac2

Please sign in to comment.