Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tallty_import_export
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
tallty_import_export
Commits
49c7e59a
Commit
49c7e59a
authored
May 02, 2022
by
Ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update test data
parent
f1a33c17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
0 deletions
+86
-0
export_spec.rb
spec/export_spec.rb
+86
-0
No files found.
spec/export_spec.rb
0 → 100644
View file @
49c7e59a
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment