Sha256: 73093dfa2656be9af0fb5ea150d1600adc0ae033eecf9c6fa841b0fcd963a5ae

Contents?: true

Size: 729 Bytes

Versions: 7

Compression:

Stored size: 729 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'wagn/spec_helper'

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 = Card::Format.new(including_card)._render :core
    assert_view_select rendered, 'img[src=?]', "/files/TestImage-small-#{image_card.current_revision_id}.jpg"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wagn-1.12.13 spec/mods/standard/sets/type/image_spec.rb
wagn-1.12.12 spec/mods/standard/sets/type/image_spec.rb
wagn-1.12.11 spec/mods/standard/sets/type/image_spec.rb
wagn-1.12.10 spec/mods/standard/sets/type/image_spec.rb
wagn-1.12.9 spec/mods/standard/sets/type/image_spec.rb
wagn-1.12.8 spec/mods/standard/sets/type/image_spec.rb
wagn-1.12.7 spec/mods/standard/sets/type/image_spec.rb