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,79 +27,453 @@ describe Freeclimb::GetSpeech do
|
|
27
27
|
end
|
28
28
|
describe 'test attribute "action_url"' do
|
29
29
|
it 'should work' do
|
30
|
-
|
30
|
+
instance.action_url = "TEST_STRING"
|
31
|
+
expect(instance.action_url).to eq("TEST_STRING")
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
34
35
|
describe 'test attribute "grammar_type"' do
|
35
|
-
it '
|
36
|
-
|
36
|
+
it 'assigns value URL' do
|
37
|
+
instance.grammar_type = Freeclimb::GrammarType::URL
|
38
|
+
expect(instance.grammar_type).to eq(Freeclimb::GrammarType::URL)
|
39
|
+
end
|
40
|
+
it 'assigns value BUILT_IN' do
|
41
|
+
instance.grammar_type = Freeclimb::GrammarType::BUILT_IN
|
42
|
+
expect(instance.grammar_type).to eq(Freeclimb::GrammarType::BUILT_IN)
|
37
43
|
end
|
38
44
|
end
|
39
45
|
|
40
46
|
describe 'test attribute "grammar_file"' do
|
41
47
|
it 'should work' do
|
42
|
-
|
48
|
+
instance.grammar_file = "TEST_STRING"
|
49
|
+
expect(instance.grammar_file).to eq("TEST_STRING")
|
43
50
|
end
|
44
51
|
end
|
45
52
|
|
46
53
|
describe 'test attribute "grammar_rule"' do
|
47
54
|
it 'should work' do
|
48
|
-
|
55
|
+
instance.grammar_rule = "TEST_STRING"
|
56
|
+
expect(instance.grammar_rule).to eq("TEST_STRING")
|
49
57
|
end
|
50
58
|
end
|
51
59
|
|
52
60
|
describe 'test attribute "play_beep"' do
|
53
61
|
it 'should work' do
|
54
|
-
|
62
|
+
instance.play_beep = false
|
63
|
+
expect(instance.play_beep).to eq(false)
|
55
64
|
end
|
56
65
|
end
|
57
66
|
|
58
67
|
describe 'test attribute "prompts"' do
|
59
68
|
it 'should work' do
|
60
|
-
|
69
|
+
instance.prompts = ["ELEMENT_1", "ELEMENT_2"]
|
70
|
+
expect(instance.prompts).to eq(["ELEMENT_1", "ELEMENT_2"])
|
61
71
|
end
|
62
72
|
end
|
63
73
|
|
64
74
|
describe 'test attribute "no_input_timeout_ms"' do
|
65
75
|
it 'should work' do
|
66
|
-
|
76
|
+
instance.no_input_timeout_ms = 1
|
77
|
+
expect(instance.no_input_timeout_ms).to eq(1)
|
67
78
|
end
|
68
79
|
end
|
69
80
|
|
70
81
|
describe 'test attribute "recognition_timeout_ms"' do
|
71
82
|
it 'should work' do
|
72
|
-
|
83
|
+
instance.recognition_timeout_ms = 1
|
84
|
+
expect(instance.recognition_timeout_ms).to eq(1)
|
73
85
|
end
|
74
86
|
end
|
75
87
|
|
76
88
|
describe 'test attribute "confidence_threshold"' do
|
77
89
|
it 'should work' do
|
78
|
-
|
90
|
+
instance.confidence_threshold = BigDecimal("1.0")
|
91
|
+
expect(instance.confidence_threshold).to eq(BigDecimal("1.0"))
|
79
92
|
end
|
80
93
|
end
|
81
94
|
|
82
95
|
describe 'test attribute "sensitivity_level"' do
|
83
96
|
it 'should work' do
|
84
|
-
|
97
|
+
instance.sensitivity_level = BigDecimal("1.0")
|
98
|
+
expect(instance.sensitivity_level).to eq(BigDecimal("1.0"))
|
85
99
|
end
|
86
100
|
end
|
87
101
|
|
88
102
|
describe 'test attribute "speech_complete_timeout_ms"' do
|
89
103
|
it 'should work' do
|
90
|
-
|
104
|
+
instance.speech_complete_timeout_ms = 1
|
105
|
+
expect(instance.speech_complete_timeout_ms).to eq(1)
|
91
106
|
end
|
92
107
|
end
|
93
108
|
|
94
109
|
describe 'test attribute "speech_incomplete_timeout_ms"' do
|
95
110
|
it 'should work' do
|
96
|
-
|
111
|
+
instance.speech_incomplete_timeout_ms = 1
|
112
|
+
expect(instance.speech_incomplete_timeout_ms).to eq(1)
|
97
113
|
end
|
98
114
|
end
|
99
115
|
|
100
116
|
describe 'test attribute "privacy_mode"' do
|
101
117
|
it 'should work' do
|
102
|
-
|
118
|
+
instance.privacy_mode = false
|
119
|
+
expect(instance.privacy_mode).to eq(false)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
describe 'test method "initialize"' do
|
124
|
+
it 'properly initializes with values' do
|
125
|
+
expect{instance = Freeclimb::GetSpeech.new(
|
126
|
+
action_url: "TS",
|
127
|
+
grammar_type: "URL",
|
128
|
+
grammar_file: "TS",
|
129
|
+
grammar_rule: "TS",
|
130
|
+
play_beep: true,
|
131
|
+
prompts: Array.new(),
|
132
|
+
no_input_timeout_ms: 1,
|
133
|
+
recognition_timeout_ms: 1,
|
134
|
+
speech_complete_timeout_ms: 1,
|
135
|
+
speech_incomplete_timeout_ms: 1,
|
136
|
+
privacy_mode: true,
|
137
|
+
)}.not_to raise_error()
|
138
|
+
end
|
139
|
+
it 'fails to initialize with input argument that is not a hash in Freeclimb::GetSpeech' do
|
140
|
+
expect{instance = Freeclimb::GetSpeech.new(
|
141
|
+
action_url: "TS",
|
142
|
+
grammar_type: "URL",
|
143
|
+
grammar_file: "TS",
|
144
|
+
grammar_rule: "TS",
|
145
|
+
play_beep: true,
|
146
|
+
prompts: Array.new(),
|
147
|
+
no_input_timeout_ms: 1,
|
148
|
+
recognition_timeout_ms: 1,
|
149
|
+
speech_complete_timeout_ms: 1,
|
150
|
+
speech_incomplete_timeout_ms: 1,
|
151
|
+
privacy_mode: true,
|
152
|
+
invalid_attribute: true
|
153
|
+
)}.to raise_error(ArgumentError)
|
154
|
+
end
|
155
|
+
it 'fails to initialize with invalid attribute' do
|
156
|
+
expect{instance = Freeclimb::GetSpeech.new(
|
157
|
+
action_url: "TS",
|
158
|
+
grammar_type: "URL",
|
159
|
+
grammar_file: "TS",
|
160
|
+
grammar_rule: "TS",
|
161
|
+
play_beep: true,
|
162
|
+
prompts: Array.new(),
|
163
|
+
no_input_timeout_ms: 1,
|
164
|
+
recognition_timeout_ms: 1,
|
165
|
+
speech_complete_timeout_ms: 1,
|
166
|
+
speech_incomplete_timeout_ms: 1,
|
167
|
+
privacy_mode: true,
|
168
|
+
invalid_attribute: true
|
169
|
+
)}.to raise_error(ArgumentError)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe 'test method "valid"' do
|
174
|
+
it 'checks if properties are valid' do
|
175
|
+
instance = Freeclimb::GetSpeech.new(
|
176
|
+
action_url: "TS",
|
177
|
+
grammar_type: "URL",
|
178
|
+
grammar_file: "TS",
|
179
|
+
grammar_rule: "TS",
|
180
|
+
play_beep: true,
|
181
|
+
prompts: Array.new(),
|
182
|
+
no_input_timeout_ms: 1,
|
183
|
+
recognition_timeout_ms: 1,
|
184
|
+
speech_complete_timeout_ms: 1,
|
185
|
+
speech_incomplete_timeout_ms: 1,
|
186
|
+
privacy_mode: true,
|
187
|
+
)
|
188
|
+
expect(instance.valid?).to eq(true)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
describe 'test method "eql?"' do
|
193
|
+
it 'checks if objects are equal' do
|
194
|
+
obj = Object.new()
|
195
|
+
instance_1 = Freeclimb::GetSpeech.new(
|
196
|
+
action_url: "TS",
|
197
|
+
grammar_type: "URL",
|
198
|
+
grammar_file: "TS",
|
199
|
+
grammar_rule: "TS",
|
200
|
+
play_beep: true,
|
201
|
+
prompts: [],
|
202
|
+
no_input_timeout_ms: 1,
|
203
|
+
recognition_timeout_ms: 1,
|
204
|
+
speech_complete_timeout_ms: 1,
|
205
|
+
speech_incomplete_timeout_ms: 1,
|
206
|
+
privacy_mode: true,
|
207
|
+
)
|
208
|
+
instance_2 = Freeclimb::GetSpeech.new(
|
209
|
+
action_url: "TS",
|
210
|
+
grammar_type: "URL",
|
211
|
+
grammar_file: "TS",
|
212
|
+
grammar_rule: "TS",
|
213
|
+
play_beep: true,
|
214
|
+
prompts: [],
|
215
|
+
no_input_timeout_ms: 1,
|
216
|
+
recognition_timeout_ms: 1,
|
217
|
+
speech_complete_timeout_ms: 1,
|
218
|
+
speech_incomplete_timeout_ms: 1,
|
219
|
+
privacy_mode: true,
|
220
|
+
)
|
221
|
+
expect(instance_1.eql?(instance_2)).to eq(true)
|
222
|
+
end
|
223
|
+
it 'checks if objects are not equal' do
|
224
|
+
instance_1 = Freeclimb::GetSpeech.new(
|
225
|
+
action_url: "TS",
|
226
|
+
grammar_type: "URL",
|
227
|
+
grammar_file: "TS",
|
228
|
+
grammar_rule: "TS",
|
229
|
+
play_beep: true,
|
230
|
+
prompts: [],
|
231
|
+
no_input_timeout_ms: 1,
|
232
|
+
recognition_timeout_ms: 1,
|
233
|
+
speech_complete_timeout_ms: 1,
|
234
|
+
speech_incomplete_timeout_ms: 1,
|
235
|
+
privacy_mode: true,
|
236
|
+
)
|
237
|
+
instance_2 = Freeclimb::GetSpeech.new(
|
238
|
+
action_url: "ST",
|
239
|
+
grammar_type: "BUILT_IN",
|
240
|
+
grammar_file: "ST",
|
241
|
+
grammar_rule: "ST",
|
242
|
+
play_beep: false,
|
243
|
+
prompts: nil,
|
244
|
+
no_input_timeout_ms: 0,
|
245
|
+
recognition_timeout_ms: 0,
|
246
|
+
speech_complete_timeout_ms: 0,
|
247
|
+
speech_incomplete_timeout_ms: 0,
|
248
|
+
privacy_mode: false,
|
249
|
+
)
|
250
|
+
expect(instance_1.eql?(instance_2)).to eq(false)
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
describe 'test method "hash"' do
|
255
|
+
it 'calculates hash code' do
|
256
|
+
instance = Freeclimb::GetSpeech.new(
|
257
|
+
action_url: "TS",
|
258
|
+
grammar_type: "URL",
|
259
|
+
grammar_file: "TS",
|
260
|
+
grammar_rule: "TS",
|
261
|
+
play_beep: true,
|
262
|
+
prompts: Array.new(),
|
263
|
+
no_input_timeout_ms: 1,
|
264
|
+
recognition_timeout_ms: 1,
|
265
|
+
speech_complete_timeout_ms: 1,
|
266
|
+
speech_incomplete_timeout_ms: 1,
|
267
|
+
privacy_mode: true,
|
268
|
+
)
|
269
|
+
expect(instance.hash).to be_a_kind_of(Integer)
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
describe 'test method "build_from_hash"' do
|
274
|
+
it 'builds equivalent model from hash code' do
|
275
|
+
instance_1 = Freeclimb::GetSpeech.new(
|
276
|
+
action_url: "TS",
|
277
|
+
grammar_type: "URL",
|
278
|
+
grammar_file: "TS",
|
279
|
+
grammar_rule: "TS",
|
280
|
+
play_beep: true,
|
281
|
+
prompts: Array.new(),
|
282
|
+
no_input_timeout_ms: 1,
|
283
|
+
recognition_timeout_ms: 1,
|
284
|
+
speech_complete_timeout_ms: 1,
|
285
|
+
speech_incomplete_timeout_ms: 1,
|
286
|
+
privacy_mode: true,
|
287
|
+
)
|
288
|
+
instance_2 = Freeclimb::GetSpeech.new
|
289
|
+
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
describe 'test method "_deserialize"' do
|
294
|
+
instance = Freeclimb::GetSpeech.new(
|
295
|
+
action_url: "TS",
|
296
|
+
grammar_type: "URL",
|
297
|
+
grammar_file: "TS",
|
298
|
+
grammar_rule: "TS",
|
299
|
+
play_beep: true,
|
300
|
+
prompts: Array.new(),
|
301
|
+
no_input_timeout_ms: 1,
|
302
|
+
recognition_timeout_ms: 1,
|
303
|
+
speech_complete_timeout_ms: 1,
|
304
|
+
speech_incomplete_timeout_ms: 1,
|
305
|
+
privacy_mode: true,
|
306
|
+
)
|
307
|
+
it 'deserializes the data of action_url' do
|
308
|
+
expect(instance._deserialize("String", instance.action_url)).to be_a_kind_of(String)
|
309
|
+
end
|
310
|
+
it 'deserializes the data of grammar_file' do
|
311
|
+
expect(instance._deserialize("String", instance.grammar_file)).to be_a_kind_of(String)
|
312
|
+
end
|
313
|
+
it 'deserializes the data of grammar_rule' do
|
314
|
+
expect(instance._deserialize("String", instance.grammar_rule)).to be_a_kind_of(String)
|
315
|
+
end
|
316
|
+
it 'deserializes the data of play_beep' do
|
317
|
+
expect(instance._deserialize("Boolean", instance.play_beep)).to be_a_kind_of(TrueClass)
|
318
|
+
end
|
319
|
+
it 'deserializes the data of prompts' do
|
320
|
+
expect(instance._deserialize("Array<PerclCommand>", instance.prompts)).to be_a_kind_of(Array)
|
321
|
+
end
|
322
|
+
it 'deserializes the data of no_input_timeout_ms' do
|
323
|
+
expect(instance._deserialize("Integer", instance.no_input_timeout_ms)).to be_a_kind_of(Integer)
|
324
|
+
end
|
325
|
+
it 'deserializes the data of recognition_timeout_ms' do
|
326
|
+
expect(instance._deserialize("Integer", instance.recognition_timeout_ms)).to be_a_kind_of(Integer)
|
327
|
+
end
|
328
|
+
it 'deserializes the data of confidence_threshold' do
|
329
|
+
expect(instance._deserialize("Float", instance.confidence_threshold)).to be_a_kind_of(Float)
|
330
|
+
end
|
331
|
+
it 'deserializes the data of sensitivity_level' do
|
332
|
+
expect(instance._deserialize("Float", instance.sensitivity_level)).to be_a_kind_of(Float)
|
333
|
+
end
|
334
|
+
it 'deserializes the data of speech_complete_timeout_ms' do
|
335
|
+
expect(instance._deserialize("Integer", instance.speech_complete_timeout_ms)).to be_a_kind_of(Integer)
|
336
|
+
end
|
337
|
+
it 'deserializes the data of speech_incomplete_timeout_ms' do
|
338
|
+
expect(instance._deserialize("Integer", instance.speech_incomplete_timeout_ms)).to be_a_kind_of(Integer)
|
339
|
+
end
|
340
|
+
it 'deserializes the data of privacy_mode' do
|
341
|
+
expect(instance._deserialize("Boolean", instance.privacy_mode)).to be_a_kind_of(TrueClass)
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
describe 'test method "to_s"' do
|
346
|
+
it 'returns the string representation of the object' do
|
347
|
+
instance = Freeclimb::GetSpeech.new(
|
348
|
+
action_url: "TS",
|
349
|
+
grammar_type: "URL",
|
350
|
+
grammar_file: "TS",
|
351
|
+
grammar_rule: "TS",
|
352
|
+
play_beep: true,
|
353
|
+
prompts: Array.new(),
|
354
|
+
no_input_timeout_ms: 1,
|
355
|
+
recognition_timeout_ms: 1,
|
356
|
+
speech_complete_timeout_ms: 1,
|
357
|
+
speech_incomplete_timeout_ms: 1,
|
358
|
+
privacy_mode: true,
|
359
|
+
)
|
360
|
+
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
361
|
+
end
|
362
|
+
end
|
363
|
+
|
364
|
+
describe 'test method "to_hash"' do
|
365
|
+
it 'returns the object in the form of hash' do
|
366
|
+
instance = Freeclimb::GetSpeech.new(
|
367
|
+
action_url: "TS",
|
368
|
+
grammar_type: "URL",
|
369
|
+
grammar_file: "TS",
|
370
|
+
grammar_rule: "TS",
|
371
|
+
play_beep: true,
|
372
|
+
prompts: Array.new(),
|
373
|
+
no_input_timeout_ms: 1,
|
374
|
+
recognition_timeout_ms: 1,
|
375
|
+
speech_complete_timeout_ms: 1,
|
376
|
+
speech_incomplete_timeout_ms: 1,
|
377
|
+
privacy_mode: true,
|
378
|
+
)
|
379
|
+
expect(instance.to_hash).to be_a_kind_of(Hash)
|
380
|
+
end
|
381
|
+
it 'creates equal hash for two equal objects' do
|
382
|
+
obj = Object.new()
|
383
|
+
instance_1 = Freeclimb::GetSpeech.new(
|
384
|
+
action_url: "TS",
|
385
|
+
grammar_type: "URL",
|
386
|
+
grammar_file: "TS",
|
387
|
+
grammar_rule: "TS",
|
388
|
+
play_beep: true,
|
389
|
+
prompts: Array.new(),
|
390
|
+
no_input_timeout_ms: 1,
|
391
|
+
recognition_timeout_ms: 1,
|
392
|
+
speech_complete_timeout_ms: 1,
|
393
|
+
speech_incomplete_timeout_ms: 1,
|
394
|
+
privacy_mode: true,
|
395
|
+
)
|
396
|
+
instance_2 = Freeclimb::GetSpeech.new(
|
397
|
+
action_url: "TS",
|
398
|
+
grammar_type: "URL",
|
399
|
+
grammar_file: "TS",
|
400
|
+
grammar_rule: "TS",
|
401
|
+
play_beep: true,
|
402
|
+
prompts: Array.new(),
|
403
|
+
no_input_timeout_ms: 1,
|
404
|
+
recognition_timeout_ms: 1,
|
405
|
+
speech_complete_timeout_ms: 1,
|
406
|
+
speech_incomplete_timeout_ms: 1,
|
407
|
+
privacy_mode: true,
|
408
|
+
)
|
409
|
+
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
410
|
+
end
|
411
|
+
end
|
412
|
+
|
413
|
+
describe 'test method "_to_hash"' do
|
414
|
+
instance = Freeclimb::GetSpeech.new(
|
415
|
+
action_url: "TS",
|
416
|
+
|
417
|
+
grammar_type: "URL",
|
418
|
+
|
419
|
+
grammar_file: "TS",
|
420
|
+
|
421
|
+
grammar_rule: "TS",
|
422
|
+
|
423
|
+
play_beep: true,
|
424
|
+
|
425
|
+
prompts: Array.new(),
|
426
|
+
|
427
|
+
no_input_timeout_ms: 1,
|
428
|
+
|
429
|
+
recognition_timeout_ms: 1,
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
speech_complete_timeout_ms: 1,
|
434
|
+
|
435
|
+
speech_incomplete_timeout_ms: 1,
|
436
|
+
|
437
|
+
privacy_mode: true,
|
438
|
+
)
|
439
|
+
it 'returns action_url in the form of hash' do
|
440
|
+
expect(instance._to_hash(instance.action_url)).to eq(instance.action_url)
|
441
|
+
end
|
442
|
+
it 'returns grammar_type in the form of hash' do
|
443
|
+
expect(instance._to_hash(instance.grammar_type)).to eq(instance.grammar_type)
|
444
|
+
end
|
445
|
+
it 'returns grammar_file in the form of hash' do
|
446
|
+
expect(instance._to_hash(instance.grammar_file)).to eq(instance.grammar_file)
|
447
|
+
end
|
448
|
+
it 'returns grammar_rule in the form of hash' do
|
449
|
+
expect(instance._to_hash(instance.grammar_rule)).to eq(instance.grammar_rule)
|
450
|
+
end
|
451
|
+
it 'returns play_beep in the form of hash' do
|
452
|
+
expect(instance._to_hash(instance.play_beep)).to eq(instance.play_beep)
|
453
|
+
end
|
454
|
+
it 'returns prompts in the form of hash' do
|
455
|
+
expect(instance._to_hash(instance.prompts)).to eq(instance.prompts)
|
456
|
+
end
|
457
|
+
it 'returns no_input_timeout_ms in the form of hash' do
|
458
|
+
expect(instance._to_hash(instance.no_input_timeout_ms)).to eq(instance.no_input_timeout_ms)
|
459
|
+
end
|
460
|
+
it 'returns recognition_timeout_ms in the form of hash' do
|
461
|
+
expect(instance._to_hash(instance.recognition_timeout_ms)).to eq(instance.recognition_timeout_ms)
|
462
|
+
end
|
463
|
+
it 'returns confidence_threshold in the form of hash' do
|
464
|
+
expect(instance._to_hash(instance.confidence_threshold)).to eq(instance.confidence_threshold)
|
465
|
+
end
|
466
|
+
it 'returns sensitivity_level in the form of hash' do
|
467
|
+
expect(instance._to_hash(instance.sensitivity_level)).to eq(instance.sensitivity_level)
|
468
|
+
end
|
469
|
+
it 'returns speech_complete_timeout_ms in the form of hash' do
|
470
|
+
expect(instance._to_hash(instance.speech_complete_timeout_ms)).to eq(instance.speech_complete_timeout_ms)
|
471
|
+
end
|
472
|
+
it 'returns speech_incomplete_timeout_ms in the form of hash' do
|
473
|
+
expect(instance._to_hash(instance.speech_incomplete_timeout_ms)).to eq(instance.speech_incomplete_timeout_ms)
|
474
|
+
end
|
475
|
+
it 'returns privacy_mode in the form of hash' do
|
476
|
+
expect(instance._to_hash(instance.privacy_mode)).to eq(instance.privacy_mode)
|
103
477
|
end
|
104
478
|
end
|
105
479
|
|