freeclimb 4.4.0 → 4.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -2
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/docs/AddToConference.md +1 -1
- data/docs/AddToConferenceAllOf.md +1 -1
- data/lib/freeclimb/models/add_to_conference.rb +1 -1
- data/lib/freeclimb/models/add_to_conference_all_of.rb +1 -1
- data/lib/freeclimb/version.rb +1 -1
- data/openapi.json +161 -60
- data/spec/models/account_request_spec.rb +143 -2
- data/spec/models/account_result_spec.rb +377 -13
- data/spec/models/account_status_spec.rb +39 -6
- data/spec/models/account_type_spec.rb +26 -4
- data/spec/models/add_to_conference_spec.rb +343 -10
- data/spec/models/answered_by_spec.rb +26 -4
- data/spec/models/application_list_spec.rb +293 -8
- data/spec/models/application_request_spec.rb +268 -7
- data/spec/models/application_result_spec.rb +418 -13
- data/spec/models/available_number_list_spec.rb +293 -8
- data/spec/models/available_number_spec.rb +263 -7
- data/spec/models/buy_incoming_number_request_spec.rb +168 -3
- data/spec/models/call_direction_spec.rb +39 -6
- data/spec/models/call_list_spec.rb +293 -8
- data/spec/models/call_result_spec.rb +603 -22
- data/spec/models/call_status_spec.rb +104 -16
- data/spec/models/capabilities_spec.rb +218 -5
- data/spec/models/conference_list_spec.rb +293 -8
- data/spec/models/conference_participant_list_spec.rb +293 -8
- data/spec/models/conference_participant_result_spec.rb +343 -10
- data/spec/models/conference_result_spec.rb +464 -16
- data/spec/models/conference_status_spec.rb +52 -8
- data/spec/models/create_conference_request_spec.rb +228 -6
- data/spec/models/create_conference_spec.rb +253 -7
- data/spec/models/enqueue_spec.rb +193 -4
- data/spec/models/filter_logs_request_spec.rb +118 -1
- data/spec/models/get_digits_spec.rb +318 -9
- data/spec/models/get_speech_reason_spec.rb +78 -12
- data/spec/models/get_speech_spec.rb +388 -14
- data/spec/models/grammar_file_built_in_spec.rb +195 -30
- data/spec/models/grammar_type_spec.rb +26 -4
- data/spec/models/hangup_spec.rb +118 -1
- data/spec/models/if_machine_spec.rb +26 -4
- data/spec/models/incoming_number_list_spec.rb +293 -8
- data/spec/models/incoming_number_request_spec.rb +173 -2
- data/spec/models/incoming_number_result_spec.rb +488 -16
- data/spec/models/language_spec.rb +338 -52
- data/spec/models/log_level_spec.rb +39 -6
- data/spec/models/log_list_spec.rb +293 -8
- data/spec/models/log_result_spec.rb +275 -8
- data/spec/models/machine_type_spec.rb +26 -4
- data/spec/models/make_call_request_spec.rb +343 -10
- data/spec/models/message_direction_spec.rb +26 -4
- data/spec/models/message_request_spec.rb +318 -9
- data/spec/models/message_result_spec.rb +431 -13
- data/spec/models/message_status_spec.rb +143 -22
- data/spec/models/messages_list_spec.rb +293 -8
- data/spec/models/mutable_resource_model_spec.rb +193 -4
- data/spec/models/out_dial_spec.rb +345 -11
- data/spec/models/pagination_model_spec.rb +268 -7
- data/spec/models/park_spec.rb +168 -3
- data/spec/models/pause_spec.rb +118 -1
- data/spec/models/percl_command_spec.rb +132 -3
- data/spec/models/percl_script_spec.rb +118 -1
- data/spec/models/play_beep_spec.rb +52 -8
- data/spec/models/play_early_media_spec.rb +118 -1
- data/spec/models/play_spec.rb +193 -4
- data/spec/models/queue_list_spec.rb +293 -8
- data/spec/models/queue_member_list_spec.rb +293 -8
- data/spec/models/queue_member_spec.rb +218 -5
- data/spec/models/queue_request_spec.rb +143 -2
- data/spec/models/queue_result_spec.rb +369 -11
- data/spec/models/queue_result_status_spec.rb +52 -8
- data/spec/models/record_utterance_spec.rb +268 -7
- data/spec/models/record_utterance_term_reason_spec.rb +52 -8
- data/spec/models/recording_list_spec.rb +293 -8
- data/spec/models/recording_result_spec.rb +318 -9
- data/spec/models/redirect_spec.rb +118 -1
- data/spec/models/reject_spec.rb +118 -1
- data/spec/models/remove_from_conference_spec.rb +118 -1
- data/spec/models/request_type_spec.rb +299 -46
- data/spec/models/say_spec.rb +218 -5
- data/spec/models/send_digits_spec.rb +168 -3
- data/spec/models/set_listen_spec.rb +143 -2
- data/spec/models/set_talk_spec.rb +143 -2
- data/spec/models/sms_spec.rb +193 -4
- data/spec/models/sms_ten_dlc_brand_spec.rb +1070 -64
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +294 -9
- data/spec/models/sms_ten_dlc_campaign_spec.rb +875 -38
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +294 -9
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +365 -11
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +823 -35
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +294 -9
- data/spec/models/terminate_conference_spec.rb +118 -1
- data/spec/models/update_call_request_spec.rb +120 -2
- data/spec/models/update_call_request_status_spec.rb +26 -4
- data/spec/models/update_conference_participant_request_spec.rb +143 -2
- data/spec/models/update_conference_request_spec.rb +180 -5
- data/spec/models/update_conference_request_status_spec.rb +26 -4
- metadata +77 -77
@@ -27,73 +27,491 @@ describe Freeclimb::MessageResult do
|
|
27
27
|
end
|
28
28
|
describe 'test attribute "uri"' do
|
29
29
|
it 'should work' do
|
30
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
51
|
+
instance.revision = 1
|
52
|
+
expect(instance.revision).to eq(1)
|
49
53
|
end
|
50
54
|
end
|
51
55
|
|
52
56
|
describe 'test attribute "account_id"' do
|
53
57
|
it 'should work' do
|
54
|
-
|
58
|
+
instance.account_id = "TEST_STRING"
|
59
|
+
expect(instance.account_id).to eq("TEST_STRING")
|
55
60
|
end
|
56
61
|
end
|
57
62
|
|
58
63
|
describe 'test attribute "message_id"' do
|
59
64
|
it 'should work' do
|
60
|
-
|
65
|
+
instance.message_id = "TEST_STRING"
|
66
|
+
expect(instance.message_id).to eq("TEST_STRING")
|
61
67
|
end
|
62
68
|
end
|
63
69
|
|
64
70
|
describe 'test attribute "status"' do
|
65
|
-
it '
|
66
|
-
|
71
|
+
it 'assigns value NEW' do
|
72
|
+
instance.status = Freeclimb::MessageStatus::NEW
|
73
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::NEW)
|
74
|
+
end
|
75
|
+
it 'assigns value QUEUED' do
|
76
|
+
instance.status = Freeclimb::MessageStatus::QUEUED
|
77
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::QUEUED)
|
78
|
+
end
|
79
|
+
it 'assigns value REJECTED' do
|
80
|
+
instance.status = Freeclimb::MessageStatus::REJECTED
|
81
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::REJECTED)
|
82
|
+
end
|
83
|
+
it 'assigns value SENDING' do
|
84
|
+
instance.status = Freeclimb::MessageStatus::SENDING
|
85
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::SENDING)
|
86
|
+
end
|
87
|
+
it 'assigns value SENT' do
|
88
|
+
instance.status = Freeclimb::MessageStatus::SENT
|
89
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::SENT)
|
90
|
+
end
|
91
|
+
it 'assigns value FAILED' do
|
92
|
+
instance.status = Freeclimb::MessageStatus::FAILED
|
93
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::FAILED)
|
94
|
+
end
|
95
|
+
it 'assigns value RECEIVED' do
|
96
|
+
instance.status = Freeclimb::MessageStatus::RECEIVED
|
97
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::RECEIVED)
|
98
|
+
end
|
99
|
+
it 'assigns value UNDELIVERED' do
|
100
|
+
instance.status = Freeclimb::MessageStatus::UNDELIVERED
|
101
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::UNDELIVERED)
|
102
|
+
end
|
103
|
+
it 'assigns value EXPIRED' do
|
104
|
+
instance.status = Freeclimb::MessageStatus::EXPIRED
|
105
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::EXPIRED)
|
106
|
+
end
|
107
|
+
it 'assigns value DELETED' do
|
108
|
+
instance.status = Freeclimb::MessageStatus::DELETED
|
109
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::DELETED)
|
110
|
+
end
|
111
|
+
it 'assigns value UNKNOWN' do
|
112
|
+
instance.status = Freeclimb::MessageStatus::UNKNOWN
|
113
|
+
expect(instance.status).to eq(Freeclimb::MessageStatus::UNKNOWN)
|
67
114
|
end
|
68
115
|
end
|
69
116
|
|
70
117
|
describe 'test attribute "from"' do
|
71
118
|
it 'should work' do
|
72
|
-
|
119
|
+
instance.from = "TEST_STRING"
|
120
|
+
expect(instance.from).to eq("TEST_STRING")
|
73
121
|
end
|
74
122
|
end
|
75
123
|
|
76
124
|
describe 'test attribute "to"' do
|
77
125
|
it 'should work' do
|
78
|
-
|
126
|
+
instance.to = "TEST_STRING"
|
127
|
+
expect(instance.to).to eq("TEST_STRING")
|
79
128
|
end
|
80
129
|
end
|
81
130
|
|
82
131
|
describe 'test attribute "text"' do
|
83
132
|
it 'should work' do
|
84
|
-
|
133
|
+
instance.text = "TEST_STRING"
|
134
|
+
expect(instance.text).to eq("TEST_STRING")
|
85
135
|
end
|
86
136
|
end
|
87
137
|
|
88
138
|
describe 'test attribute "direction"' do
|
89
139
|
it 'should work' do
|
90
|
-
|
140
|
+
instance.direction = "TEST_STRING"
|
141
|
+
expect(instance.direction).to eq("TEST_STRING")
|
91
142
|
end
|
92
143
|
end
|
93
144
|
|
94
145
|
describe 'test attribute "notification_url"' do
|
95
146
|
it 'should work' do
|
96
|
-
|
147
|
+
instance.notification_url = "TEST_STRING"
|
148
|
+
expect(instance.notification_url).to eq("TEST_STRING")
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
describe 'test method "initialize"' do
|
153
|
+
it 'properly initializes with values' do
|
154
|
+
expect{instance = Freeclimb::MessageResult.new(
|
155
|
+
uri: "TS",
|
156
|
+
date_created: "TS",
|
157
|
+
date_updated: "TS",
|
158
|
+
revision: 1,
|
159
|
+
account_id: "TS",
|
160
|
+
message_id: "TS",
|
161
|
+
status: "NEW",
|
162
|
+
from: "TS",
|
163
|
+
to: "TS",
|
164
|
+
text: "TS",
|
165
|
+
direction: "TS",
|
166
|
+
notification_url: "TS",
|
167
|
+
)}.not_to raise_error()
|
168
|
+
end
|
169
|
+
it 'fails to initialize with input argument that is not a hash in Freeclimb::MessageResult' do
|
170
|
+
expect{instance = Freeclimb::MessageResult.new(
|
171
|
+
uri: "TS",
|
172
|
+
date_created: "TS",
|
173
|
+
date_updated: "TS",
|
174
|
+
revision: 1,
|
175
|
+
account_id: "TS",
|
176
|
+
message_id: "TS",
|
177
|
+
status: "NEW",
|
178
|
+
from: "TS",
|
179
|
+
to: "TS",
|
180
|
+
text: "TS",
|
181
|
+
direction: "TS",
|
182
|
+
notification_url: "TS",
|
183
|
+
invalid_attribute: true
|
184
|
+
)}.to raise_error(ArgumentError)
|
185
|
+
end
|
186
|
+
it 'fails to initialize with invalid attribute' do
|
187
|
+
expect{instance = Freeclimb::MessageResult.new(
|
188
|
+
uri: "TS",
|
189
|
+
date_created: "TS",
|
190
|
+
date_updated: "TS",
|
191
|
+
revision: 1,
|
192
|
+
account_id: "TS",
|
193
|
+
message_id: "TS",
|
194
|
+
status: "NEW",
|
195
|
+
from: "TS",
|
196
|
+
to: "TS",
|
197
|
+
text: "TS",
|
198
|
+
direction: "TS",
|
199
|
+
notification_url: "TS",
|
200
|
+
invalid_attribute: true
|
201
|
+
)}.to raise_error(ArgumentError)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
describe 'test method "valid"' do
|
206
|
+
it 'checks if properties are valid' do
|
207
|
+
instance = Freeclimb::MessageResult.new(
|
208
|
+
uri: "TS",
|
209
|
+
date_created: "TS",
|
210
|
+
date_updated: "TS",
|
211
|
+
revision: 1,
|
212
|
+
account_id: "TS",
|
213
|
+
message_id: "TS",
|
214
|
+
status: "NEW",
|
215
|
+
from: "TS",
|
216
|
+
to: "TS",
|
217
|
+
text: "TS",
|
218
|
+
direction: "TS",
|
219
|
+
notification_url: "TS",
|
220
|
+
)
|
221
|
+
expect(instance.valid?).to eq(true)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
describe 'test method "eql?"' do
|
226
|
+
it 'checks if objects are equal' do
|
227
|
+
obj = Object.new()
|
228
|
+
instance_1 = Freeclimb::MessageResult.new(
|
229
|
+
uri: "TS",
|
230
|
+
date_created: "TS",
|
231
|
+
date_updated: "TS",
|
232
|
+
revision: 1,
|
233
|
+
account_id: "TS",
|
234
|
+
message_id: "TS",
|
235
|
+
status: "NEW",
|
236
|
+
from: "TS",
|
237
|
+
to: "TS",
|
238
|
+
text: "TS",
|
239
|
+
direction: "TS",
|
240
|
+
notification_url: "TS",
|
241
|
+
)
|
242
|
+
instance_2 = Freeclimb::MessageResult.new(
|
243
|
+
uri: "TS",
|
244
|
+
date_created: "TS",
|
245
|
+
date_updated: "TS",
|
246
|
+
revision: 1,
|
247
|
+
account_id: "TS",
|
248
|
+
message_id: "TS",
|
249
|
+
status: "NEW",
|
250
|
+
from: "TS",
|
251
|
+
to: "TS",
|
252
|
+
text: "TS",
|
253
|
+
direction: "TS",
|
254
|
+
notification_url: "TS",
|
255
|
+
)
|
256
|
+
expect(instance_1.eql?(instance_2)).to eq(true)
|
257
|
+
end
|
258
|
+
it 'checks if objects are not equal' do
|
259
|
+
instance_1 = Freeclimb::MessageResult.new(
|
260
|
+
uri: "TS",
|
261
|
+
date_created: "TS",
|
262
|
+
date_updated: "TS",
|
263
|
+
revision: 1,
|
264
|
+
account_id: "TS",
|
265
|
+
message_id: "TS",
|
266
|
+
status: "NEW",
|
267
|
+
from: "TS",
|
268
|
+
to: "TS",
|
269
|
+
text: "TS",
|
270
|
+
direction: "TS",
|
271
|
+
notification_url: "TS",
|
272
|
+
)
|
273
|
+
instance_2 = Freeclimb::MessageResult.new(
|
274
|
+
uri: "ST",
|
275
|
+
date_created: "ST",
|
276
|
+
date_updated: "ST",
|
277
|
+
revision: 0,
|
278
|
+
account_id: "ST",
|
279
|
+
message_id: "ST",
|
280
|
+
status: "QUEUED",
|
281
|
+
from: "ST",
|
282
|
+
to: "ST",
|
283
|
+
text: "ST",
|
284
|
+
direction: "ST",
|
285
|
+
notification_url: "ST",
|
286
|
+
)
|
287
|
+
expect(instance_1.eql?(instance_2)).to eq(false)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
291
|
+
describe 'test method "hash"' do
|
292
|
+
it 'calculates hash code' do
|
293
|
+
instance = Freeclimb::MessageResult.new(
|
294
|
+
uri: "TS",
|
295
|
+
date_created: "TS",
|
296
|
+
date_updated: "TS",
|
297
|
+
revision: 1,
|
298
|
+
account_id: "TS",
|
299
|
+
message_id: "TS",
|
300
|
+
status: "NEW",
|
301
|
+
from: "TS",
|
302
|
+
to: "TS",
|
303
|
+
text: "TS",
|
304
|
+
direction: "TS",
|
305
|
+
notification_url: "TS",
|
306
|
+
)
|
307
|
+
expect(instance.hash).to be_a_kind_of(Integer)
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
describe 'test method "build_from_hash"' do
|
312
|
+
it 'builds equivalent model from hash code' do
|
313
|
+
instance_1 = Freeclimb::MessageResult.new(
|
314
|
+
uri: "TS",
|
315
|
+
date_created: "TS",
|
316
|
+
date_updated: "TS",
|
317
|
+
revision: 1,
|
318
|
+
account_id: "TS",
|
319
|
+
message_id: "TS",
|
320
|
+
status: "NEW",
|
321
|
+
from: "TS",
|
322
|
+
to: "TS",
|
323
|
+
text: "TS",
|
324
|
+
direction: "TS",
|
325
|
+
notification_url: "TS",
|
326
|
+
)
|
327
|
+
instance_2 = Freeclimb::MessageResult.new
|
328
|
+
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
describe 'test method "_deserialize"' do
|
333
|
+
instance = Freeclimb::MessageResult.new(
|
334
|
+
uri: "TS",
|
335
|
+
date_created: "TS",
|
336
|
+
date_updated: "TS",
|
337
|
+
revision: 1,
|
338
|
+
account_id: "TS",
|
339
|
+
message_id: "TS",
|
340
|
+
status: "NEW",
|
341
|
+
from: "TS",
|
342
|
+
to: "TS",
|
343
|
+
text: "TS",
|
344
|
+
direction: "TS",
|
345
|
+
notification_url: "TS",
|
346
|
+
)
|
347
|
+
it 'deserializes the data of uri' do
|
348
|
+
expect(instance._deserialize("String", instance.uri)).to be_a_kind_of(String)
|
349
|
+
end
|
350
|
+
it 'deserializes the data of date_created' do
|
351
|
+
expect(instance._deserialize("String", instance.date_created)).to be_a_kind_of(String)
|
352
|
+
end
|
353
|
+
it 'deserializes the data of date_updated' do
|
354
|
+
expect(instance._deserialize("String", instance.date_updated)).to be_a_kind_of(String)
|
355
|
+
end
|
356
|
+
it 'deserializes the data of revision' do
|
357
|
+
expect(instance._deserialize("Integer", instance.revision)).to be_a_kind_of(Integer)
|
358
|
+
end
|
359
|
+
it 'deserializes the data of account_id' do
|
360
|
+
expect(instance._deserialize("String", instance.account_id)).to be_a_kind_of(String)
|
361
|
+
end
|
362
|
+
it 'deserializes the data of message_id' do
|
363
|
+
expect(instance._deserialize("String", instance.message_id)).to be_a_kind_of(String)
|
364
|
+
end
|
365
|
+
it 'deserializes the data of from' do
|
366
|
+
expect(instance._deserialize("String", instance.from)).to be_a_kind_of(String)
|
367
|
+
end
|
368
|
+
it 'deserializes the data of to' do
|
369
|
+
expect(instance._deserialize("String", instance.to)).to be_a_kind_of(String)
|
370
|
+
end
|
371
|
+
it 'deserializes the data of text' do
|
372
|
+
expect(instance._deserialize("String", instance.text)).to be_a_kind_of(String)
|
373
|
+
end
|
374
|
+
it 'deserializes the data of direction' do
|
375
|
+
expect(instance._deserialize("String", instance.direction)).to be_a_kind_of(String)
|
376
|
+
end
|
377
|
+
it 'deserializes the data of notification_url' do
|
378
|
+
expect(instance._deserialize("String", instance.notification_url)).to be_a_kind_of(String)
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
describe 'test method "to_s"' do
|
383
|
+
it 'returns the string representation of the object' do
|
384
|
+
instance = Freeclimb::MessageResult.new(
|
385
|
+
uri: "TS",
|
386
|
+
date_created: "TS",
|
387
|
+
date_updated: "TS",
|
388
|
+
revision: 1,
|
389
|
+
account_id: "TS",
|
390
|
+
message_id: "TS",
|
391
|
+
status: "NEW",
|
392
|
+
from: "TS",
|
393
|
+
to: "TS",
|
394
|
+
text: "TS",
|
395
|
+
direction: "TS",
|
396
|
+
notification_url: "TS",
|
397
|
+
)
|
398
|
+
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
402
|
+
describe 'test method "to_hash"' do
|
403
|
+
it 'returns the object in the form of hash' do
|
404
|
+
instance = Freeclimb::MessageResult.new(
|
405
|
+
uri: "TS",
|
406
|
+
date_created: "TS",
|
407
|
+
date_updated: "TS",
|
408
|
+
revision: 1,
|
409
|
+
account_id: "TS",
|
410
|
+
message_id: "TS",
|
411
|
+
status: "NEW",
|
412
|
+
from: "TS",
|
413
|
+
to: "TS",
|
414
|
+
text: "TS",
|
415
|
+
direction: "TS",
|
416
|
+
notification_url: "TS",
|
417
|
+
)
|
418
|
+
expect(instance.to_hash).to be_a_kind_of(Hash)
|
419
|
+
end
|
420
|
+
it 'creates equal hash for two equal objects' do
|
421
|
+
obj = Object.new()
|
422
|
+
instance_1 = Freeclimb::MessageResult.new(
|
423
|
+
uri: "TS",
|
424
|
+
date_created: "TS",
|
425
|
+
date_updated: "TS",
|
426
|
+
revision: 1,
|
427
|
+
account_id: "TS",
|
428
|
+
message_id: "TS",
|
429
|
+
status: "NEW",
|
430
|
+
from: "TS",
|
431
|
+
to: "TS",
|
432
|
+
text: "TS",
|
433
|
+
direction: "TS",
|
434
|
+
notification_url: "TS",
|
435
|
+
)
|
436
|
+
instance_2 = Freeclimb::MessageResult.new(
|
437
|
+
uri: "TS",
|
438
|
+
date_created: "TS",
|
439
|
+
date_updated: "TS",
|
440
|
+
revision: 1,
|
441
|
+
account_id: "TS",
|
442
|
+
message_id: "TS",
|
443
|
+
status: "NEW",
|
444
|
+
from: "TS",
|
445
|
+
to: "TS",
|
446
|
+
text: "TS",
|
447
|
+
direction: "TS",
|
448
|
+
notification_url: "TS",
|
449
|
+
)
|
450
|
+
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
451
|
+
end
|
452
|
+
end
|
453
|
+
|
454
|
+
describe 'test method "_to_hash"' do
|
455
|
+
instance = Freeclimb::MessageResult.new(
|
456
|
+
uri: "TS",
|
457
|
+
|
458
|
+
date_created: "TS",
|
459
|
+
|
460
|
+
date_updated: "TS",
|
461
|
+
|
462
|
+
revision: 1,
|
463
|
+
|
464
|
+
account_id: "TS",
|
465
|
+
|
466
|
+
message_id: "TS",
|
467
|
+
|
468
|
+
status: "NEW",
|
469
|
+
|
470
|
+
from: "TS",
|
471
|
+
|
472
|
+
to: "TS",
|
473
|
+
|
474
|
+
text: "TS",
|
475
|
+
|
476
|
+
direction: "TS",
|
477
|
+
|
478
|
+
notification_url: "TS",
|
479
|
+
)
|
480
|
+
it 'returns uri in the form of hash' do
|
481
|
+
expect(instance._to_hash(instance.uri)).to eq(instance.uri)
|
482
|
+
end
|
483
|
+
it 'returns date_created in the form of hash' do
|
484
|
+
expect(instance._to_hash(instance.date_created)).to eq(instance.date_created)
|
485
|
+
end
|
486
|
+
it 'returns date_updated in the form of hash' do
|
487
|
+
expect(instance._to_hash(instance.date_updated)).to eq(instance.date_updated)
|
488
|
+
end
|
489
|
+
it 'returns revision in the form of hash' do
|
490
|
+
expect(instance._to_hash(instance.revision)).to eq(instance.revision)
|
491
|
+
end
|
492
|
+
it 'returns account_id in the form of hash' do
|
493
|
+
expect(instance._to_hash(instance.account_id)).to eq(instance.account_id)
|
494
|
+
end
|
495
|
+
it 'returns message_id in the form of hash' do
|
496
|
+
expect(instance._to_hash(instance.message_id)).to eq(instance.message_id)
|
497
|
+
end
|
498
|
+
it 'returns status in the form of hash' do
|
499
|
+
expect(instance._to_hash(instance.status)).to eq(instance.status)
|
500
|
+
end
|
501
|
+
it 'returns from in the form of hash' do
|
502
|
+
expect(instance._to_hash(instance.from)).to eq(instance.from)
|
503
|
+
end
|
504
|
+
it 'returns to in the form of hash' do
|
505
|
+
expect(instance._to_hash(instance.to)).to eq(instance.to)
|
506
|
+
end
|
507
|
+
it 'returns text in the form of hash' do
|
508
|
+
expect(instance._to_hash(instance.text)).to eq(instance.text)
|
509
|
+
end
|
510
|
+
it 'returns direction in the form of hash' do
|
511
|
+
expect(instance._to_hash(instance.direction)).to eq(instance.direction)
|
512
|
+
end
|
513
|
+
it 'returns notification_url in the form of hash' do
|
514
|
+
expect(instance._to_hash(instance.notification_url)).to eq(instance.notification_url)
|
97
515
|
end
|
98
516
|
end
|
99
517
|
|