Sha256: 84e33e5327f3b8e5910bb5010164838ca0ff7cba0c2f435cc5773ac11bbe4809

Contents?: true

Size: 1.61 KB

Versions: 1

Compression:

Stored size: 1.61 KB

Contents

require "spec_helper"

describe OpenXml::DrawingML::Elements::GraphicFrameLocks do
  include ElementTestMacros

  it_should_use tag: :graphicFrameLocks, name: "graphic_frame_locks"

  for_attribute(:noChangeAspect) do
    with_values([true, false]) do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_value(:neither) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:noDrilldown) do
    with_values([true, false]) do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_value(:neither) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:noGrouping, displays_as: :noGrp) do
    with_values([true, false]) do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_value(:neither) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:noMove) do
    with_values([true, false]) do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_value(:neither) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:noResize) do
    with_values([true, false]) do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_value(:neither) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:noSelect) do
    with_values([true, false]) do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_value(:neither) do
      it_should_raise_an_exception
    end
  end

  with_no_attributes_set do
    it_should_output "<a:graphicFrameLocks/>", assign: false
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openxml-docx-0.10.0 spec/elements/drawingml/graphic_frame_locks_spec.rb