Skip to content

Commit 3a76abe

Browse files
author
Jon Yurek
committed
Fixup formatting of "not escape to timestamp"
1 parent ecfb5e2 commit 3a76abe

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

spec/paperclip/url_generator_spec.rb

+5-7
Original file line numberDiff line numberDiff line change
@@ -193,21 +193,19 @@ def generate(expected, updated_at=nil)
193193
def url_generator.respond_to(params)
194194
false if params == :escape
195195
end
196-
if updated_at
197-
url_generator.for(:style_name, {escape: true, timestamp: true})
198-
else
199-
url_generator.for(:style_name, {escape: true})
200-
end
196+
url_generator.for(:style_name, {escape: true, timestamp: !!updated_at})
201197
end
198+
202199
it "not timestamp" do
203200
expected = "the(expected)result[]"
204201
assert_equal "the%28expected%29result%5B%5D", generate(expected)
205202
end
203+
206204
it "timestamp" do
207205
expected = "the(expected)result[]"
208206
updated_at = 1231231234
209-
assert_equal "the%28expected%29result%5B%5D?#{updated_at}", generate(expected, updated_at)
207+
assert_equal "the%28expected%29result%5B%5D?#{updated_at}",
208+
generate(expected, updated_at)
210209
end
211210
end
212-
213211
end

0 commit comments

Comments
 (0)