Sha256: 765a3cb1d885621840ad309f55a40619bc5bb391fb35d97bcf1bf1a5c576051f

Contents?: true

Size: 695 Bytes

Versions: 12

Compression:

Stored size: 695 Bytes

Contents

# -*- encoding : utf-8 -*-

describe Card::Set::Type::Image do
  it "should have special editor" do
    assert_view_select render_editor('Image'), 'div[class="choose-file"]' do
      assert_select 'input[class~="file-upload slotter"]'
    end
  end

  it "should handle size argument in inclusion syntax" do
    image_card = Card.create! :name => "TestImage", :type=>"Image", :content => %{TestImage.jpg\nimage/jpeg\n12345}
    including_card = Card.new :name => 'Image1', :content => "{{TestImage | core; size:small }}"
    rendered = including_card.format._render :core
    assert_view_select rendered, 'img[src=?]', "/files/TestImage-small-#{image_card.last_content_action_id}.jpg"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
card-1.16.1 mod/05_standard/spec/set/type/image_spec.rb
card-1.16.0 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.7 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.6 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.5 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.4 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.3 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.2 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.1 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.0 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.pre2 mod/05_standard/spec/set/type/image_spec.rb
card-1.15.pre mod/05_standard/spec/set/type/image_spec.rb