Commit 3a76abef by Jon Yurek

Fixup formatting of "not escape to timestamp"

parent ecfb5e2a
...@@ -193,21 +193,19 @@ describe Paperclip::UrlGenerator do ...@@ -193,21 +193,19 @@ describe Paperclip::UrlGenerator do
def url_generator.respond_to(params) def url_generator.respond_to(params)
false if params == :escape false if params == :escape
end end
if updated_at url_generator.for(:style_name, {escape: true, timestamp: !!updated_at})
url_generator.for(:style_name, {escape: true, timestamp: true})
else
url_generator.for(:style_name, {escape: true})
end
end end
it "not timestamp" do it "not timestamp" do
expected = "the(expected)result[]" expected = "the(expected)result[]"
assert_equal "the%28expected%29result%5B%5D", generate(expected) assert_equal "the%28expected%29result%5B%5D", generate(expected)
end end
it "timestamp" do it "timestamp" do
expected = "the(expected)result[]" expected = "the(expected)result[]"
updated_at = 1231231234 updated_at = 1231231234
assert_equal "the%28expected%29result%5B%5D?#{updated_at}", generate(expected, updated_at) assert_equal "the%28expected%29result%5B%5D?#{updated_at}",
generate(expected, updated_at)
end end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment