Commit 49c7e59a by Ivan Lan

feat: update test data

parent f1a33c17
RSpec.describe TalltyImportExport::Importable do
before do
@payload = {
a: 'a_______',
b: 'b_______',
c: [
{ c1: 'c1_0____', c2: 'c2_0____', c3: 'c3_0____'},
{ c1: 'c1_1____', c2: 'c2_1____', c3: 'c3_1____'},
{ c1: 'c1_2____', c2: 'c2_2____', c3: 'c3_2____'},
{ c1: 'c1_3____', c2: 'c2_3____', c3: 'c3_3____'},
{ c1: 'c1_4____', c2: 'c2_4____', c3: 'c3_4____'},
],
d: [
{ d1: 'd1_0____', d2: 'd2_0____' },
{ d1: 'd1_1____', d2: 'd2_1____' },
{ d1: 'd1_2____', d2: 'd2_2____' },
{ d1: 'd1_3____', d2: 'd2_3____' },
],
e: [
{
e1: 'e1_1____',
e2: 'e2_1____',
e3: [
{ e31: 'e31_1_0_', e32: 'e32_1_0_', e33: 'e33_1_0_' },
{ e31: 'e31_1_1_', e32: 'e32_1_1_', e33: 'e33_1_1_' },
{ e31: 'e31_1_2_', e32: 'e32_1_2_', e33: 'e33_1_2_' },
{ e31: 'e31_1_3_', e32: 'e32_1_3_', e33: 'e33_1_3_' },
],
e4: 'e4_1____',
},
{
e1: 'e1_2____',
e2: 'e2_2____',
e3: [
{ e31: 'e31_2_0_', e32: 'e32_2_0_', e33: 'e33_2_0_' },
{ e31: 'e31_2_1_', e32: 'e32_2_1_', e33: 'e33_2_1_' },
{ e31: 'e31_2_2_', e32: 'e32_2_2_', e33: 'e33_2_2_' },
],
e4: 'e4_2____',
},
{
e1: 'e1_3____',
e2: 'e2_3____',
e3: [
{ e31: 'e31_3_0_', e32: 'e32_3_0_', e33: 'e33_3_0_' },
{ e31: 'e31_3_1_', e32: 'e32_3_1_', e33: 'e33_3_1_' },
{ e31: 'e31_3_2_', e32: 'e32_3_2_', e33: 'e33_3_2_' },
],
e4: 'e4_3____',
},
],
f: 'f_______',
}
@header_h = {
items: [
{ key: :a },
{ key: :b },
{ key: :c, children: [
{ key: :c1 },
{ key: :c2 },
{ key: :c3 },
] },
{ key: :d, children: [
{ key: :d1 },
{ key: :d2 },
] },
{ key: :e, children: [
{ key: :e1 },
{ key: :e2 },
{ key: :e3, children: [
{ key: :e31 },
{ key: :e32 },
{ key: :e33 },
]},
{ key: :e4 },
] },
{ key: :f },
]
}
end
it 'export' do
TalltyImportExport::ExportForm.new.export_workbook nil, [@payload], { headers: @header_h[:items] }
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment