freeclimb 5.2.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/Gemfile.lock +3 -3
- data/README.md +17 -4
- data/docs/CallResult.md +2 -2
- data/docs/CreateConference.md +4 -2
- data/docs/DefaultApi.md +368 -1
- data/docs/ExportList.md +32 -0
- data/docs/ExportOutputType.md +16 -0
- data/docs/ExportRequest.md +24 -0
- data/docs/ExportRequestOutput.md +18 -0
- data/docs/ExportResourceType.md +17 -0
- data/docs/ExportResult.md +40 -0
- data/docs/ExportResultOutput.md +18 -0
- data/docs/ExportStatus.md +21 -0
- data/lib/freeclimb/api/default_api.rb +313 -0
- data/lib/freeclimb/models/call_result.rb +8 -8
- data/lib/freeclimb/models/create_conference.rb +15 -5
- data/lib/freeclimb/models/export_list.rb +304 -0
- data/lib/freeclimb/models/export_output_type.rb +34 -0
- data/lib/freeclimb/models/export_request.rb +276 -0
- data/lib/freeclimb/models/export_request_output.rb +243 -0
- data/lib/freeclimb/models/export_resource_type.rb +35 -0
- data/lib/freeclimb/models/export_result.rb +405 -0
- data/lib/freeclimb/models/export_result_output.rb +243 -0
- data/lib/freeclimb/models/export_status.rb +39 -0
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +8 -0
- data/openapi.json +370 -2
- data/spec/api/default_api_spec.rb +141 -2
- data/spec/models/call_result_spec.rb +36 -36
- data/spec/models/create_conference_spec.rb +83 -35
- data/spec/models/export_list_spec.rb +502 -0
- data/spec/models/export_output_type_spec.rb +43 -0
- data/spec/models/export_request_output_spec.rb +162 -0
- data/spec/models/export_request_spec.rb +320 -0
- data/spec/models/export_resource_type_spec.rb +59 -0
- data/spec/models/export_result_output_spec.rb +162 -0
- data/spec/models/export_result_spec.rb +718 -0
- data/spec/models/export_status_spec.rb +123 -0
- data/yarn.lock +29 -29
- metadata +26 -2
@@ -0,0 +1,718 @@
|
|
1
|
+
# #FreeClimb API
|
2
|
+
#
|
3
|
+
# FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.
|
4
|
+
#
|
5
|
+
# The version of the OpenAPI document: 1.0.0
|
6
|
+
# Contact: support@freeclimb.com
|
7
|
+
# Generated by: https://openapi-generator.tech
|
8
|
+
# OpenAPI Generator version: 7.9.0
|
9
|
+
#
|
10
|
+
|
11
|
+
require "spec_helper"
|
12
|
+
require "json"
|
13
|
+
require "date"
|
14
|
+
include Freeclimb
|
15
|
+
|
16
|
+
# Unit tests for Freeclimb::ExportResult
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe Freeclimb::ExportResult do
|
20
|
+
let(:instance) { Freeclimb::ExportResult.new }
|
21
|
+
|
22
|
+
describe "test an instance of ExportResult" do
|
23
|
+
it "should create an instance of ExportResult" do
|
24
|
+
expect(instance).to be_instance_of(Freeclimb::ExportResult)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test attribute "account_id"' do
|
29
|
+
it "should work" do
|
30
|
+
instance.account_id = "TEST_STRING"
|
31
|
+
expect(instance.account_id).to eq("TEST_STRING")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe 'test attribute "uri"' do
|
36
|
+
it "should work" do
|
37
|
+
instance.uri = "TEST_STRING"
|
38
|
+
expect(instance.uri).to eq("TEST_STRING")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe 'test attribute "date_created"' do
|
43
|
+
it "should work" do
|
44
|
+
instance.date_created = "TEST_STRING"
|
45
|
+
expect(instance.date_created).to eq("TEST_STRING")
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe 'test attribute "date_updated"' do
|
50
|
+
it "should work" do
|
51
|
+
instance.date_updated = "TEST_STRING"
|
52
|
+
expect(instance.date_updated).to eq("TEST_STRING")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe 'test attribute "revision"' do
|
57
|
+
it "should work" do
|
58
|
+
instance.revision = 0
|
59
|
+
expect(instance.revision).to eq(0)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe 'test attribute "export_id"' do
|
64
|
+
it "should work" do
|
65
|
+
instance.export_id = "TEST_STRING"
|
66
|
+
expect(instance.export_id).to eq("TEST_STRING")
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe 'test attribute "status"' do
|
71
|
+
it "assigns value INTAKING" do
|
72
|
+
instance.status = Freeclimb::ExportStatus::INTAKING
|
73
|
+
expect(instance.status).to eq(Freeclimb::ExportStatus::INTAKING)
|
74
|
+
end
|
75
|
+
it "assigns value QUEUED" do
|
76
|
+
instance.status = Freeclimb::ExportStatus::QUEUED
|
77
|
+
expect(instance.status).to eq(Freeclimb::ExportStatus::QUEUED)
|
78
|
+
end
|
79
|
+
it "assigns value IN_PROGRESS" do
|
80
|
+
instance.status = Freeclimb::ExportStatus::IN_PROGRESS
|
81
|
+
expect(instance.status).to eq(Freeclimb::ExportStatus::IN_PROGRESS)
|
82
|
+
end
|
83
|
+
it "assigns value COMPLETED" do
|
84
|
+
instance.status = Freeclimb::ExportStatus::COMPLETED
|
85
|
+
expect(instance.status).to eq(Freeclimb::ExportStatus::COMPLETED)
|
86
|
+
end
|
87
|
+
it "assigns value FAILED" do
|
88
|
+
instance.status = Freeclimb::ExportStatus::FAILED
|
89
|
+
expect(instance.status).to eq(Freeclimb::ExportStatus::FAILED)
|
90
|
+
end
|
91
|
+
it "assigns value DELETED" do
|
92
|
+
instance.status = Freeclimb::ExportStatus::DELETED
|
93
|
+
expect(instance.status).to eq(Freeclimb::ExportStatus::DELETED)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
describe 'test attribute "size"' do
|
97
|
+
it "should work" do
|
98
|
+
instance.size = 1
|
99
|
+
expect(instance.size).to eq(1)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
describe 'test attribute "resource_type"' do
|
104
|
+
it "assigns value MESSAGES" do
|
105
|
+
instance.resource_type = Freeclimb::ExportResourceType::MESSAGES
|
106
|
+
expect(instance.resource_type).to eq(Freeclimb::ExportResourceType::MESSAGES)
|
107
|
+
end
|
108
|
+
it "assigns value CALLS" do
|
109
|
+
instance.resource_type = Freeclimb::ExportResourceType::CALLS
|
110
|
+
expect(instance.resource_type).to eq(Freeclimb::ExportResourceType::CALLS)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
describe 'test attribute "query"' do
|
114
|
+
it "should work" do
|
115
|
+
testObject = Object.new
|
116
|
+
instance.query = testObject
|
117
|
+
expect(instance.query).to eq(testObject)
|
118
|
+
|
119
|
+
instance.query = Object.new
|
120
|
+
expect(instance.query).to be_instance_of(Object)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
describe 'test attribute "format"' do
|
125
|
+
it "should work" do
|
126
|
+
instance.format = ["ELEMENT_1", "ELEMENT_2"]
|
127
|
+
expect(instance.format).to eq(["ELEMENT_1", "ELEMENT_2"])
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
describe 'test attribute "output"' do
|
132
|
+
it "should work" do
|
133
|
+
instance.output = ExportResultOutput.new
|
134
|
+
expect(instance.output).to be_instance_of(ExportResultOutput)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
describe 'test method "initialize"' do
|
139
|
+
it "properly initializes with values" do
|
140
|
+
expect {
|
141
|
+
Freeclimb::ExportResult.new(
|
142
|
+
account_id: "TS",
|
143
|
+
|
144
|
+
uri: "TS",
|
145
|
+
|
146
|
+
date_created: "TS",
|
147
|
+
|
148
|
+
date_updated: "TS",
|
149
|
+
|
150
|
+
revision: 0,
|
151
|
+
|
152
|
+
export_id: "TS",
|
153
|
+
|
154
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
155
|
+
|
156
|
+
size: 1,
|
157
|
+
|
158
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
159
|
+
|
160
|
+
query: Object.new,
|
161
|
+
|
162
|
+
format: [],
|
163
|
+
|
164
|
+
output: ExportResultOutput.new
|
165
|
+
)
|
166
|
+
}.not_to raise_error
|
167
|
+
end
|
168
|
+
it "fails to initialize with input argument that is not a hash in Freeclimb::ExportResult" do
|
169
|
+
expect {
|
170
|
+
Freeclimb::ExportResult.new(
|
171
|
+
account_id: "TS",
|
172
|
+
|
173
|
+
uri: "TS",
|
174
|
+
|
175
|
+
date_created: "TS",
|
176
|
+
|
177
|
+
date_updated: "TS",
|
178
|
+
|
179
|
+
revision: 0,
|
180
|
+
|
181
|
+
export_id: "TS",
|
182
|
+
|
183
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
184
|
+
|
185
|
+
size: 1,
|
186
|
+
|
187
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
188
|
+
|
189
|
+
query: Object.new,
|
190
|
+
|
191
|
+
format: [],
|
192
|
+
|
193
|
+
output: ExportResultOutput.new,
|
194
|
+
|
195
|
+
invalid_attribute: true
|
196
|
+
)
|
197
|
+
}.to raise_error(ArgumentError)
|
198
|
+
end
|
199
|
+
it "fails to initialize with invalid attribute" do
|
200
|
+
expect {
|
201
|
+
Freeclimb::ExportResult.new(
|
202
|
+
account_id: "TS",
|
203
|
+
|
204
|
+
uri: "TS",
|
205
|
+
|
206
|
+
date_created: "TS",
|
207
|
+
|
208
|
+
date_updated: "TS",
|
209
|
+
|
210
|
+
revision: 0,
|
211
|
+
|
212
|
+
export_id: "TS",
|
213
|
+
|
214
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
215
|
+
|
216
|
+
size: 1,
|
217
|
+
|
218
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
219
|
+
|
220
|
+
query: Object.new,
|
221
|
+
|
222
|
+
format: [],
|
223
|
+
|
224
|
+
output: ExportResultOutput.new,
|
225
|
+
|
226
|
+
invalid_attribute: true
|
227
|
+
)
|
228
|
+
}.to raise_error(ArgumentError)
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
describe 'test method "valid"' do
|
233
|
+
it "checks if properties are valid" do
|
234
|
+
instance = Freeclimb::ExportResult.new(
|
235
|
+
account_id: "TS",
|
236
|
+
|
237
|
+
uri: "TS",
|
238
|
+
|
239
|
+
date_created: "TS",
|
240
|
+
|
241
|
+
date_updated: "TS",
|
242
|
+
|
243
|
+
revision: 0,
|
244
|
+
|
245
|
+
export_id: "TS",
|
246
|
+
|
247
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
248
|
+
|
249
|
+
size: 1,
|
250
|
+
|
251
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
252
|
+
|
253
|
+
query: Object.new,
|
254
|
+
|
255
|
+
format: [],
|
256
|
+
|
257
|
+
output: ExportResultOutput.new
|
258
|
+
)
|
259
|
+
expect(instance.valid?).to eq(true)
|
260
|
+
end
|
261
|
+
|
262
|
+
skip "checks if properties are invalid" do
|
263
|
+
instance = Freeclimb::ExportResult.new
|
264
|
+
|
265
|
+
expect(instance.valid?).to eq(false)
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
describe 'test method "eql?"' do
|
270
|
+
it "checks if objects are equal" do
|
271
|
+
obj_Object = Object.new
|
272
|
+
|
273
|
+
obj_ExportResultOutput = ExportResultOutput.new
|
274
|
+
|
275
|
+
instance_1 = Freeclimb::ExportResult.new(
|
276
|
+
account_id: "TS",
|
277
|
+
|
278
|
+
uri: "TS",
|
279
|
+
|
280
|
+
date_created: "TS",
|
281
|
+
|
282
|
+
date_updated: "TS",
|
283
|
+
|
284
|
+
revision: 0,
|
285
|
+
|
286
|
+
export_id: "TS",
|
287
|
+
|
288
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
289
|
+
|
290
|
+
size: 1,
|
291
|
+
|
292
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
293
|
+
|
294
|
+
query: obj_Object,
|
295
|
+
|
296
|
+
format: [],
|
297
|
+
|
298
|
+
output: obj_ExportResultOutput
|
299
|
+
)
|
300
|
+
instance_2 = Freeclimb::ExportResult.new(
|
301
|
+
account_id: "TS",
|
302
|
+
|
303
|
+
uri: "TS",
|
304
|
+
|
305
|
+
date_created: "TS",
|
306
|
+
|
307
|
+
date_updated: "TS",
|
308
|
+
|
309
|
+
revision: 0,
|
310
|
+
|
311
|
+
export_id: "TS",
|
312
|
+
|
313
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
314
|
+
|
315
|
+
size: 1,
|
316
|
+
|
317
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
318
|
+
|
319
|
+
query: obj_Object,
|
320
|
+
|
321
|
+
format: [],
|
322
|
+
|
323
|
+
output: obj_ExportResultOutput
|
324
|
+
)
|
325
|
+
expect(instance_1.eql?(instance_2)).to eq(true)
|
326
|
+
end
|
327
|
+
|
328
|
+
it "checks if objects are not equal" do
|
329
|
+
instance_1 = Freeclimb::ExportResult.new(
|
330
|
+
account_id: "TS",
|
331
|
+
|
332
|
+
uri: "TS",
|
333
|
+
|
334
|
+
date_created: "TS",
|
335
|
+
|
336
|
+
date_updated: "TS",
|
337
|
+
|
338
|
+
revision: 0 + 1,
|
339
|
+
|
340
|
+
export_id: "TS",
|
341
|
+
|
342
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
343
|
+
|
344
|
+
size: 2,
|
345
|
+
|
346
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
347
|
+
|
348
|
+
query: Object.new,
|
349
|
+
|
350
|
+
query: Object.new,
|
351
|
+
|
352
|
+
format: [],
|
353
|
+
|
354
|
+
output: ExportResultOutput.new
|
355
|
+
)
|
356
|
+
instance_2 = Freeclimb::ExportResult.new(
|
357
|
+
account_id: "ST",
|
358
|
+
|
359
|
+
uri: "ST",
|
360
|
+
|
361
|
+
date_created: "ST",
|
362
|
+
|
363
|
+
date_updated: "ST",
|
364
|
+
|
365
|
+
revision: 0 + 2,
|
366
|
+
|
367
|
+
export_id: "ST",
|
368
|
+
|
369
|
+
status: nil,
|
370
|
+
|
371
|
+
size: 1,
|
372
|
+
|
373
|
+
resource_type: nil,
|
374
|
+
|
375
|
+
query: Object.new,
|
376
|
+
|
377
|
+
format: nil,
|
378
|
+
|
379
|
+
output: ExportResultOutput.new
|
380
|
+
)
|
381
|
+
expect(instance_1.eql?(instance_2)).to eq(false)
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
describe 'test method "hash"' do
|
386
|
+
it "calculates hash code" do
|
387
|
+
instance = Freeclimb::ExportResult.new(
|
388
|
+
account_id: "TS",
|
389
|
+
|
390
|
+
uri: "TS",
|
391
|
+
|
392
|
+
date_created: "TS",
|
393
|
+
|
394
|
+
date_updated: "TS",
|
395
|
+
|
396
|
+
revision: 0,
|
397
|
+
|
398
|
+
export_id: "TS",
|
399
|
+
|
400
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
401
|
+
|
402
|
+
size: 1,
|
403
|
+
|
404
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
405
|
+
|
406
|
+
query: Object.new,
|
407
|
+
|
408
|
+
format: [],
|
409
|
+
|
410
|
+
output: ExportResultOutput.new
|
411
|
+
)
|
412
|
+
expect(instance.hash).to be_a_kind_of(Integer)
|
413
|
+
end
|
414
|
+
end
|
415
|
+
|
416
|
+
describe 'test method "build_from_hash"' do
|
417
|
+
it "builds equivalent model from hash code" do
|
418
|
+
instance_1 = Freeclimb::ExportResult.new(
|
419
|
+
account_id: "TS",
|
420
|
+
|
421
|
+
uri: "TS",
|
422
|
+
|
423
|
+
date_created: "TS",
|
424
|
+
|
425
|
+
date_updated: "TS",
|
426
|
+
|
427
|
+
revision: 0,
|
428
|
+
|
429
|
+
export_id: "TS",
|
430
|
+
|
431
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
432
|
+
|
433
|
+
size: 1,
|
434
|
+
|
435
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
436
|
+
|
437
|
+
query: Object.new,
|
438
|
+
|
439
|
+
format: [],
|
440
|
+
|
441
|
+
output: ExportResultOutput.new
|
442
|
+
)
|
443
|
+
instance_2 = Freeclimb::ExportResult.new(
|
444
|
+
account_id: "TS",
|
445
|
+
|
446
|
+
uri: "TS",
|
447
|
+
|
448
|
+
date_created: "TS",
|
449
|
+
|
450
|
+
date_updated: "TS",
|
451
|
+
|
452
|
+
revision: 0,
|
453
|
+
|
454
|
+
export_id: "TS",
|
455
|
+
|
456
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
457
|
+
|
458
|
+
size: 1,
|
459
|
+
|
460
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
461
|
+
|
462
|
+
query: Object.new,
|
463
|
+
|
464
|
+
format: [],
|
465
|
+
|
466
|
+
output: ExportResultOutput.new
|
467
|
+
)
|
468
|
+
|
469
|
+
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
473
|
+
describe 'test method "_deserialize"' do
|
474
|
+
instance = Freeclimb::ExportResult.new(
|
475
|
+
account_id: "TS",
|
476
|
+
|
477
|
+
uri: "TS",
|
478
|
+
|
479
|
+
date_created: "TS",
|
480
|
+
|
481
|
+
date_updated: "TS",
|
482
|
+
|
483
|
+
revision: 0,
|
484
|
+
|
485
|
+
export_id: "TS",
|
486
|
+
|
487
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
488
|
+
|
489
|
+
size: 1,
|
490
|
+
|
491
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
492
|
+
|
493
|
+
query: Object.new,
|
494
|
+
|
495
|
+
format: [],
|
496
|
+
|
497
|
+
output: ExportResultOutput.new
|
498
|
+
)
|
499
|
+
it "deserializes the data of account_id" do
|
500
|
+
expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
|
501
|
+
end
|
502
|
+
|
503
|
+
it "deserializes the data of uri" do
|
504
|
+
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
505
|
+
end
|
506
|
+
|
507
|
+
it "deserializes the data of date_created" do
|
508
|
+
expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
|
509
|
+
end
|
510
|
+
|
511
|
+
it "deserializes the data of date_updated" do
|
512
|
+
expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
|
513
|
+
end
|
514
|
+
|
515
|
+
it "deserializes the data of revision" do
|
516
|
+
expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
|
517
|
+
end
|
518
|
+
|
519
|
+
it "deserializes the data of export_id" do
|
520
|
+
expect(instance._deserialize("String", instance.export_id)).to be_a_kind_of(String)
|
521
|
+
end
|
522
|
+
|
523
|
+
it "deserializes the data of size" do
|
524
|
+
expect(instance._deserialize("Integer", instance.size)).to be_a_kind_of(Integer)
|
525
|
+
end
|
526
|
+
|
527
|
+
it "deserializes the data of query" do
|
528
|
+
expect(instance._deserialize("Object", instance.query)).to be_a_kind_of(Object)
|
529
|
+
end
|
530
|
+
|
531
|
+
it "deserializes the data of format" do
|
532
|
+
expect(instance._deserialize("Array<String>", instance.format)).to be_a_kind_of(Array)
|
533
|
+
end
|
534
|
+
|
535
|
+
it "deserializes the data of output" do
|
536
|
+
expect(instance._deserialize("Object", instance.output)).to be_a_kind_of(ExportResultOutput)
|
537
|
+
end
|
538
|
+
end
|
539
|
+
|
540
|
+
describe 'test method "to_s"' do
|
541
|
+
it "returns the string representation of the object" do
|
542
|
+
instance = Freeclimb::ExportResult.new(
|
543
|
+
account_id: "TS",
|
544
|
+
|
545
|
+
uri: "TS",
|
546
|
+
|
547
|
+
date_created: "TS",
|
548
|
+
|
549
|
+
date_updated: "TS",
|
550
|
+
|
551
|
+
revision: 0,
|
552
|
+
|
553
|
+
export_id: "TS",
|
554
|
+
|
555
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
556
|
+
|
557
|
+
size: 1,
|
558
|
+
|
559
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
560
|
+
|
561
|
+
query: Object.new,
|
562
|
+
|
563
|
+
format: [],
|
564
|
+
|
565
|
+
output: ExportResultOutput.new
|
566
|
+
)
|
567
|
+
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
568
|
+
end
|
569
|
+
end
|
570
|
+
|
571
|
+
describe 'test method "to_hash"' do
|
572
|
+
it "returns the object in the form of hash" do
|
573
|
+
instance = Freeclimb::ExportResult.new(
|
574
|
+
account_id: "TS",
|
575
|
+
|
576
|
+
uri: "TS",
|
577
|
+
|
578
|
+
date_created: "TS",
|
579
|
+
|
580
|
+
date_updated: "TS",
|
581
|
+
|
582
|
+
revision: 0,
|
583
|
+
|
584
|
+
export_id: "TS",
|
585
|
+
|
586
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
587
|
+
|
588
|
+
size: 1,
|
589
|
+
|
590
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
591
|
+
|
592
|
+
query: Object.new,
|
593
|
+
|
594
|
+
format: [],
|
595
|
+
|
596
|
+
output: ExportResultOutput.new
|
597
|
+
)
|
598
|
+
expect(instance.to_hash).to be_a_kind_of(Hash)
|
599
|
+
end
|
600
|
+
it "creates equal hash for two equal objects" do
|
601
|
+
Object.new
|
602
|
+
|
603
|
+
obj = ExportResultOutput.new
|
604
|
+
|
605
|
+
instance_1 = Freeclimb::ExportResult.new(
|
606
|
+
account_id: "TS",
|
607
|
+
|
608
|
+
uri: "TS",
|
609
|
+
|
610
|
+
date_created: "TS",
|
611
|
+
|
612
|
+
date_updated: "TS",
|
613
|
+
|
614
|
+
revision: 0,
|
615
|
+
|
616
|
+
export_id: "TS",
|
617
|
+
|
618
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
619
|
+
|
620
|
+
size: 1,
|
621
|
+
|
622
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
623
|
+
|
624
|
+
query: obj,
|
625
|
+
|
626
|
+
format: [],
|
627
|
+
|
628
|
+
output: obj
|
629
|
+
)
|
630
|
+
instance_2 = Freeclimb::ExportResult.new(
|
631
|
+
account_id: "TS",
|
632
|
+
|
633
|
+
uri: "TS",
|
634
|
+
|
635
|
+
date_created: "TS",
|
636
|
+
|
637
|
+
date_updated: "TS",
|
638
|
+
|
639
|
+
revision: 0,
|
640
|
+
|
641
|
+
export_id: "TS",
|
642
|
+
|
643
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
644
|
+
|
645
|
+
size: 1,
|
646
|
+
|
647
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
648
|
+
|
649
|
+
query: obj,
|
650
|
+
|
651
|
+
format: [],
|
652
|
+
|
653
|
+
output: obj
|
654
|
+
)
|
655
|
+
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
656
|
+
end
|
657
|
+
end
|
658
|
+
|
659
|
+
describe 'test method "_to_hash"' do
|
660
|
+
instance = Freeclimb::ExportResult.new(
|
661
|
+
account_id: "TS",
|
662
|
+
|
663
|
+
uri: "TS",
|
664
|
+
|
665
|
+
date_created: "TS",
|
666
|
+
|
667
|
+
date_updated: "TS",
|
668
|
+
|
669
|
+
revision: 0,
|
670
|
+
|
671
|
+
export_id: "TS",
|
672
|
+
|
673
|
+
status: Freeclimb::ExportStatus::INTAKING,
|
674
|
+
|
675
|
+
size: 1,
|
676
|
+
|
677
|
+
resource_type: Freeclimb::ExportResourceType::MESSAGES,
|
678
|
+
|
679
|
+
format: []
|
680
|
+
)
|
681
|
+
it "returns account_id in the form of hash" do
|
682
|
+
expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
|
683
|
+
end
|
684
|
+
it "returns uri in the form of hash" do
|
685
|
+
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
686
|
+
end
|
687
|
+
it "returns date_created in the form of hash" do
|
688
|
+
expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
|
689
|
+
end
|
690
|
+
it "returns date_updated in the form of hash" do
|
691
|
+
expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
|
692
|
+
end
|
693
|
+
it "returns revision in the form of hash" do
|
694
|
+
expect(instance._to_hash(instance.revision)).to eq(instance.revision)
|
695
|
+
end
|
696
|
+
it "returns export_id in the form of hash" do
|
697
|
+
expect(instance._to_hash(instance.export_id)).to eq(instance.export_id)
|
698
|
+
end
|
699
|
+
it "returns status in the form of hash" do
|
700
|
+
expect(instance._to_hash(instance.status)).to eq(instance.status)
|
701
|
+
end
|
702
|
+
it "returns size in the form of hash" do
|
703
|
+
expect(instance._to_hash(instance.size)).to eq(instance.size)
|
704
|
+
end
|
705
|
+
it "returns resource_type in the form of hash" do
|
706
|
+
expect(instance._to_hash(instance.resource_type)).to eq(instance.resource_type)
|
707
|
+
end
|
708
|
+
it "returns query in the form of hash" do
|
709
|
+
expect(instance._to_hash(instance.query)).to eq(instance.query)
|
710
|
+
end
|
711
|
+
it "returns format in the form of hash" do
|
712
|
+
expect(instance._to_hash(instance.format)).to eq(instance.format)
|
713
|
+
end
|
714
|
+
it "returns output in the form of hash" do
|
715
|
+
expect(instance._to_hash(instance.output)).to eq(instance.output)
|
716
|
+
end
|
717
|
+
end
|
718
|
+
end
|