Sha256: 70c9688a925d5685434bd0ccba963c5eb29ace8af3d199070835cca5aef0e4e6

Contents?: true

Size: 837 Bytes

Versions: 3

Compression:

Stored size: 837 Bytes

Contents

# coding: utf-8

require 'test_helper'

class Thinreports::Core::Shape::ImageBlock::TestInternal < Minitest::Test
  include Thinreports::TestHelper

  ImageBlock = Thinreports::Core::Shape::ImageBlock

  def test_src_should_return_the_same_value_as_value_method
    internal = create_internal
    internal.write_value('/path/to/image.png')

    assert_same internal.src, internal.read_value
  end

  def test_type_of_asker_should_return_true_when_iblock_value_is_given
    assert_equal create_internal.type_of?(:iblock), true
  end

  def test_type_of_asker_should_return_true_when_block_value_is_given
    assert_equal create_internal.type_of?(:block), true
  end

  def create_internal
    report = new_report 'layout_text1'
    parent = report.start_new_page

    ImageBlock::Internal.new parent, ImageBlock::Format.new({})
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
thinreports-0.8.2 test/unit/core/shape/image_block/test_internal.rb
thinreports-0.8.1 test/unit/core/shape/image_block/test_internal.rb
thinreports-0.8.0 test/unit/core/shape/image_block/test_internal.rb