@@ -42,13 +42,13 @@ module ForestLiana
42
42
id : 'animals' ,
43
43
attributes : {
44
44
fields : [
45
- { 'is-sortable' : false , field : 'id' , 'is-filterable' : false , type : 'Number' } ,
45
+ { is_sortable : false , field : 'id' , is_filterable : false , type : 'Number' } ,
46
46
{ type : 'Date' , field : 'createdAt' } ,
47
47
{ field : 'updatedAt' , type : 'Date' } ,
48
48
] ,
49
49
name : 'animals' ,
50
50
integration : 'close.io' ,
51
- 'is-virtual' : true ,
51
+ is_virtual : true ,
52
52
}
53
53
} ] ,
54
54
'included' : [ {
@@ -66,16 +66,16 @@ module ForestLiana
66
66
attributes : {
67
67
name : 'import' ,
68
68
fields : [ {
69
- isRequired : true ,
69
+ is_required : true ,
70
70
type : 'Boolean' ,
71
71
field : 'Save' ,
72
72
description : 'save the import file if true.' ,
73
- defaultValue : 'true'
73
+ default_value : 'true'
74
74
} , {
75
75
type : 'File' ,
76
76
field : 'File'
77
77
} ] ,
78
- 'http-method' : nil
78
+ http_method : nil
79
79
}
80
80
} , {
81
81
attributes : {
@@ -95,7 +95,7 @@ module ForestLiana
95
95
download : nil ,
96
96
endpoint : nil ,
97
97
redirect : nil ,
98
- 'http-method ' : nil
98
+ 'http_method ' : nil
99
99
}
100
100
} ]
101
101
}
@@ -120,7 +120,7 @@ module ForestLiana
120
120
end
121
121
122
122
it 'should sort the data collections attributes values' do
123
- expect ( apimap_sorted [ 'data' ] [ 0 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' , 'integration' , 'is-virtual ' , 'fields' ] )
123
+ expect ( apimap_sorted [ 'data' ] [ 0 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' , 'integration' , 'is_virtual ' , 'fields' ] )
124
124
expect ( apimap_sorted [ 'data' ] [ 1 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' , 'fields' ] )
125
125
expect ( apimap_sorted [ 'data' ] [ 2 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' , 'fields' ] )
126
126
end
@@ -132,7 +132,7 @@ module ForestLiana
132
132
end
133
133
134
134
it 'should sort the data collections attributes fields values' do
135
- expect ( apimap_sorted [ 'data' ] [ 0 ] [ 'attributes' ] [ 'fields' ] [ 1 ] . keys ) . to eq ( [ 'field' , 'type' , 'is-filterable ' , 'is-sortable ' ] )
135
+ expect ( apimap_sorted [ 'data' ] [ 0 ] [ 'attributes' ] [ 'fields' ] [ 1 ] . keys ) . to eq ( [ 'field' , 'type' , 'is_filterable ' , 'is_sortable ' ] )
136
136
end
137
137
138
138
it 'should sort the included actions and segments objects' do
@@ -148,8 +148,8 @@ module ForestLiana
148
148
end
149
149
150
150
it 'should sort the included actions and segments objects attributes values' do
151
- expect ( apimap_sorted [ 'included' ] [ 0 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' , 'download' , ' endpoint', 'global ' , 'http-method ' , 'redirect ' ] )
152
- expect ( apimap_sorted [ 'included' ] [ 1 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' , 'http-method ' , 'fields' ] )
151
+ expect ( apimap_sorted [ 'included' ] [ 0 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' , 'endpoint' , 'http_method ' , 'redirect ' , 'download ' ] )
152
+ expect ( apimap_sorted [ 'included' ] [ 1 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' , 'http_method ' , 'fields' ] )
153
153
expect ( apimap_sorted [ 'included' ] [ 2 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' ] )
154
154
expect ( apimap_sorted [ 'included' ] [ 3 ] [ 'attributes' ] . keys ) . to eq ( [ 'name' ] )
155
155
end
@@ -159,7 +159,7 @@ module ForestLiana
159
159
end
160
160
161
161
it 'should sort the included action fields values' do
162
- expect ( apimap_sorted [ 'included' ] [ 1 ] [ 'attributes' ] [ 'fields' ] [ 1 ] . keys ) . to eq ( [ 'field' , 'type' , 'defaultValue ' , 'description ' , 'isRequired ' ] )
162
+ expect ( apimap_sorted [ 'included' ] [ 1 ] [ 'attributes' ] [ 'fields' ] [ 1 ] . keys ) . to eq ( [ 'field' , 'type' , 'default_value ' , 'is_required ' , 'description ' ] )
163
163
end
164
164
165
165
it 'should sort the meta values' do
0 commit comments