Skip to content

Commit

Permalink
added spec for shortcut w/ no args
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld committed Apr 21, 2011
1 parent 512d21c commit 00f226f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/requests/magickly_app_spec.rb
Expand Up @@ -43,6 +43,22 @@ def setup_image
ImageSize.new(last_response.body).get_width.should eq width
end

it "should use my Dragonfly shortcut with no arguments" do
setup_image
width = 100
shortcut = :filter_with_no_arguments
Magickly.dragonfly.configure do |c|
c.job shortcut do
process :thumb, "#{width}x"
end
end

get "/?src=#{@image_url}&#{shortcut}=true"

last_response.should be_ok
ImageSize.new(last_response.body).get_width.should eq width
end

it "should use my Dragonfly shortcut with one argument" do
setup_image
width = 100
Expand Down

0 comments on commit 00f226f

Please sign in to comment.