Sha256: 40fd4e2ea06adce5a605a564fba9bf5ff9947fe535d404cdbe4b8403b97a0ed6

Contents?: true

Size: 1.47 KB

Versions: 26

Compression:

Stored size: 1.47 KB

Contents

require 'spec_helper'

describe "Picture url helpers" do

  it "should generate a url string for cropped picture" do
    p = show_picture_path(:id => 3, :crop => "crop", :size => "100x33", :name => "kitten", :format => "jpg")
    p.should == "/pictures/3/show/100x33/crop/kitten.jpg"
  end

  it "should generate a url string for cropped and masked picture" do
    p = show_picture_path(:id => 3, :crop => "crop", :crop_from => "0x0", :crop_size => "900x300", :size => "100x33", :name => "kitten", :format => :jpg)
    p.should == "/pictures/3/show/100x33/crop/0x0/900x300/kitten.jpg"
  end

  it "should generate a url string for cropped thumbnail" do
    p = thumbnail_path(:id => 3, :crop => "crop", :size => "100x33", :name => "kitten", :format => :jpg)
    p.should == "/pictures/3/thumbnails/100x33/crop/kitten.jpg"
  end

  it "should generate a url string for thumbnail with default name and format" do
    p = thumbnail_path(:id => 3, :size => "100x33")
    p.should == "/pictures/3/thumbnails/100x33/thumbnail.png"
  end

  it "should generate a url string for cropped and masked thumbnail" do
    p = thumbnail_path(:id => 3, :crop_from => "0x0", :crop_size => "900x300", :size => "100x33", :name => "kitten", :format => :jpg)
    p.should == "/pictures/3/thumbnails/100x33/0x0/900x300/kitten.jpg"
  end

  it "should generate a url string for zoomed image" do
    p = zoom_picture_path(:id => 3, :name => "kitten", :format => :jpg)
    p.should == "/pictures/3/zoom/kitten.jpg"
  end

end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
alchemy_cms-2.9.1 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.4 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.3 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.2 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.1 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.0 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.0.rc8 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.9.0 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.8.3 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.7.5 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.6.3 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.0.rc7 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.0.rc6 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.7.4 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.8.2 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.8.1 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.7.3 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-3.0.0.rc5 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.7.2 spec/helpers/picture_url_helpers_spec.rb
alchemy_cms-2.7.1 spec/helpers/picture_url_helpers_spec.rb