freeclimb 5.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +21 -15
- data/README.md +5 -4
- data/docs/MessageResult.md +7 -1
- data/docs/TFNCampaign.md +34 -0
- data/lib/freeclimb/configuration.rb +1 -2
- data/lib/freeclimb/models/dequeue.rb +2 -4
- data/lib/freeclimb/models/message_result.rb +36 -5
- data/lib/freeclimb/models/remove_from_conference.rb +2 -4
- data/lib/freeclimb/models/start_record_call.rb +2 -4
- data/lib/freeclimb/models/terminate_conference.rb +2 -4
- data/lib/freeclimb/models/tfn_campaign.rb +370 -0
- data/lib/freeclimb/models/unpark.rb +2 -4
- data/lib/freeclimb/version.rb +1 -1
- data/lib/freeclimb.rb +1 -0
- data/openapi.json +93 -38
- data/spec/api/default_api_spec.rb +39 -117
- data/spec/models/account_request_spec.rb +113 -2
- data/spec/models/account_result_spec.rb +591 -28
- data/spec/models/account_status_spec.rb +1 -0
- data/spec/models/account_type_spec.rb +1 -0
- data/spec/models/add_to_conference_notification_webhook_spec.rb +654 -5
- data/spec/models/add_to_conference_spec.rb +471 -2
- data/spec/models/add_to_queue_notification_webhook_spec.rb +465 -2
- data/spec/models/answered_by_spec.rb +1 -0
- data/spec/models/application_list_spec.rb +323 -2
- data/spec/models/application_request_spec.rb +393 -2
- data/spec/models/application_result_spec.rb +723 -14
- data/spec/models/available_number_list_spec.rb +323 -2
- data/spec/models/available_number_spec.rb +380 -21
- data/spec/models/barge_in_reason_spec.rb +1 -0
- data/spec/models/buy_incoming_number_request_spec.rb +169 -2
- data/spec/models/call_control_webhook_spec.rb +281 -2
- data/spec/models/call_direction_spec.rb +1 -0
- data/spec/models/call_ended_reason_spec.rb +1 -0
- data/spec/models/call_list_spec.rb +323 -2
- data/spec/models/call_result_spec.rb +1020 -9
- data/spec/models/call_status_spec.rb +1 -0
- data/spec/models/call_status_webhook_spec.rb +501 -2
- data/spec/models/capabilities_spec.rb +191 -2
- data/spec/models/completion_request_spec.rb +54 -2
- data/spec/models/completion_result_spec.rb +93 -2
- data/spec/models/completion_result_status_spec.rb +1 -0
- data/spec/models/conference_list_spec.rb +323 -2
- data/spec/models/conference_participant_list_spec.rb +323 -2
- data/spec/models/conference_participant_result_spec.rb +532 -7
- data/spec/models/conference_recording_status_webhook_spec.rb +654 -5
- data/spec/models/conference_result_spec.rb +768 -55
- data/spec/models/conference_status_spec.rb +1 -0
- data/spec/models/conference_status_webhook_spec.rb +654 -5
- data/spec/models/create_conference_request_spec.rb +243 -2
- data/spec/models/create_conference_spec.rb +281 -2
- data/spec/models/create_conference_webhook_spec.rb +654 -5
- data/spec/models/create_web_rtc_token_spec.rb +151 -2
- data/spec/models/dequeue_spec.rb +1 -0
- data/spec/models/dequeue_webhook_spec.rb +565 -8
- data/spec/models/enqueue_spec.rb +225 -2
- data/spec/models/filter_logs_request_spec.rb +57 -2
- data/spec/models/get_digits_reason_spec.rb +1 -0
- data/spec/models/get_digits_spec.rb +379 -2
- data/spec/models/get_digits_webhook_spec.rb +623 -12
- data/spec/models/get_speech_reason_spec.rb +1 -0
- data/spec/models/get_speech_spec.rb +556 -11
- data/spec/models/get_speech_webhook_spec.rb +870 -15
- data/spec/models/grammar_file_built_in_spec.rb +1 -0
- data/spec/models/grammar_type_spec.rb +1 -0
- data/spec/models/hangup_spec.rb +57 -2
- data/spec/models/if_machine_spec.rb +1 -0
- data/spec/models/inbound_call_webhook_spec.rb +521 -2
- data/spec/models/incoming_number_list_spec.rb +323 -2
- data/spec/models/incoming_number_request_spec.rb +169 -2
- data/spec/models/incoming_number_result_spec.rb +930 -43
- data/spec/models/language_spec.rb +1 -0
- data/spec/models/leave_conference_webhook_spec.rb +465 -2
- data/spec/models/log_level_spec.rb +1 -0
- data/spec/models/log_list_spec.rb +323 -2
- data/spec/models/log_result_spec.rb +368 -9
- data/spec/models/machine_detected_webhook_spec.rb +565 -10
- data/spec/models/machine_type_spec.rb +1 -0
- data/spec/models/make_call_request_spec.rb +529 -6
- data/spec/models/message_delivery_webhook_spec.rb +565 -6
- data/spec/models/message_direction_spec.rb +1 -0
- data/spec/models/message_request_spec.rb +469 -2
- data/spec/models/message_result_spec.rb +1364 -225
- data/spec/models/message_status_spec.rb +1 -0
- data/spec/models/message_status_webhook_spec.rb +615 -20
- data/spec/models/messages_list_spec.rb +323 -2
- data/spec/models/mutable_resource_model_spec.rb +207 -2
- data/spec/models/out_dial_api_connect_webhook_spec.rb +521 -2
- data/spec/models/out_dial_connect_webhook_spec.rb +521 -2
- data/spec/models/out_dial_spec.rb +505 -2
- data/spec/models/out_dial_start_webhook_spec.rb +599 -24
- data/spec/models/pagination_model_spec.rb +285 -2
- data/spec/models/park_spec.rb +169 -2
- data/spec/models/pause_spec.rb +39 -2
- data/spec/models/percl_command_spec.rb +54 -2
- data/spec/models/percl_script_spec.rb +39 -2
- data/spec/models/play_beep_spec.rb +1 -0
- data/spec/models/play_early_media_spec.rb +57 -2
- data/spec/models/play_spec.rb +133 -2
- data/spec/models/queue_list_spec.rb +323 -2
- data/spec/models/queue_member_list_spec.rb +323 -2
- data/spec/models/queue_member_spec.rb +245 -2
- data/spec/models/queue_request_spec.rb +95 -2
- data/spec/models/queue_result_spec.rb +564 -15
- data/spec/models/queue_result_status_spec.rb +1 -0
- data/spec/models/queue_wait_webhook_spec.rb +616 -21
- data/spec/models/record_utterance_spec.rb +303 -2
- data/spec/models/record_utterance_term_reason_spec.rb +1 -0
- data/spec/models/record_webhook_spec.rb +868 -13
- data/spec/models/recording_list_spec.rb +323 -2
- data/spec/models/recording_result_spec.rb +469 -2
- data/spec/models/redirect_spec.rb +57 -2
- data/spec/models/redirect_webhook_spec.rb +521 -2
- data/spec/models/reject_spec.rb +57 -2
- data/spec/models/remove_from_conference_spec.rb +1 -0
- data/spec/models/remove_from_queue_notification_webhook_spec.rb +546 -9
- data/spec/models/request_type_spec.rb +1 -0
- data/spec/models/say_spec.rb +189 -2
- data/spec/models/send_digits_spec.rb +133 -2
- data/spec/models/set_dtmf_pass_through_spec.rb +39 -2
- data/spec/models/set_listen_spec.rb +39 -2
- data/spec/models/set_talk_spec.rb +39 -2
- data/spec/models/sms_spec.rb +225 -2
- data/spec/models/sms_ten_dlc_brand_alt_business_id_type_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_entity_type_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_identity_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_relationship_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brand_spec.rb +1969 -423
- data/spec/models/sms_ten_dlc_brand_stock_exchange_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_brands_list_result_spec.rb +323 -2
- data/spec/models/sms_ten_dlc_campaign_spec.rb +2224 -550
- data/spec/models/sms_ten_dlc_campaign_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_campaigns_list_result_spec.rb +323 -2
- data/spec/models/sms_ten_dlc_partner_campaign_brand_spec.rb +597 -17
- data/spec/models/sms_ten_dlc_partner_campaign_spec.rb +1537 -155
- data/spec/models/sms_ten_dlc_partner_campaign_status_spec.rb +1 -0
- data/spec/models/sms_ten_dlc_partner_campaigns_list_result_spec.rb +323 -2
- data/spec/models/sms_toll_free_campaign_registration_status_spec.rb +1 -0
- data/spec/models/sms_toll_free_campaign_spec.rb +355 -2
- data/spec/models/sms_toll_free_campaigns_list_result_spec.rb +323 -2
- data/spec/models/start_record_call_spec.rb +1 -0
- data/spec/models/terminate_conference_spec.rb +1 -0
- data/spec/models/tfn_campaign_spec.rb +1089 -0
- data/spec/models/tfn_spec.rb +57 -2
- data/spec/models/transcribe_reason_spec.rb +1 -0
- data/spec/models/transcribe_term_reason_spec.rb +1 -0
- data/spec/models/transcribe_utterance_record_spec.rb +115 -2
- data/spec/models/transcribe_utterance_spec.rb +288 -21
- data/spec/models/transcribe_webhook_spec.rb +1049 -4
- data/spec/models/unpark_spec.rb +1 -0
- data/spec/models/update_call_request_spec.rb +37 -2
- data/spec/models/update_call_request_status_spec.rb +1 -0
- data/spec/models/update_conference_participant_request_spec.rb +115 -2
- data/spec/models/update_conference_request_spec.rb +129 -2
- data/spec/models/update_conference_request_status_spec.rb +1 -0
- data/spec/models/webhook_spec.rb +54 -2
- metadata +129 -125
@@ -13,6 +13,7 @@ OpenAPI Generator version: 7.9.0
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
|
+
include Freeclimb
|
16
17
|
|
17
18
|
# Unit tests for Freeclimb::PerclCommand
|
18
19
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -30,21 +31,30 @@ describe Freeclimb::PerclCommand do
|
|
30
31
|
describe 'test method "initialize"' do
|
31
32
|
it 'properly initializes with values' do
|
32
33
|
expect { instance = Freeclimb::PerclCommand.new(
|
34
|
+
|
33
35
|
command: "TS",
|
34
36
|
|
37
|
+
|
38
|
+
|
35
39
|
)}.not_to raise_error()
|
36
40
|
end
|
37
41
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::PerclCommand' do
|
38
42
|
expect { instance = Freeclimb::PerclCommand.new(
|
43
|
+
|
39
44
|
command: "TS",
|
40
45
|
|
46
|
+
|
47
|
+
|
41
48
|
invalid_attribute: true
|
42
49
|
)}.to raise_error(ArgumentError)
|
43
50
|
end
|
44
51
|
it 'fails to initialize with invalid attribute' do
|
45
52
|
expect { instance = Freeclimb::PerclCommand.new(
|
53
|
+
|
46
54
|
command: "TS",
|
47
55
|
|
56
|
+
|
57
|
+
|
48
58
|
invalid_attribute: true
|
49
59
|
)}.to raise_error(ArgumentError)
|
50
60
|
end
|
@@ -53,8 +63,11 @@ describe Freeclimb::PerclCommand do
|
|
53
63
|
describe 'test method "valid"' do
|
54
64
|
it 'checks if properties are valid' do
|
55
65
|
instance = Freeclimb::PerclCommand.new(
|
66
|
+
|
56
67
|
command: "TS",
|
57
68
|
|
69
|
+
|
70
|
+
|
58
71
|
)
|
59
72
|
expect(instance.valid?).to eq(true)
|
60
73
|
end
|
@@ -71,26 +84,38 @@ describe Freeclimb::PerclCommand do
|
|
71
84
|
|
72
85
|
describe 'test method "eql?"' do
|
73
86
|
it 'checks if objects are equal' do
|
74
|
-
|
87
|
+
|
75
88
|
instance_1 = Freeclimb::PerclCommand.new(
|
89
|
+
|
76
90
|
command: "TS",
|
77
91
|
|
92
|
+
|
93
|
+
|
78
94
|
)
|
79
95
|
instance_2 = Freeclimb::PerclCommand.new(
|
96
|
+
|
80
97
|
command: "TS",
|
81
98
|
|
99
|
+
|
100
|
+
|
82
101
|
)
|
83
102
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
84
103
|
end
|
85
104
|
|
86
105
|
it 'checks if objects are not equal' do
|
87
106
|
instance_1 = Freeclimb::PerclCommand.new(
|
107
|
+
|
88
108
|
command: "TS",
|
89
109
|
|
110
|
+
|
111
|
+
|
90
112
|
)
|
91
113
|
instance_2 = Freeclimb::PerclCommand.new(
|
114
|
+
|
92
115
|
command: "ST",
|
93
116
|
|
117
|
+
|
118
|
+
|
94
119
|
)
|
95
120
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
96
121
|
end
|
@@ -99,8 +124,11 @@ describe Freeclimb::PerclCommand do
|
|
99
124
|
describe 'test method "hash"' do
|
100
125
|
it 'calculates hash code' do
|
101
126
|
instance = Freeclimb::PerclCommand.new(
|
127
|
+
|
102
128
|
command: "TS",
|
103
129
|
|
130
|
+
|
131
|
+
|
104
132
|
)
|
105
133
|
expect(instance.hash).to be_a_kind_of(Integer)
|
106
134
|
end
|
@@ -109,12 +137,18 @@ describe Freeclimb::PerclCommand do
|
|
109
137
|
describe 'test method "build_from_hash"' do
|
110
138
|
it 'builds equivalent model from hash code' do
|
111
139
|
instance_1 = Freeclimb::PerclCommand.new(
|
140
|
+
|
112
141
|
command: "TS",
|
113
142
|
|
143
|
+
|
144
|
+
|
114
145
|
)
|
115
146
|
instance_2 = Freeclimb::PerclCommand.new(
|
147
|
+
|
116
148
|
command: "TS",
|
117
149
|
|
150
|
+
|
151
|
+
|
118
152
|
)
|
119
153
|
|
120
154
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -123,19 +157,27 @@ describe Freeclimb::PerclCommand do
|
|
123
157
|
|
124
158
|
describe 'test method "_deserialize"' do
|
125
159
|
instance = Freeclimb::PerclCommand.new(
|
160
|
+
|
126
161
|
command: "TS",
|
127
162
|
|
163
|
+
|
164
|
+
|
128
165
|
)
|
129
166
|
it 'deserializes the data of command' do
|
130
167
|
expect(instance._deserialize("String", instance.command)).to be_a_kind_of(String)
|
131
168
|
end
|
169
|
+
|
170
|
+
|
132
171
|
end
|
133
172
|
|
134
173
|
describe 'test method "to_s"' do
|
135
174
|
it 'returns the string representation of the object' do
|
136
175
|
instance = Freeclimb::PerclCommand.new(
|
176
|
+
|
137
177
|
command: "TS",
|
138
178
|
|
179
|
+
|
180
|
+
|
139
181
|
)
|
140
182
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
141
183
|
end
|
@@ -144,20 +186,29 @@ describe Freeclimb::PerclCommand do
|
|
144
186
|
describe 'test method "to_hash"' do
|
145
187
|
it 'returns the object in the form of hash' do
|
146
188
|
instance = Freeclimb::PerclCommand.new(
|
189
|
+
|
147
190
|
command: "TS",
|
148
191
|
|
192
|
+
|
193
|
+
|
149
194
|
)
|
150
195
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
151
196
|
end
|
152
197
|
it 'creates equal hash for two equal objects' do
|
153
|
-
|
198
|
+
|
154
199
|
instance_1 = Freeclimb::PerclCommand.new(
|
200
|
+
|
155
201
|
command: "TS",
|
156
202
|
|
203
|
+
|
204
|
+
|
157
205
|
)
|
158
206
|
instance_2 = Freeclimb::PerclCommand.new(
|
207
|
+
|
159
208
|
command: "TS",
|
160
209
|
|
210
|
+
|
211
|
+
|
161
212
|
)
|
162
213
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
163
214
|
end
|
@@ -165,6 +216,7 @@ describe Freeclimb::PerclCommand do
|
|
165
216
|
|
166
217
|
describe 'test method "_to_hash"' do
|
167
218
|
instance = Freeclimb::PerclCommand.new(
|
219
|
+
|
168
220
|
command: "TS",
|
169
221
|
|
170
222
|
)
|
@@ -13,6 +13,7 @@ OpenAPI Generator version: 7.9.0
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
|
+
include Freeclimb
|
16
17
|
|
17
18
|
# Unit tests for Freeclimb::PerclScript
|
18
19
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -31,6 +32,8 @@ describe Freeclimb::PerclScript do
|
|
31
32
|
|
32
33
|
instance.commands = ["ELEMENT_1", "ELEMENT_2"]
|
33
34
|
expect(instance.commands).to eq(["ELEMENT_1", "ELEMENT_2"])
|
35
|
+
|
36
|
+
|
34
37
|
end
|
35
38
|
end
|
36
39
|
|
@@ -39,12 +42,16 @@ describe Freeclimb::PerclScript do
|
|
39
42
|
expect { instance = Freeclimb::PerclScript.new(
|
40
43
|
commands: Array.new(),
|
41
44
|
|
45
|
+
|
46
|
+
|
42
47
|
)}.not_to raise_error()
|
43
48
|
end
|
44
49
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::PerclScript' do
|
45
50
|
expect { instance = Freeclimb::PerclScript.new(
|
46
51
|
commands: Array.new(),
|
47
52
|
|
53
|
+
|
54
|
+
|
48
55
|
invalid_attribute: true
|
49
56
|
)}.to raise_error(ArgumentError)
|
50
57
|
end
|
@@ -52,6 +59,8 @@ describe Freeclimb::PerclScript do
|
|
52
59
|
expect { instance = Freeclimb::PerclScript.new(
|
53
60
|
commands: Array.new(),
|
54
61
|
|
62
|
+
|
63
|
+
|
55
64
|
invalid_attribute: true
|
56
65
|
)}.to raise_error(ArgumentError)
|
57
66
|
end
|
@@ -62,6 +71,8 @@ describe Freeclimb::PerclScript do
|
|
62
71
|
instance = Freeclimb::PerclScript.new(
|
63
72
|
commands: Array.new(),
|
64
73
|
|
74
|
+
|
75
|
+
|
65
76
|
)
|
66
77
|
expect(instance.valid?).to eq(true)
|
67
78
|
end
|
@@ -78,12 +89,16 @@ describe Freeclimb::PerclScript do
|
|
78
89
|
|
79
90
|
describe 'test method "eql?"' do
|
80
91
|
it 'checks if objects are equal' do
|
81
|
-
|
92
|
+
|
82
93
|
instance_1 = Freeclimb::PerclScript.new(
|
94
|
+
|
95
|
+
|
83
96
|
commands: [],
|
84
97
|
|
85
98
|
)
|
86
99
|
instance_2 = Freeclimb::PerclScript.new(
|
100
|
+
|
101
|
+
|
87
102
|
commands: [],
|
88
103
|
|
89
104
|
)
|
@@ -92,10 +107,14 @@ describe Freeclimb::PerclScript do
|
|
92
107
|
|
93
108
|
it 'checks if objects are not equal' do
|
94
109
|
instance_1 = Freeclimb::PerclScript.new(
|
110
|
+
|
111
|
+
|
95
112
|
commands: [],
|
96
113
|
|
97
114
|
)
|
98
115
|
instance_2 = Freeclimb::PerclScript.new(
|
116
|
+
|
117
|
+
|
99
118
|
commands: nil,
|
100
119
|
|
101
120
|
)
|
@@ -108,6 +127,8 @@ describe Freeclimb::PerclScript do
|
|
108
127
|
instance = Freeclimb::PerclScript.new(
|
109
128
|
commands: Array.new(),
|
110
129
|
|
130
|
+
|
131
|
+
|
111
132
|
)
|
112
133
|
expect(instance.hash).to be_a_kind_of(Integer)
|
113
134
|
end
|
@@ -118,10 +139,14 @@ describe Freeclimb::PerclScript do
|
|
118
139
|
instance_1 = Freeclimb::PerclScript.new(
|
119
140
|
commands: Array.new(),
|
120
141
|
|
142
|
+
|
143
|
+
|
121
144
|
)
|
122
145
|
instance_2 = Freeclimb::PerclScript.new(
|
123
146
|
commands: Array.new(),
|
124
147
|
|
148
|
+
|
149
|
+
|
125
150
|
)
|
126
151
|
|
127
152
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -132,10 +157,14 @@ describe Freeclimb::PerclScript do
|
|
132
157
|
instance = Freeclimb::PerclScript.new(
|
133
158
|
commands: Array.new(),
|
134
159
|
|
160
|
+
|
161
|
+
|
135
162
|
)
|
136
163
|
it 'deserializes the data of commands' do
|
137
164
|
expect(instance._deserialize("Array<PerclCommand>", instance.commands)).to be_a_kind_of(Array)
|
138
165
|
end
|
166
|
+
|
167
|
+
|
139
168
|
end
|
140
169
|
|
141
170
|
describe 'test method "to_s"' do
|
@@ -143,6 +172,8 @@ describe Freeclimb::PerclScript do
|
|
143
172
|
instance = Freeclimb::PerclScript.new(
|
144
173
|
commands: Array.new(),
|
145
174
|
|
175
|
+
|
176
|
+
|
146
177
|
)
|
147
178
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
148
179
|
end
|
@@ -153,18 +184,24 @@ describe Freeclimb::PerclScript do
|
|
153
184
|
instance = Freeclimb::PerclScript.new(
|
154
185
|
commands: Array.new(),
|
155
186
|
|
187
|
+
|
188
|
+
|
156
189
|
)
|
157
190
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
158
191
|
end
|
159
192
|
it 'creates equal hash for two equal objects' do
|
160
|
-
|
193
|
+
|
161
194
|
instance_1 = Freeclimb::PerclScript.new(
|
162
195
|
commands: Array.new(),
|
163
196
|
|
197
|
+
|
198
|
+
|
164
199
|
)
|
165
200
|
instance_2 = Freeclimb::PerclScript.new(
|
166
201
|
commands: Array.new(),
|
167
202
|
|
203
|
+
|
204
|
+
|
168
205
|
)
|
169
206
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
170
207
|
end
|
@@ -13,6 +13,7 @@ OpenAPI Generator version: 7.9.0
|
|
13
13
|
require 'spec_helper'
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
|
+
include Freeclimb
|
16
17
|
|
17
18
|
# Unit tests for Freeclimb::PlayEarlyMedia
|
18
19
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
@@ -28,30 +29,42 @@ describe Freeclimb::PlayEarlyMedia do
|
|
28
29
|
|
29
30
|
describe 'test attribute "file"' do
|
30
31
|
it 'should work' do
|
32
|
+
|
31
33
|
instance.file = "TEST_STRING"
|
32
34
|
expect(instance.file).to eq("TEST_STRING")
|
33
35
|
|
36
|
+
|
37
|
+
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
37
41
|
describe 'test method "initialize"' do
|
38
42
|
it 'properly initializes with values' do
|
39
43
|
expect { instance = Freeclimb::PlayEarlyMedia.new(
|
44
|
+
|
40
45
|
file: "TS",
|
41
46
|
|
47
|
+
|
48
|
+
|
42
49
|
)}.not_to raise_error()
|
43
50
|
end
|
44
51
|
it 'fails to initialize with input argument that is not a hash in Freeclimb::PlayEarlyMedia' do
|
45
52
|
expect { instance = Freeclimb::PlayEarlyMedia.new(
|
53
|
+
|
46
54
|
file: "TS",
|
47
55
|
|
56
|
+
|
57
|
+
|
48
58
|
invalid_attribute: true
|
49
59
|
)}.to raise_error(ArgumentError)
|
50
60
|
end
|
51
61
|
it 'fails to initialize with invalid attribute' do
|
52
62
|
expect { instance = Freeclimb::PlayEarlyMedia.new(
|
63
|
+
|
53
64
|
file: "TS",
|
54
65
|
|
66
|
+
|
67
|
+
|
55
68
|
invalid_attribute: true
|
56
69
|
)}.to raise_error(ArgumentError)
|
57
70
|
end
|
@@ -60,8 +73,11 @@ describe Freeclimb::PlayEarlyMedia do
|
|
60
73
|
describe 'test method "valid"' do
|
61
74
|
it 'checks if properties are valid' do
|
62
75
|
instance = Freeclimb::PlayEarlyMedia.new(
|
76
|
+
|
63
77
|
file: "TS",
|
64
78
|
|
79
|
+
|
80
|
+
|
65
81
|
)
|
66
82
|
expect(instance.valid?).to eq(true)
|
67
83
|
end
|
@@ -78,26 +94,38 @@ describe Freeclimb::PlayEarlyMedia do
|
|
78
94
|
|
79
95
|
describe 'test method "eql?"' do
|
80
96
|
it 'checks if objects are equal' do
|
81
|
-
|
97
|
+
|
82
98
|
instance_1 = Freeclimb::PlayEarlyMedia.new(
|
99
|
+
|
83
100
|
file: "TS",
|
84
101
|
|
102
|
+
|
103
|
+
|
85
104
|
)
|
86
105
|
instance_2 = Freeclimb::PlayEarlyMedia.new(
|
106
|
+
|
87
107
|
file: "TS",
|
88
108
|
|
109
|
+
|
110
|
+
|
89
111
|
)
|
90
112
|
expect(instance_1.eql?(instance_2)).to eq(true)
|
91
113
|
end
|
92
114
|
|
93
115
|
it 'checks if objects are not equal' do
|
94
116
|
instance_1 = Freeclimb::PlayEarlyMedia.new(
|
117
|
+
|
95
118
|
file: "TS",
|
96
119
|
|
120
|
+
|
121
|
+
|
97
122
|
)
|
98
123
|
instance_2 = Freeclimb::PlayEarlyMedia.new(
|
124
|
+
|
99
125
|
file: "ST",
|
100
126
|
|
127
|
+
|
128
|
+
|
101
129
|
)
|
102
130
|
expect(instance_1.eql?(instance_2)).to eq(false)
|
103
131
|
end
|
@@ -106,8 +134,11 @@ describe Freeclimb::PlayEarlyMedia do
|
|
106
134
|
describe 'test method "hash"' do
|
107
135
|
it 'calculates hash code' do
|
108
136
|
instance = Freeclimb::PlayEarlyMedia.new(
|
137
|
+
|
109
138
|
file: "TS",
|
110
139
|
|
140
|
+
|
141
|
+
|
111
142
|
)
|
112
143
|
expect(instance.hash).to be_a_kind_of(Integer)
|
113
144
|
end
|
@@ -116,12 +147,18 @@ describe Freeclimb::PlayEarlyMedia do
|
|
116
147
|
describe 'test method "build_from_hash"' do
|
117
148
|
it 'builds equivalent model from hash code' do
|
118
149
|
instance_1 = Freeclimb::PlayEarlyMedia.new(
|
150
|
+
|
119
151
|
file: "TS",
|
120
152
|
|
153
|
+
|
154
|
+
|
121
155
|
)
|
122
156
|
instance_2 = Freeclimb::PlayEarlyMedia.new(
|
157
|
+
|
123
158
|
file: "TS",
|
124
159
|
|
160
|
+
|
161
|
+
|
125
162
|
)
|
126
163
|
|
127
164
|
expect(instance_2.build_from_hash(instance_1.hash)).to eq(instance_1.build_from_hash(instance_1.hash))
|
@@ -130,19 +167,27 @@ describe Freeclimb::PlayEarlyMedia do
|
|
130
167
|
|
131
168
|
describe 'test method "_deserialize"' do
|
132
169
|
instance = Freeclimb::PlayEarlyMedia.new(
|
170
|
+
|
133
171
|
file: "TS",
|
134
172
|
|
173
|
+
|
174
|
+
|
135
175
|
)
|
136
176
|
it 'deserializes the data of file' do
|
137
177
|
expect(instance._deserialize("String", instance.file)).to be_a_kind_of(String)
|
138
178
|
end
|
179
|
+
|
180
|
+
|
139
181
|
end
|
140
182
|
|
141
183
|
describe 'test method "to_s"' do
|
142
184
|
it 'returns the string representation of the object' do
|
143
185
|
instance = Freeclimb::PlayEarlyMedia.new(
|
186
|
+
|
144
187
|
file: "TS",
|
145
188
|
|
189
|
+
|
190
|
+
|
146
191
|
)
|
147
192
|
expect(instance.to_s).to eq(instance.to_hash.to_s)
|
148
193
|
end
|
@@ -151,20 +196,29 @@ describe Freeclimb::PlayEarlyMedia do
|
|
151
196
|
describe 'test method "to_hash"' do
|
152
197
|
it 'returns the object in the form of hash' do
|
153
198
|
instance = Freeclimb::PlayEarlyMedia.new(
|
199
|
+
|
154
200
|
file: "TS",
|
155
201
|
|
202
|
+
|
203
|
+
|
156
204
|
)
|
157
205
|
expect(instance.to_hash).to be_a_kind_of(Hash)
|
158
206
|
end
|
159
207
|
it 'creates equal hash for two equal objects' do
|
160
|
-
|
208
|
+
|
161
209
|
instance_1 = Freeclimb::PlayEarlyMedia.new(
|
210
|
+
|
162
211
|
file: "TS",
|
163
212
|
|
213
|
+
|
214
|
+
|
164
215
|
)
|
165
216
|
instance_2 = Freeclimb::PlayEarlyMedia.new(
|
217
|
+
|
166
218
|
file: "TS",
|
167
219
|
|
220
|
+
|
221
|
+
|
168
222
|
)
|
169
223
|
expect(instance_1.to_hash).to eq(instance_2.to_hash)
|
170
224
|
end
|
@@ -172,6 +226,7 @@ describe Freeclimb::PlayEarlyMedia do
|
|
172
226
|
|
173
227
|
describe 'test method "_to_hash"' do
|
174
228
|
instance = Freeclimb::PlayEarlyMedia.new(
|
229
|
+
|
175
230
|
file: "TS",
|
176
231
|
|
177
232
|
)
|