|
|
@ -62,16 +62,14 @@ describe "WorkPackageXlsExport Custom Fields" do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
let(:export) do |
|
|
|
let(:export) do |
|
|
|
OpenProject::XlsExport::WorkPackageXlsExport.new( |
|
|
|
OpenProject::XlsExport::WorkPackageXlsExport.new query |
|
|
|
query |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def load_sheet(export) |
|
|
|
def load_sheet(export) |
|
|
|
f = Tempfile.new 'result.xls' |
|
|
|
f = Tempfile.new 'result.xls' |
|
|
|
begin |
|
|
|
begin |
|
|
|
f.binmode |
|
|
|
f.binmode |
|
|
|
f.write export.list.content |
|
|
|
f.write export.list(&:content) |
|
|
|
ensure |
|
|
|
ensure |
|
|
|
f.close |
|
|
|
f.close |
|
|
|
end |
|
|
|
end |
|
|
|