freeclimb 4.4.0 → 4.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -2
  3. data/Gemfile.lock +1 -1
  4. data/README.md +4 -4
  5. data/docs/SMSTenDLCCampaign.md +1 -1
  6. data/lib/freeclimb/version.rb +1 -1
  7. data/openapi.json +123 -18
  8. data/spec/models/account_request_spec.rb +143 -2
  9. data/spec/models/account_result_spec.rb +377 -13
  10. data/spec/models/account_status_spec.rb +39 -6
  11. data/spec/models/account_type_spec.rb +26 -4
  12. data/spec/models/add_to_conference_spec.rb +343 -10
  13. data/spec/models/answered_by_spec.rb +26 -4
  14. data/spec/models/application_list_spec.rb +293 -8
  15. data/spec/models/application_request_spec.rb +268 -7
  16. data/spec/models/application_result_spec.rb +418 -13
  17. data/spec/models/available_number_list_spec.rb +293 -8
  18. data/spec/models/available_number_spec.rb +263 -7
  19. data/spec/models/buy_incoming_number_request_spec.rb +168 -3
  20. data/spec/models/call_direction_spec.rb +39 -6
  21. data/spec/models/call_list_spec.rb +293 -8
  22. data/spec/models/call_result_spec.rb +603 -22
  23. data/spec/models/call_status_spec.rb +104 -16
  24. data/spec/models/capabilities_spec.rb +218 -5
  25. data/spec/models/conference_list_spec.rb +293 -8
  26. data/spec/models/conference_participant_list_spec.rb +293 -8
  27. data/spec/models/conference_participant_result_spec.rb +343 -10
  28. data/spec/models/conference_result_spec.rb +464 -16
  29. data/spec/models/conference_status_spec.rb +52 -8
  30. data/spec/models/create_conference_request_spec.rb +228 -6
  31. data/spec/models/create_conference_spec.rb +253 -7
  32. data/spec/models/enqueue_spec.rb +193 -4
  33. data/spec/models/filter_logs_request_spec.rb +118 -1
  34. data/spec/models/get_digits_spec.rb +318 -9
  35. data/spec/models/get_speech_reason_spec.rb +78 -12
  36. data/spec/models/get_speech_spec.rb +388 -14
  37. data/spec/models/grammar_file_built_in_spec.rb +195 -30
  38. data/spec/models/grammar_type_spec.rb +26 -4
  39. data/spec/models/hangup_spec.rb +118 -1
  40. data/spec/models/if_machine_spec.rb +26 -4
  41. data/spec/models/incoming_number_list_spec.rb +293 -8
  42. data/spec/models/incoming_number_request_spec.rb +173 -2
  43. data/spec/models/incoming_number_result_spec.rb +488 -16
  44. data/spec/models/language_spec.rb +338 -52
  45. data/spec/models/log_level_spec.rb +39 -6
  46. data/spec/models/log_list_spec.rb +293 -8
  47. data/spec/models/log_result_spec.rb +275 -8
  48. data/spec/models/machine_type_spec.rb +26 -4
  49. data/spec/models/make_call_request_spec.rb +343 -10
  50. data/spec/models/message_direction_spec.rb +26 -4
  51. data/spec/models/message_request_spec.rb +318 -9
  52. data/spec/models/message_result_spec.rb +431 -13
  53. data/spec/models/message_status_spec.rb +143 -22
  54. data/spec/models/messages_list_spec.rb +293 -8
  55. data/spec/models/mutable_resource_model_spec.rb +193 -4
  56. data/spec/models/out_dial_spec.rb +345 -11
  57. data/spec/models/pagination_model_spec.rb +268 -7
  58. data/spec/models/park_spec.rb +168 -3
  59. data/spec/models/pause_spec.rb +118 -1
  60. data/spec/models/percl_command_spec.rb +132 -3
  61. data/spec/models/percl_script_spec.rb +118 -1
  62. data/spec/models/play_beep_spec.rb +52 -8
  63. data/spec/models/play_early_media_spec.rb +118 -1
  64. data/spec/models/play_spec.rb +193 -4
  65. data/spec/models/queue_list_spec.rb +293 -8
  66. data/spec/models/queue_member_list_spec.rb +293 -8
  67. data/spec/models/queue_member_spec.rb +218 -5
  68. data/spec/models/queue_request_spec.rb +143 -2
  69. data/spec/models/queue_result_spec.rb +369 -11
  70. data/spec/models/queue_result_status_spec.rb +52 -8
  71. data/spec/models/record_utterance_spec.rb +268 -7
  72. data/spec/models/record_utterance_term_reason_spec.rb +52 -8
  73. data/spec/models/recording_list_spec.rb +293 -8
  74. data/spec/models/recording_result_spec.rb +318 -9
  75. data/spec/models/redirect_spec.rb +118 -1
  76. data/spec/models/reject_spec.rb +118 -1
  77. data/spec/models/remove_from_conference_spec.rb +118 -1
  78. data/spec/models/request_type_spec.rb +299 -46
  79. data/spec/models/say_spec.rb +218 -5
  80. data/spec/models/send_digits_spec.rb +168 -3
  81. data/spec/models/set_listen_spec.rb +143 -2
  82. data/spec/models/set_talk_spec.rb +143 -2
  83. data/spec/models/sms_spec.rb +193 -4
  84. data/spec/models/sms_ten_dlc_brand_spec.rb +1070 -64
  85. data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +294 -9
  86. data/spec/models/sms_ten_dlc_campaign_spec.rb +875 -38
  87. data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +294 -9
  88. data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +365 -11
  89. data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +823 -35
  90. data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +294 -9
  91. data/spec/models/terminate_conference_spec.rb +118 -1
  92. data/spec/models/update_call_request_spec.rb +120 -2
  93. data/spec/models/update_call_request_status_spec.rb +26 -4
  94. data/spec/models/update_conference_participant_request_spec.rb +143 -2
  95. data/spec/models/update_conference_request_spec.rb +180 -5
  96. data/spec/models/update_conference_request_status_spec.rb +26 -4
  97. metadata +77 -77
@@ -27,55 +27,364 @@ describe Freeclimb::RecordingResult do
27
27
  end
28
28
  describe 'test attribute "uri"' do
29
29
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ instance.uri = "TEST_STRING"
31
+ expect(instance.uri).to eq("TEST_STRING")
31
32
  end
32
33
  end
33
34
 
34
35
  describe 'test attribute "date_created"' do
35
36
  it 'should work' do
36
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ instance.date_created = "TEST_STRING"
38
+ expect(instance.date_created).to eq("TEST_STRING")
37
39
  end
38
40
  end
39
41
 
40
42
  describe 'test attribute "date_updated"' do
41
43
  it 'should work' do
42
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ instance.date_updated = "TEST_STRING"
45
+ expect(instance.date_updated).to eq("TEST_STRING")
43
46
  end
44
47
  end
45
48
 
46
49
  describe 'test attribute "revision"' do
47
50
  it 'should work' do
48
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
51
+ instance.revision = 1
52
+ expect(instance.revision).to eq(1)
49
53
  end
50
54
  end
51
55
 
52
56
  describe 'test attribute "recording_id"' do
53
57
  it 'should work' do
54
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ instance.recording_id = "TEST_STRING"
59
+ expect(instance.recording_id).to eq("TEST_STRING")
55
60
  end
56
61
  end
57
62
 
58
63
  describe 'test attribute "account_id"' do
59
64
  it 'should work' do
60
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
65
+ instance.account_id = "TEST_STRING"
66
+ expect(instance.account_id).to eq("TEST_STRING")
61
67
  end
62
68
  end
63
69
 
64
70
  describe 'test attribute "call_id"' do
65
71
  it 'should work' do
66
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ instance.call_id = "TEST_STRING"
73
+ expect(instance.call_id).to eq("TEST_STRING")
67
74
  end
68
75
  end
69
76
 
70
77
  describe 'test attribute "duration_sec"' do
71
78
  it 'should work' do
72
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ instance.duration_sec = 1
80
+ expect(instance.duration_sec).to eq(1)
73
81
  end
74
82
  end
75
83
 
76
84
  describe 'test attribute "conference_id"' do
77
85
  it 'should work' do
78
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ instance.conference_id = "TEST_STRING"
87
+ expect(instance.conference_id).to eq("TEST_STRING")
88
+ end
89
+ end
90
+
91
+ describe 'test method "initialize"' do
92
+ it 'properly initializes with values' do
93
+ expect{instance = Freeclimb::RecordingResult.new(
94
+ uri: "TS",
95
+ date_created: "TS",
96
+ date_updated: "TS",
97
+ revision: 1,
98
+ recording_id: "TS",
99
+ account_id: "TS",
100
+ call_id: "TS",
101
+ duration_sec: 1,
102
+ conference_id: "TS",
103
+ )}.not_to raise_error()
104
+ end
105
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::RecordingResult' do
106
+ expect{instance = Freeclimb::RecordingResult.new(
107
+ uri: "TS",
108
+ date_created: "TS",
109
+ date_updated: "TS",
110
+ revision: 1,
111
+ recording_id: "TS",
112
+ account_id: "TS",
113
+ call_id: "TS",
114
+ duration_sec: 1,
115
+ conference_id: "TS",
116
+ invalid_attribute: true
117
+ )}.to raise_error(ArgumentError)
118
+ end
119
+ it 'fails to initialize with invalid attribute' do
120
+ expect{instance = Freeclimb::RecordingResult.new(
121
+ uri: "TS",
122
+ date_created: "TS",
123
+ date_updated: "TS",
124
+ revision: 1,
125
+ recording_id: "TS",
126
+ account_id: "TS",
127
+ call_id: "TS",
128
+ duration_sec: 1,
129
+ conference_id: "TS",
130
+ invalid_attribute: true
131
+ )}.to raise_error(ArgumentError)
132
+ end
133
+ end
134
+
135
+ describe 'test method "valid"' do
136
+ it 'checks if properties are valid' do
137
+ instance = Freeclimb::RecordingResult.new(
138
+ uri: "TS",
139
+ date_created: "TS",
140
+ date_updated: "TS",
141
+ revision: 1,
142
+ recording_id: "TS",
143
+ account_id: "TS",
144
+ call_id: "TS",
145
+ duration_sec: 1,
146
+ conference_id: "TS",
147
+ )
148
+ expect(instance.valid?).to eq(true)
149
+ end
150
+ end
151
+
152
+ describe 'test method "eql?"' do
153
+ it 'checks if objects are equal' do
154
+ obj = Object.new()
155
+ instance_1 = Freeclimb::RecordingResult.new(
156
+ uri: "TS",
157
+ date_created: "TS",
158
+ date_updated: "TS",
159
+ revision: 1,
160
+ recording_id: "TS",
161
+ account_id: "TS",
162
+ call_id: "TS",
163
+ duration_sec: 1,
164
+ conference_id: "TS",
165
+ )
166
+ instance_2 = Freeclimb::RecordingResult.new(
167
+ uri: "TS",
168
+ date_created: "TS",
169
+ date_updated: "TS",
170
+ revision: 1,
171
+ recording_id: "TS",
172
+ account_id: "TS",
173
+ call_id: "TS",
174
+ duration_sec: 1,
175
+ conference_id: "TS",
176
+ )
177
+ expect(instance_1.eql?(instance_2)).to eq(true)
178
+ end
179
+ it 'checks if objects are not equal' do
180
+ instance_1 = Freeclimb::RecordingResult.new(
181
+ uri: "TS",
182
+ date_created: "TS",
183
+ date_updated: "TS",
184
+ revision: 1,
185
+ recording_id: "TS",
186
+ account_id: "TS",
187
+ call_id: "TS",
188
+ duration_sec: 1,
189
+ conference_id: "TS",
190
+ )
191
+ instance_2 = Freeclimb::RecordingResult.new(
192
+ uri: "ST",
193
+ date_created: "ST",
194
+ date_updated: "ST",
195
+ revision: 0,
196
+ recording_id: "ST",
197
+ account_id: "ST",
198
+ call_id: "ST",
199
+ duration_sec: 0,
200
+ conference_id: "ST",
201
+ )
202
+ expect(instance_1.eql?(instance_2)).to eq(false)
203
+ end
204
+ end
205
+
206
+ describe 'test method "hash"' do
207
+ it 'calculates hash code' do
208
+ instance = Freeclimb::RecordingResult.new(
209
+ uri: "TS",
210
+ date_created: "TS",
211
+ date_updated: "TS",
212
+ revision: 1,
213
+ recording_id: "TS",
214
+ account_id: "TS",
215
+ call_id: "TS",
216
+ duration_sec: 1,
217
+ conference_id: "TS",
218
+ )
219
+ expect(instance.hash).to be_a_kind_of(Integer)
220
+ end
221
+ end
222
+
223
+ describe 'test method "build_from_hash"' do
224
+ it 'builds equivalent model from hash code' do
225
+ instance_1 = Freeclimb::RecordingResult.new(
226
+ uri: "TS",
227
+ date_created: "TS",
228
+ date_updated: "TS",
229
+ revision: 1,
230
+ recording_id: "TS",
231
+ account_id: "TS",
232
+ call_id: "TS",
233
+ duration_sec: 1,
234
+ conference_id: "TS",
235
+ )
236
+ instance_2 = Freeclimb::RecordingResult.new
237
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
238
+ end
239
+ end
240
+
241
+ describe 'test method "_deserialize"' do
242
+ instance = Freeclimb::RecordingResult.new(
243
+ uri: "TS",
244
+ date_created: "TS",
245
+ date_updated: "TS",
246
+ revision: 1,
247
+ recording_id: "TS",
248
+ account_id: "TS",
249
+ call_id: "TS",
250
+ duration_sec: 1,
251
+ conference_id: "TS",
252
+ )
253
+ it 'deserializes the data of uri' do
254
+ expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
255
+ end
256
+ it 'deserializes the data of date_created' do
257
+ expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
258
+ end
259
+ it 'deserializes the data of date_updated' do
260
+ expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
261
+ end
262
+ it 'deserializes the data of revision' do
263
+ expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
264
+ end
265
+ it 'deserializes the data of recording_id' do
266
+ expect(instance._deserialize("String", instance.recording_id)).to be_a_kind_of(String)
267
+ end
268
+ it 'deserializes the data of account_id' do
269
+ expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
270
+ end
271
+ it 'deserializes the data of call_id' do
272
+ expect(instance._deserialize("String", instance.call_id)).to be_a_kind_of(String)
273
+ end
274
+ it 'deserializes the data of duration_sec' do
275
+ expect(instance._deserialize("Integer", instance.duration_sec)).to be_a_kind_of(Integer)
276
+ end
277
+ it 'deserializes the data of conference_id' do
278
+ expect(instance._deserialize("String", instance.conference_id)).to be_a_kind_of(String)
279
+ end
280
+ end
281
+
282
+ describe 'test method "to_s"' do
283
+ it 'returns the string representation of the object' do
284
+ instance = Freeclimb::RecordingResult.new(
285
+ uri: "TS",
286
+ date_created: "TS",
287
+ date_updated: "TS",
288
+ revision: 1,
289
+ recording_id: "TS",
290
+ account_id: "TS",
291
+ call_id: "TS",
292
+ duration_sec: 1,
293
+ conference_id: "TS",
294
+ )
295
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
296
+ end
297
+ end
298
+
299
+ describe 'test method "to_hash"' do
300
+ it 'returns the object in the form of hash' do
301
+ instance = Freeclimb::RecordingResult.new(
302
+ uri: "TS",
303
+ date_created: "TS",
304
+ date_updated: "TS",
305
+ revision: 1,
306
+ recording_id: "TS",
307
+ account_id: "TS",
308
+ call_id: "TS",
309
+ duration_sec: 1,
310
+ conference_id: "TS",
311
+ )
312
+ expect(instance.to_hash).to be_a_kind_of(Hash)
313
+ end
314
+ it 'creates equal hash for two equal objects' do
315
+ obj = Object.new()
316
+ instance_1 = Freeclimb::RecordingResult.new(
317
+ uri: "TS",
318
+ date_created: "TS",
319
+ date_updated: "TS",
320
+ revision: 1,
321
+ recording_id: "TS",
322
+ account_id: "TS",
323
+ call_id: "TS",
324
+ duration_sec: 1,
325
+ conference_id: "TS",
326
+ )
327
+ instance_2 = Freeclimb::RecordingResult.new(
328
+ uri: "TS",
329
+ date_created: "TS",
330
+ date_updated: "TS",
331
+ revision: 1,
332
+ recording_id: "TS",
333
+ account_id: "TS",
334
+ call_id: "TS",
335
+ duration_sec: 1,
336
+ conference_id: "TS",
337
+ )
338
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
339
+ end
340
+ end
341
+
342
+ describe 'test method "_to_hash"' do
343
+ instance = Freeclimb::RecordingResult.new(
344
+ uri: "TS",
345
+
346
+ date_created: "TS",
347
+
348
+ date_updated: "TS",
349
+
350
+ revision: 1,
351
+
352
+ recording_id: "TS",
353
+
354
+ account_id: "TS",
355
+
356
+ call_id: "TS",
357
+
358
+ duration_sec: 1,
359
+
360
+ conference_id: "TS",
361
+ )
362
+ it 'returns uri in the form of hash' do
363
+ expect(instance._to_hash(instance.uri)).to eq(instance.uri)
364
+ end
365
+ it 'returns date_created in the form of hash' do
366
+ expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
367
+ end
368
+ it 'returns date_updated in the form of hash' do
369
+ expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
370
+ end
371
+ it 'returns revision in the form of hash' do
372
+ expect(instance._to_hash(instance.revision)).to eq(instance.revision)
373
+ end
374
+ it 'returns recording_id in the form of hash' do
375
+ expect(instance._to_hash(instance.recording_id)).to eq(instance.recording_id)
376
+ end
377
+ it 'returns account_id in the form of hash' do
378
+ expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
379
+ end
380
+ it 'returns call_id in the form of hash' do
381
+ expect(instance._to_hash(instance.call_id)).to eq(instance.call_id)
382
+ end
383
+ it 'returns duration_sec in the form of hash' do
384
+ expect(instance._to_hash(instance.duration_sec)).to eq(instance.duration_sec)
385
+ end
386
+ it 'returns conference_id in the form of hash' do
387
+ expect(instance._to_hash(instance.conference_id)).to eq(instance.conference_id)
79
388
  end
80
389
  end
81
390
 
@@ -27,7 +27,124 @@ describe Freeclimb::Redirect do
27
27
  end
28
28
  describe 'test attribute "action_url"' do
29
29
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ instance.action_url = "TEST_STRING"
31
+ expect(instance.action_url).to eq("TEST_STRING")
32
+ end
33
+ end
34
+
35
+ describe 'test method "initialize"' do
36
+ it 'properly initializes with values' do
37
+ expect{instance = Freeclimb::Redirect.new(
38
+ action_url: "TS",
39
+ )}.not_to raise_error()
40
+ end
41
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::Redirect' do
42
+ expect{instance = Freeclimb::Redirect.new(
43
+ action_url: "TS",
44
+ invalid_attribute: true
45
+ )}.to raise_error(ArgumentError)
46
+ end
47
+ it 'fails to initialize with invalid attribute' do
48
+ expect{instance = Freeclimb::Redirect.new(
49
+ action_url: "TS",
50
+ invalid_attribute: true
51
+ )}.to raise_error(ArgumentError)
52
+ end
53
+ end
54
+
55
+ describe 'test method "valid"' do
56
+ it 'checks if properties are valid' do
57
+ instance = Freeclimb::Redirect.new(
58
+ action_url: "TS",
59
+ )
60
+ expect(instance.valid?).to eq(true)
61
+ end
62
+ end
63
+
64
+ describe 'test method "eql?"' do
65
+ it 'checks if objects are equal' do
66
+ obj = Object.new()
67
+ instance_1 = Freeclimb::Redirect.new(
68
+ action_url: "TS",
69
+ )
70
+ instance_2 = Freeclimb::Redirect.new(
71
+ action_url: "TS",
72
+ )
73
+ expect(instance_1.eql?(instance_2)).to eq(true)
74
+ end
75
+ it 'checks if objects are not equal' do
76
+ instance_1 = Freeclimb::Redirect.new(
77
+ action_url: "TS",
78
+ )
79
+ instance_2 = Freeclimb::Redirect.new(
80
+ action_url: "ST",
81
+ )
82
+ expect(instance_1.eql?(instance_2)).to eq(false)
83
+ end
84
+ end
85
+
86
+ describe 'test method "hash"' do
87
+ it 'calculates hash code' do
88
+ instance = Freeclimb::Redirect.new(
89
+ action_url: "TS",
90
+ )
91
+ expect(instance.hash).to be_a_kind_of(Integer)
92
+ end
93
+ end
94
+
95
+ describe 'test method "build_from_hash"' do
96
+ it 'builds equivalent model from hash code' do
97
+ instance_1 = Freeclimb::Redirect.new(
98
+ action_url: "TS",
99
+ )
100
+ instance_2 = Freeclimb::Redirect.new
101
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
102
+ end
103
+ end
104
+
105
+ describe 'test method "_deserialize"' do
106
+ instance = Freeclimb::Redirect.new(
107
+ action_url: "TS",
108
+ )
109
+ it 'deserializes the data of action_url' do
110
+ expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String)
111
+ end
112
+ end
113
+
114
+ describe 'test method "to_s"' do
115
+ it 'returns the string representation of the object' do
116
+ instance = Freeclimb::Redirect.new(
117
+ action_url: "TS",
118
+ )
119
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
120
+ end
121
+ end
122
+
123
+ describe 'test method "to_hash"' do
124
+ it 'returns the object in the form of hash' do
125
+ instance = Freeclimb::Redirect.new(
126
+ action_url: "TS",
127
+ )
128
+ expect(instance.to_hash).to be_a_kind_of(Hash)
129
+ end
130
+ it 'creates equal hash for two equal objects' do
131
+ obj = Object.new()
132
+ instance_1 = Freeclimb::Redirect.new(
133
+ action_url: "TS",
134
+ )
135
+ instance_2 = Freeclimb::Redirect.new(
136
+ action_url: "TS",
137
+ )
138
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
139
+ end
140
+ end
141
+
142
+ describe 'test method "_to_hash"' do
143
+ instance = Freeclimb::Redirect.new(
144
+ action_url: "TS",
145
+ )
146
+ it 'returns action_url in the form of hash' do
147
+ expect(instance._to_hash(instance.action_url)).to eq(instance.action_url)
31
148
  end
32
149
  end
33
150
 
@@ -27,7 +27,124 @@ describe Freeclimb::Reject do
27
27
  end
28
28
  describe 'test attribute "reason"' do
29
29
  it 'should work' do
30
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
30
+ instance.reason = "TEST_STRING"
31
+ expect(instance.reason).to eq("TEST_STRING")
32
+ end
33
+ end
34
+
35
+ describe 'test method "initialize"' do
36
+ it 'properly initializes with values' do
37
+ expect{instance = Freeclimb::Reject.new(
38
+ reason: "TS",
39
+ )}.not_to raise_error()
40
+ end
41
+ it 'fails to initialize with input argument that is not a hash in Freeclimb::Reject' do
42
+ expect{instance = Freeclimb::Reject.new(
43
+ reason: "TS",
44
+ invalid_attribute: true
45
+ )}.to raise_error(ArgumentError)
46
+ end
47
+ it 'fails to initialize with invalid attribute' do
48
+ expect{instance = Freeclimb::Reject.new(
49
+ reason: "TS",
50
+ invalid_attribute: true
51
+ )}.to raise_error(ArgumentError)
52
+ end
53
+ end
54
+
55
+ describe 'test method "valid"' do
56
+ it 'checks if properties are valid' do
57
+ instance = Freeclimb::Reject.new(
58
+ reason: "TS",
59
+ )
60
+ expect(instance.valid?).to eq(true)
61
+ end
62
+ end
63
+
64
+ describe 'test method "eql?"' do
65
+ it 'checks if objects are equal' do
66
+ obj = Object.new()
67
+ instance_1 = Freeclimb::Reject.new(
68
+ reason: "TS",
69
+ )
70
+ instance_2 = Freeclimb::Reject.new(
71
+ reason: "TS",
72
+ )
73
+ expect(instance_1.eql?(instance_2)).to eq(true)
74
+ end
75
+ it 'checks if objects are not equal' do
76
+ instance_1 = Freeclimb::Reject.new(
77
+ reason: "TS",
78
+ )
79
+ instance_2 = Freeclimb::Reject.new(
80
+ reason: "ST",
81
+ )
82
+ expect(instance_1.eql?(instance_2)).to eq(false)
83
+ end
84
+ end
85
+
86
+ describe 'test method "hash"' do
87
+ it 'calculates hash code' do
88
+ instance = Freeclimb::Reject.new(
89
+ reason: "TS",
90
+ )
91
+ expect(instance.hash).to be_a_kind_of(Integer)
92
+ end
93
+ end
94
+
95
+ describe 'test method "build_from_hash"' do
96
+ it 'builds equivalent model from hash code' do
97
+ instance_1 = Freeclimb::Reject.new(
98
+ reason: "TS",
99
+ )
100
+ instance_2 = Freeclimb::Reject.new
101
+ expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
102
+ end
103
+ end
104
+
105
+ describe 'test method "_deserialize"' do
106
+ instance = Freeclimb::Reject.new(
107
+ reason: "TS",
108
+ )
109
+ it 'deserializes the data of reason' do
110
+ expect(instance._deserialize("String", instance.reason)).to be_a_kind_of(String)
111
+ end
112
+ end
113
+
114
+ describe 'test method "to_s"' do
115
+ it 'returns the string representation of the object' do
116
+ instance = Freeclimb::Reject.new(
117
+ reason: "TS",
118
+ )
119
+ expect(instance.to_s).to eq(instance.to_hash.to_s)
120
+ end
121
+ end
122
+
123
+ describe 'test method "to_hash"' do
124
+ it 'returns the object in the form of hash' do
125
+ instance = Freeclimb::Reject.new(
126
+ reason: "TS",
127
+ )
128
+ expect(instance.to_hash).to be_a_kind_of(Hash)
129
+ end
130
+ it 'creates equal hash for two equal objects' do
131
+ obj = Object.new()
132
+ instance_1 = Freeclimb::Reject.new(
133
+ reason: "TS",
134
+ )
135
+ instance_2 = Freeclimb::Reject.new(
136
+ reason: "TS",
137
+ )
138
+ expect(instance_1.to_hash).to eq(instance_2.to_hash)
139
+ end
140
+ end
141
+
142
+ describe 'test method "_to_hash"' do
143
+ instance = Freeclimb::Reject.new(
144
+ reason: "TS",
145
+ )
146
+ it 'returns reason in the form of hash' do
147
+ expect(instance._to_hash(instance.reason)).to eq(instance.reason)
31
148
  end
32
149
  end
33
150