Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added test for webmat's fix

  • Loading branch information...
commit 0c1e812d636d3781ece14b7f0dfe349e33fa8c4f 1 parent 8edccdc
@Sporky023 Sporky023 authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/interpolations_test.rb
View
7 test/interpolations_test.rb
@@ -77,6 +77,13 @@ class InterpolationsTest < Test::Unit::TestCase
assert_equal "found", interpolations.content_type_extension(attachment, :style)
end
+ should "be able to handle numeric style names" do
+ attachment = mock(
+ :styles => {:"4" => {:format => :expected_extension}}
+ )
+ assert_equal :expected_extension, Paperclip::Interpolations.extension(attachment, 4)
+ end
+
should "return the #to_param of the attachment" do
attachment = mock
attachment.expects(:to_param).returns("23-awesome")
Please sign in to comment.
Something went wrong with that request. Please try again.