fix spreadsheet specs

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@1209 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
t.felgentreff 15 years ago
parent f3c1d08bc9
commit a0d9866964
  1. 14
      spec/helpers/spreadsheet_builder_spec.rb

@ -48,20 +48,14 @@ describe "SpreadsheetBuilder" do
@sheet.last_row_index.should == 1
end
it "should never add headers in the first line, but move them to the second" do
it "should allow adding headers in the first line" do
@spreadsheet.add_headers((1..3).to_a, 0)
@sheet.last_row_index.should == 1
end
it "should not advance headers beyond the second row per default" do
@spreadsheet.add_headers((1..3).to_a)
@spreadsheet.add_headers((1..3).to_a)
@sheet.last_row_index.should == 1
@sheet.last_row_index.should == 0
end
it "should add headers with some formatting" do
@spreadsheet.add_headers([1])
@sheet.last_row.format(0).should_not == @sheet.last_row.format(1)
@spreadsheet.add_headers([1], 0)
@sheet.last_row.format(0).should_not == @sheet.last_row.format(2)
end
it "should start adding rows in the first line" do

Loading…
Cancel
Save