freeclimb 4.4.0 → 4.4.2

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