require "spec_helper"
describe OpenXml::Docx::Properties::Numbering do
include PropertyTestMacros
it_should_use tag: :numPr, name: "numbering"
for_attribute(:level) do
with_value(24) do
it_should_assign_successfully
it_should_output "\n \n "
end
with_value(-24) do
it_should_raise_an_exception
end
with_value(:big) do
it_should_raise_an_exception
end
end
for_attribute(:id) do
with_value(24) do
it_should_assign_successfully
it_should_output "\n \n "
end
with_value(-24) do
it_should_raise_an_exception
end
with_value(:big) do
it_should_raise_an_exception
end
end
with_no_attributes_set do
it_should_output "", assign: false
end
with_these_attributes_set(level: 4, id: 0) do
it_should_output "\n \n \n ", assign: false
end
end