freeclimb 5.0.0 → 5.1.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 +12 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +21 -15
- data/README.md +5 -4
- data/docs/MessageResult.md +7 -1
- data/docs/TFNCampaign.md +34 -0
- data/lib/freeclimb/configuration.rb +1 -2
- data/lib/freeclimb/models/dequeue.rb +2 -4
- data/lib/freeclimb/models/message_result.rb +36 -5
- data/lib/freeclimb/models/remove_from_conference.rb +2 -4
- data/lib/freeclimb/models/start_record_call.rb +2 -4
- data/lib/freeclimb/models/terminate_conference.rb +2 -4
- data/lib/freeclimb/models/tfn_campaign.rb +370 -0
- data/lib/freeclimb/models/unpark.rb +2 -4
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +1 -0
- data/openapi.json +93 -38
- data/spec/api/default_api_spec.rb +39 -117
- data/spec/models/account_request_spec.rb +113 -2
- data/spec/models/account_result_spec.rb +591 -28
- data/spec/models/account_status_spec.rb +1 -0
- data/spec/models/account_type_spec.rb +1 -0
- data/spec/models/add_to_conference_notification_webhook_spec.rb +654 -5
- data/spec/models/add_to_conference_spec.rb +471 -2
- data/spec/models/add_to_queue_notification_webhook_spec.rb +465 -2
- data/spec/models/answered_by_spec.rb +1 -0
- data/spec/models/application_list_spec.rb +323 -2
- data/spec/models/application_request_spec.rb +393 -2
- data/spec/models/application_result_spec.rb +723 -14
- data/spec/models/available_number_list_spec.rb +323 -2
- data/spec/models/available_number_spec.rb +380 -21
- data/spec/models/barge_in_reason_spec.rb +1 -0
- data/spec/models/buy_incoming_number_request_spec.rb +169 -2
- data/spec/models/call_control_webhook_spec.rb +281 -2
- data/spec/models/call_direction_spec.rb +1 -0
- data/spec/models/call_ended_reason_spec.rb +1 -0
- data/spec/models/call_list_spec.rb +323 -2
- data/spec/models/call_result_spec.rb +1020 -9
- data/spec/models/call_status_spec.rb +1 -0
- data/spec/models/call_status_webhook_spec.rb +501 -2
- data/spec/models/capabilities_spec.rb +191 -2
- data/spec/models/completion_request_spec.rb +54 -2
- data/spec/models/completion_result_spec.rb +93 -2
- data/spec/models/completion_result_status_spec.rb +1 -0
- data/spec/models/conference_list_spec.rb +323 -2
- data/spec/models/conference_participant_list_spec.rb +323 -2
- data/spec/models/conference_participant_result_spec.rb +532 -7
- data/spec/models/conference_recording_status_webhook_spec.rb +654 -5
- data/spec/models/conference_result_spec.rb +768 -55
- data/spec/models/conference_status_spec.rb +1 -0
- data/spec/models/conference_status_webhook_spec.rb +654 -5
- data/spec/models/create_conference_request_spec.rb +243 -2
- data/spec/models/create_conference_spec.rb +281 -2
- data/spec/models/create_conference_webhook_spec.rb +654 -5
- data/spec/models/create_web_rtc_token_spec.rb +151 -2
- data/spec/models/dequeue_spec.rb +1 -0
- data/spec/models/dequeue_webhook_spec.rb +565 -8
- data/spec/models/enqueue_spec.rb +225 -2
- data/spec/models/filter_logs_request_spec.rb +57 -2
- data/spec/models/get_digits_reason_spec.rb +1 -0
- data/spec/models/get_digits_spec.rb +379 -2
- data/spec/models/get_digits_webhook_spec.rb +623 -12
- data/spec/models/get_speech_reason_spec.rb +1 -0
- data/spec/models/get_speech_spec.rb +556 -11
- data/spec/models/get_speech_webhook_spec.rb +870 -15
- data/spec/models/grammar_file_built_in_spec.rb +1 -0
- data/spec/models/grammar_type_spec.rb +1 -0
- data/spec/models/hangup_spec.rb +57 -2
- data/spec/models/if_machine_spec.rb +1 -0
- data/spec/models/inbound_call_webhook_spec.rb +521 -2
- data/spec/models/incoming_number_list_spec.rb +323 -2
- data/spec/models/incoming_number_request_spec.rb +169 -2
- data/spec/models/incoming_number_result_spec.rb +930 -43
- data/spec/models/language_spec.rb +1 -0
- data/spec/models/leave_conference_webhook_spec.rb +465 -2
- data/spec/models/log_level_spec.rb +1 -0
- data/spec/models/log_list_spec.rb +323 -2
- data/spec/models/log_result_spec.rb +368 -9
- data/spec/models/machine_detected_webhook_spec.rb +565 -10
- data/spec/models/machine_type_spec.rb +1 -0
- data/spec/models/make_call_request_spec.rb +529 -6
- data/spec/models/message_delivery_webhook_spec.rb +565 -6
- data/spec/models/message_direction_spec.rb +1 -0
- data/spec/models/message_request_spec.rb +469 -2
- data/spec/models/message_result_spec.rb +1364 -225
- data/spec/models/message_status_spec.rb +1 -0
- data/spec/models/message_status_webhook_spec.rb +615 -20
- data/spec/models/messages_list_spec.rb +323 -2
- data/spec/models/mutable_resource_model_spec.rb +207 -2
- data/spec/models/out_dial_api_connect_webhook_spec.rb +521 -2
- data/spec/models/out_dial_connect_webhook_spec.rb +521 -2
- data/spec/models/out_dial_spec.rb +505 -2
- data/spec/models/out_dial_start_webhook_spec.rb +599 -24
- data/spec/models/pagination_model_spec.rb +285 -2
- data/spec/models/park_spec.rb +169 -2
- data/spec/models/pause_spec.rb +39 -2
- data/spec/models/percl_command_spec.rb +54 -2
- data/spec/models/percl_script_spec.rb +39 -2
- data/spec/models/play_beep_spec.rb +1 -0
- data/spec/models/play_early_media_spec.rb +57 -2
- data/spec/models/play_spec.rb +133 -2
- data/spec/models/queue_list_spec.rb +323 -2
- data/spec/models/queue_member_list_spec.rb +323 -2
- data/spec/models/queue_member_spec.rb +245 -2
- data/spec/models/queue_request_spec.rb +95 -2
- data/spec/models/queue_result_spec.rb +564 -15
- data/spec/models/queue_result_status_spec.rb +1 -0
- data/spec/models/queue_wait_webhook_spec.rb +616 -21
- data/spec/models/record_utterance_spec.rb +303 -2
- data/spec/models/record_utterance_term_reason_spec.rb +1 -0
- data/spec/models/record_webhook_spec.rb +868 -13
- data/spec/models/recording_list_spec.rb +323 -2
- data/spec/models/recording_result_spec.rb +469 -2
- data/spec/models/redirect_spec.rb +57 -2
- data/spec/models/redirect_webhook_spec.rb +521 -2
- data/spec/models/reject_spec.rb +57 -2
- data/spec/models/remove_from_conference_spec.rb +1 -0
- data/spec/models/remove_from_queue_notification_webhook_spec.rb +546 -9
- data/spec/models/request_type_spec.rb +1 -0
- data/spec/models/say_spec.rb +189 -2
- data/spec/models/send_digits_spec.rb +133 -2
- data/spec/models/set_dtmf_pass_through_spec.rb +39 -2
- data/spec/models/set_listen_spec.rb +39 -2
- data/spec/models/set_talk_spec.rb +39 -2
- data/spec/models/sms_spec.rb +225 -2
- data/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_entity_type_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_identity_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_relationship_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_spec.rb +1969 -423
- data/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +323 -2
- data/spec/models/sms_ten_dlc_campaign_spec.rb +2224 -550
- data/spec/models/sms_ten_dlc_campaign_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +323 -2
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +597 -17
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +1537 -155
- data/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +323 -2
- data/spec/models/sms_toll_free_campaign_registration_status_spec.rb +1 -0
- data/spec/models/sms_toll_free_campaign_spec.rb +355 -2
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +323 -2
- data/spec/models/start_record_call_spec.rb +1 -0
- data/spec/models/terminate_conference_spec.rb +1 -0
- data/spec/models/tfn_campaign_spec.rb +1089 -0
- data/spec/models/tfn_spec.rb +57 -2
- data/spec/models/transcribe_reason_spec.rb +1 -0
- data/spec/models/transcribe_term_reason_spec.rb +1 -0
- data/spec/models/transcribe_utterance_record_spec.rb +115 -2
- data/spec/models/transcribe_utterance_spec.rb +288 -21
- data/spec/models/transcribe_webhook_spec.rb +1049 -4
- data/spec/models/unpark_spec.rb +1 -0
- data/spec/models/update_call_request_spec.rb +37 -2
- data/spec/models/update_call_request_status_spec.rb +1 -0
- data/spec/models/update_conference_participant_request_spec.rb +115 -2
- data/spec/models/update_conference_request_spec.rb +129 -2
- data/spec/models/update_conference_request_status_spec.rb +1 -0
- data/spec/models/webhook_spec.rb +54 -2
- metadata +129 -125
data/spec/models/park_spec.rb
CHANGED
@@ -13,6 +13,7 @@ OpenAPI Generator version: 7.9.0
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
|
+
include Freeclimb
|
16
17
|
|
17
18
|
# Unit tests for Freeclimb::Park
|
18
19
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -28,58 +29,94 @@ describe Freeclimb::Park do
|
|
28
29
|
|
29
30
|
describe 'test attribute "wait_url"' do
|
30
31
|
it 'should work' do
|
32
|
+
|
31
33
|
instance.wait_url = "TEST_STRING"
|
32
34
|
expect(instance.wait_url).to eq("TEST_STRING")
|
33
35
|
|
36
|
+
|
37
|
+
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
37
41
|
describe 'test attribute "action_url"' do
|
38
42
|
it 'should work' do
|
43
|
+
|
39
44
|
instance.action_url = "TEST_STRING"
|
40
45
|
expect(instance.action_url).to eq("TEST_STRING")
|
41
46
|
|
47
|
+
|
48
|
+
|
42
49
|
end
|
43
50
|
end
|
44
51
|
|
45
52
|
describe 'test attribute "notification_url"' do
|
46
53
|
it 'should work' do
|
54
|
+
|
47
55
|
instance.notification_url = "TEST_STRING"
|
48
56
|
expect(instance.notification_url).to eq("TEST_STRING")
|
49
57
|
|
58
|
+
|
59
|
+
|
50
60
|
end
|
51
61
|
end
|
52
62
|
|
53
63
|
describe 'test method "initialize"' do
|
54
64
|
it 'properly initializes with values' do
|
55
65
|
expect { instance = Freeclimb::Park.new(
|
66
|
+
|
56
67
|
wait_url: "TS",
|
57
68
|
|
69
|
+
|
70
|
+
|
71
|
+
|
58
72
|
action_url: "TS",
|
59
73
|
|
74
|
+
|
75
|
+
|
76
|
+
|
60
77
|
notification_url: "TS",
|
61
78
|
|
79
|
+
|
80
|
+
|
62
81
|
)}.not_to raise_error()
|
63
82
|
end
|
64
83
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::Park' do
|
65
84
|
expect { instance = Freeclimb::Park.new(
|
85
|
+
|
66
86
|
wait_url: "TS",
|
67
87
|
|
88
|
+
|
89
|
+
|
90
|
+
|
68
91
|
action_url: "TS",
|
69
92
|
|
93
|
+
|
94
|
+
|
95
|
+
|
70
96
|
notification_url: "TS",
|
71
97
|
|
98
|
+
|
99
|
+
|
72
100
|
invalid_attribute: true
|
73
101
|
)}.to raise_error(ArgumentError)
|
74
102
|
end
|
75
103
|
it 'fails to initialize with invalid attribute' do
|
76
104
|
expect { instance = Freeclimb::Park.new(
|
105
|
+
|
77
106
|
wait_url: "TS",
|
78
107
|
|
108
|
+
|
109
|
+
|
110
|
+
|
79
111
|
action_url: "TS",
|
80
112
|
|
113
|
+
|
114
|
+
|
115
|
+
|
81
116
|
notification_url: "TS",
|
82
117
|
|
118
|
+
|
119
|
+
|
83
120
|
invalid_attribute: true
|
84
121
|
)}.to raise_error(ArgumentError)
|
85
122
|
end
|
@@ -88,12 +125,21 @@ describe Freeclimb::Park do
|
|
88
125
|
describe 'test method "valid"' do
|
89
126
|
it 'checks if properties are valid' do
|
90
127
|
instance = Freeclimb::Park.new(
|
128
|
+
|
91
129
|
wait_url: "TS",
|
92
130
|
|
131
|
+
|
132
|
+
|
133
|
+
|
93
134
|
action_url: "TS",
|
94
135
|
|
136
|
+
|
137
|
+
|
138
|
+
|
95
139
|
notification_url: "TS",
|
96
140
|
|
141
|
+
|
142
|
+
|
97
143
|
)
|
98
144
|
expect(instance.valid?).to eq(true)
|
99
145
|
end
|
@@ -110,42 +156,80 @@ describe Freeclimb::Park do
|
|
110
156
|
|
111
157
|
describe 'test method "eql?"' do
|
112
158
|
it 'checks if objects are equal' do
|
113
|
-
|
159
|
+
|
160
|
+
|
161
|
+
|
114
162
|
instance_1 = Freeclimb::Park.new(
|
163
|
+
|
115
164
|
wait_url: "TS",
|
116
165
|
|
166
|
+
|
167
|
+
|
168
|
+
|
117
169
|
action_url: "TS",
|
118
170
|
|
171
|
+
|
172
|
+
|
173
|
+
|
119
174
|
notification_url: "TS",
|
120
175
|
|
176
|
+
|
177
|
+
|
121
178
|
)
|
122
179
|
instance_2 = Freeclimb::Park.new(
|
180
|
+
|
123
181
|
wait_url: "TS",
|
124
182
|
|
183
|
+
|
184
|
+
|
185
|
+
|
125
186
|
action_url: "TS",
|
126
187
|
|
188
|
+
|
189
|
+
|
190
|
+
|
127
191
|
notification_url: "TS",
|
128
192
|
|
193
|
+
|
194
|
+
|
129
195
|
)
|
130
196
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
131
197
|
end
|
132
198
|
|
133
199
|
it 'checks if objects are not equal' do
|
134
200
|
instance_1 = Freeclimb::Park.new(
|
201
|
+
|
135
202
|
wait_url: "TS",
|
136
203
|
|
204
|
+
|
205
|
+
|
206
|
+
|
137
207
|
action_url: "TS",
|
138
208
|
|
209
|
+
|
210
|
+
|
211
|
+
|
139
212
|
notification_url: "TS",
|
140
213
|
|
214
|
+
|
215
|
+
|
141
216
|
)
|
142
217
|
instance_2 = Freeclimb::Park.new(
|
218
|
+
|
143
219
|
wait_url: "ST",
|
144
220
|
|
221
|
+
|
222
|
+
|
223
|
+
|
145
224
|
action_url: "ST",
|
146
225
|
|
226
|
+
|
227
|
+
|
228
|
+
|
147
229
|
notification_url: "ST",
|
148
230
|
|
231
|
+
|
232
|
+
|
149
233
|
)
|
150
234
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
151
235
|
end
|
@@ -154,12 +238,21 @@ describe Freeclimb::Park do
|
|
154
238
|
describe 'test method "hash"' do
|
155
239
|
it 'calculates hash code' do
|
156
240
|
instance = Freeclimb::Park.new(
|
241
|
+
|
157
242
|
wait_url: "TS",
|
158
243
|
|
244
|
+
|
245
|
+
|
246
|
+
|
159
247
|
action_url: "TS",
|
160
248
|
|
249
|
+
|
250
|
+
|
251
|
+
|
161
252
|
notification_url: "TS",
|
162
253
|
|
254
|
+
|
255
|
+
|
163
256
|
)
|
164
257
|
expect(instance.hash).to be_a_kind_of(Integer)
|
165
258
|
end
|
@@ -168,20 +261,38 @@ describe Freeclimb::Park do
|
|
168
261
|
describe 'test method "build_from_hash"' do
|
169
262
|
it 'builds equivalent model from hash code' do
|
170
263
|
instance_1 = Freeclimb::Park.new(
|
264
|
+
|
171
265
|
wait_url: "TS",
|
172
266
|
|
267
|
+
|
268
|
+
|
269
|
+
|
173
270
|
action_url: "TS",
|
174
271
|
|
272
|
+
|
273
|
+
|
274
|
+
|
175
275
|
notification_url: "TS",
|
176
276
|
|
277
|
+
|
278
|
+
|
177
279
|
)
|
178
280
|
instance_2 = Freeclimb::Park.new(
|
281
|
+
|
179
282
|
wait_url: "TS",
|
180
283
|
|
284
|
+
|
285
|
+
|
286
|
+
|
181
287
|
action_url: "TS",
|
182
288
|
|
289
|
+
|
290
|
+
|
291
|
+
|
183
292
|
notification_url: "TS",
|
184
293
|
|
294
|
+
|
295
|
+
|
185
296
|
)
|
186
297
|
|
187
298
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -190,33 +301,57 @@ describe Freeclimb::Park do
|
|
190
301
|
|
191
302
|
describe 'test method "_deserialize"' do
|
192
303
|
instance = Freeclimb::Park.new(
|
304
|
+
|
193
305
|
wait_url: "TS",
|
194
306
|
|
307
|
+
|
308
|
+
|
309
|
+
|
195
310
|
action_url: "TS",
|
196
311
|
|
312
|
+
|
313
|
+
|
314
|
+
|
197
315
|
notification_url: "TS",
|
198
316
|
|
317
|
+
|
318
|
+
|
199
319
|
)
|
200
320
|
it 'deserializes the data of wait_url' do
|
201
321
|
expect(instance._deserialize("String", instance.wait_url)).to be_a_kind_of(String)
|
202
322
|
end
|
323
|
+
|
324
|
+
|
203
325
|
it 'deserializes the data of action_url' do
|
204
326
|
expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String)
|
205
327
|
end
|
328
|
+
|
329
|
+
|
206
330
|
it 'deserializes the data of notification_url' do
|
207
331
|
expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String)
|
208
332
|
end
|
333
|
+
|
334
|
+
|
209
335
|
end
|
210
336
|
|
211
337
|
describe 'test method "to_s"' do
|
212
338
|
it 'returns the string representation of the object' do
|
213
339
|
instance = Freeclimb::Park.new(
|
340
|
+
|
214
341
|
wait_url: "TS",
|
215
342
|
|
343
|
+
|
344
|
+
|
345
|
+
|
216
346
|
action_url: "TS",
|
217
347
|
|
348
|
+
|
349
|
+
|
350
|
+
|
218
351
|
notification_url: "TS",
|
219
352
|
|
353
|
+
|
354
|
+
|
220
355
|
)
|
221
356
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
222
357
|
end
|
@@ -225,32 +360,61 @@ describe Freeclimb::Park do
|
|
225
360
|
describe 'test method "to_hash"' do
|
226
361
|
it 'returns the object in the form of hash' do
|
227
362
|
instance = Freeclimb::Park.new(
|
363
|
+
|
228
364
|
wait_url: "TS",
|
229
365
|
|
366
|
+
|
367
|
+
|
368
|
+
|
230
369
|
action_url: "TS",
|
231
370
|
|
371
|
+
|
372
|
+
|
373
|
+
|
232
374
|
notification_url: "TS",
|
233
375
|
|
376
|
+
|
377
|
+
|
234
378
|
)
|
235
379
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
236
380
|
end
|
237
381
|
it 'creates equal hash for two equal objects' do
|
238
|
-
|
382
|
+
|
383
|
+
|
384
|
+
|
239
385
|
instance_1 = Freeclimb::Park.new(
|
386
|
+
|
240
387
|
wait_url: "TS",
|
241
388
|
|
389
|
+
|
390
|
+
|
391
|
+
|
242
392
|
action_url: "TS",
|
243
393
|
|
394
|
+
|
395
|
+
|
396
|
+
|
244
397
|
notification_url: "TS",
|
245
398
|
|
399
|
+
|
400
|
+
|
246
401
|
)
|
247
402
|
instance_2 = Freeclimb::Park.new(
|
403
|
+
|
248
404
|
wait_url: "TS",
|
249
405
|
|
406
|
+
|
407
|
+
|
408
|
+
|
250
409
|
action_url: "TS",
|
251
410
|
|
411
|
+
|
412
|
+
|
413
|
+
|
252
414
|
notification_url: "TS",
|
253
415
|
|
416
|
+
|
417
|
+
|
254
418
|
)
|
255
419
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
256
420
|
end
|
@@ -258,12 +422,15 @@ describe Freeclimb::Park do
|
|
258
422
|
|
259
423
|
describe 'test method "_to_hash"' do
|
260
424
|
instance = Freeclimb::Park.new(
|
425
|
+
|
261
426
|
wait_url: "TS",
|
262
427
|
|
263
428
|
|
429
|
+
|
264
430
|
action_url: "TS",
|
265
431
|
|
266
432
|
|
433
|
+
|
267
434
|
notification_url: "TS",
|
268
435
|
|
269
436
|
)
|
data/spec/models/pause_spec.rb
CHANGED
@@ -13,6 +13,7 @@ OpenAPI Generator version: 7.9.0
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
|
+
include Freeclimb
|
16
17
|
|
17
18
|
# Unit tests for Freeclimb::Pause
|
18
19
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -33,6 +34,8 @@ describe Freeclimb::Pause do
|
|
33
34
|
instance.length = 1
|
34
35
|
expect(instance.length).to eq(1)
|
35
36
|
|
37
|
+
|
38
|
+
|
36
39
|
end
|
37
40
|
end
|
38
41
|
|
@@ -41,12 +44,16 @@ describe Freeclimb::Pause do
|
|
41
44
|
expect { instance = Freeclimb::Pause.new(
|
42
45
|
length: 1,
|
43
46
|
|
47
|
+
|
48
|
+
|
44
49
|
)}.not_to raise_error()
|
45
50
|
end
|
46
51
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::Pause' do
|
47
52
|
expect { instance = Freeclimb::Pause.new(
|
48
53
|
length: 1,
|
49
54
|
|
55
|
+
|
56
|
+
|
50
57
|
invalid_attribute: true
|
51
58
|
)}.to raise_error(ArgumentError)
|
52
59
|
end
|
@@ -54,6 +61,8 @@ describe Freeclimb::Pause do
|
|
54
61
|
expect { instance = Freeclimb::Pause.new(
|
55
62
|
length: 1,
|
56
63
|
|
64
|
+
|
65
|
+
|
57
66
|
invalid_attribute: true
|
58
67
|
)}.to raise_error(ArgumentError)
|
59
68
|
end
|
@@ -64,6 +73,8 @@ describe Freeclimb::Pause do
|
|
64
73
|
instance = Freeclimb::Pause.new(
|
65
74
|
length: 1,
|
66
75
|
|
76
|
+
|
77
|
+
|
67
78
|
)
|
68
79
|
expect(instance.valid?).to eq(true)
|
69
80
|
end
|
@@ -80,12 +91,16 @@ describe Freeclimb::Pause do
|
|
80
91
|
|
81
92
|
describe 'test method "eql?"' do
|
82
93
|
it 'checks if objects are equal' do
|
83
|
-
|
94
|
+
|
84
95
|
instance_1 = Freeclimb::Pause.new(
|
85
96
|
length: 1,
|
86
97
|
|
98
|
+
|
99
|
+
|
87
100
|
)
|
88
101
|
instance_2 = Freeclimb::Pause.new(
|
102
|
+
|
103
|
+
|
89
104
|
length: 1,
|
90
105
|
|
91
106
|
)
|
@@ -96,10 +111,14 @@ describe Freeclimb::Pause do
|
|
96
111
|
instance_1 = Freeclimb::Pause.new(
|
97
112
|
length: 2,
|
98
113
|
|
114
|
+
|
115
|
+
|
99
116
|
)
|
100
117
|
instance_2 = Freeclimb::Pause.new(
|
101
118
|
length: 1,
|
102
119
|
|
120
|
+
|
121
|
+
|
103
122
|
)
|
104
123
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
105
124
|
end
|
@@ -110,6 +129,8 @@ describe Freeclimb::Pause do
|
|
110
129
|
instance = Freeclimb::Pause.new(
|
111
130
|
length: 1,
|
112
131
|
|
132
|
+
|
133
|
+
|
113
134
|
)
|
114
135
|
expect(instance.hash).to be_a_kind_of(Integer)
|
115
136
|
end
|
@@ -120,10 +141,14 @@ describe Freeclimb::Pause do
|
|
120
141
|
instance_1 = Freeclimb::Pause.new(
|
121
142
|
length: 1,
|
122
143
|
|
144
|
+
|
145
|
+
|
123
146
|
)
|
124
147
|
instance_2 = Freeclimb::Pause.new(
|
125
148
|
length: 1,
|
126
149
|
|
150
|
+
|
151
|
+
|
127
152
|
)
|
128
153
|
|
129
154
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -134,10 +159,14 @@ describe Freeclimb::Pause do
|
|
134
159
|
instance = Freeclimb::Pause.new(
|
135
160
|
length: 1,
|
136
161
|
|
162
|
+
|
163
|
+
|
137
164
|
)
|
138
165
|
it 'deserializes the data of length' do
|
139
166
|
expect(instance._deserialize("Integer", instance.length)).to be_a_kind_of(Integer)
|
140
167
|
end
|
168
|
+
|
169
|
+
|
141
170
|
end
|
142
171
|
|
143
172
|
describe 'test method "to_s"' do
|
@@ -145,6 +174,8 @@ describe Freeclimb::Pause do
|
|
145
174
|
instance = Freeclimb::Pause.new(
|
146
175
|
length: 1,
|
147
176
|
|
177
|
+
|
178
|
+
|
148
179
|
)
|
149
180
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
150
181
|
end
|
@@ -155,18 +186,24 @@ describe Freeclimb::Pause do
|
|
155
186
|
instance = Freeclimb::Pause.new(
|
156
187
|
length: 1,
|
157
188
|
|
189
|
+
|
190
|
+
|
158
191
|
)
|
159
192
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
160
193
|
end
|
161
194
|
it 'creates equal hash for two equal objects' do
|
162
|
-
|
195
|
+
|
163
196
|
instance_1 = Freeclimb::Pause.new(
|
164
197
|
length: 1,
|
165
198
|
|
199
|
+
|
200
|
+
|
166
201
|
)
|
167
202
|
instance_2 = Freeclimb::Pause.new(
|
168
203
|
length: 1,
|
169
204
|
|
205
|
+
|
206
|
+
|
170
207
|
)
|
171
208
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
172
209
|
end
|