twilio-ruby 5.2.0 → 5.2.1

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.
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.2.0'
2
+ VERSION = '5.2.1'
3
3
  end
@@ -0,0 +1,47 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ require 'spec_helper.rb'
8
+
9
+ describe 'StreamMessage' do
10
+ it "can create" do
11
+ @holodeck.mock(Twilio::Response.new(500, ''))
12
+
13
+ expect {
14
+ @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
15
+ .sync_streams("TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
16
+ .stream_messages.create(data: "{}")
17
+ }.to raise_exception(Twilio::REST::TwilioError)
18
+
19
+ values = {
20
+ 'Data' => Twilio.serialize_object("{}"),
21
+ }
22
+ expect(
23
+ @holodeck.has_request?(Holodeck::Request.new(
24
+ method: 'post',
25
+ url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages',
26
+ data: values,
27
+ ))).to eq(true)
28
+ end
29
+
30
+ it "receives create responses" do
31
+ @holodeck.mock(Twilio::Response.new(
32
+ 201,
33
+ %q[
34
+ {
35
+ "sid": "TZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
+ "data": {}
37
+ }
38
+ ]
39
+ ))
40
+
41
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
42
+ .sync_streams("TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
43
+ .stream_messages.create(data: "{}")
44
+
45
+ expect(actual).to_not eq(nil)
46
+ end
47
+ end
@@ -0,0 +1,201 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ require 'spec_helper.rb'
8
+
9
+ describe 'SyncStream' do
10
+ it "can fetch" do
11
+ @holodeck.mock(Twilio::Response.new(500, ''))
12
+
13
+ expect {
14
+ @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
15
+ .sync_streams("TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
16
+ }.to raise_exception(Twilio::REST::TwilioError)
17
+
18
+ values = {}
19
+ expect(
20
+ @holodeck.has_request?(Holodeck::Request.new(
21
+ method: 'get',
22
+ url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
23
+ ))).to eq(true)
24
+ end
25
+
26
+ it "receives fetch responses" do
27
+ @holodeck.mock(Twilio::Response.new(
28
+ 200,
29
+ %q[
30
+ {
31
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
32
+ "created_by": "created_by",
33
+ "date_created": "2015-07-30T20:00:00Z",
34
+ "date_updated": "2015-07-30T20:00:00Z",
35
+ "links": {
36
+ "messages": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages"
37
+ },
38
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39
+ "sid": "TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40
+ "unique_name": "unique_name",
41
+ "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
42
+ }
43
+ ]
44
+ ))
45
+
46
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
47
+ .sync_streams("TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
48
+
49
+ expect(actual).to_not eq(nil)
50
+ end
51
+
52
+ it "can delete" do
53
+ @holodeck.mock(Twilio::Response.new(500, ''))
54
+
55
+ expect {
56
+ @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
57
+ .sync_streams("TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
58
+ }.to raise_exception(Twilio::REST::TwilioError)
59
+
60
+ values = {}
61
+ expect(
62
+ @holodeck.has_request?(Holodeck::Request.new(
63
+ method: 'delete',
64
+ url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
65
+ ))).to eq(true)
66
+ end
67
+
68
+ it "receives delete responses" do
69
+ @holodeck.mock(Twilio::Response.new(
70
+ 204,
71
+ nil,
72
+ ))
73
+
74
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
75
+ .sync_streams("TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
76
+
77
+ expect(actual).to eq(true)
78
+ end
79
+
80
+ it "can create" do
81
+ @holodeck.mock(Twilio::Response.new(500, ''))
82
+
83
+ expect {
84
+ @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
85
+ .sync_streams.create()
86
+ }.to raise_exception(Twilio::REST::TwilioError)
87
+
88
+ values = {}
89
+ expect(
90
+ @holodeck.has_request?(Holodeck::Request.new(
91
+ method: 'post',
92
+ url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams',
93
+ ))).to eq(true)
94
+ end
95
+
96
+ it "receives create responses" do
97
+ @holodeck.mock(Twilio::Response.new(
98
+ 201,
99
+ %q[
100
+ {
101
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
102
+ "created_by": "created_by",
103
+ "date_created": "2015-07-30T20:00:00Z",
104
+ "date_updated": "2015-07-30T20:00:00Z",
105
+ "links": {
106
+ "messages": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages"
107
+ },
108
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
109
+ "sid": "TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
110
+ "unique_name": "unique_name",
111
+ "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
112
+ }
113
+ ]
114
+ ))
115
+
116
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
117
+ .sync_streams.create()
118
+
119
+ expect(actual).to_not eq(nil)
120
+ end
121
+
122
+ it "can read" do
123
+ @holodeck.mock(Twilio::Response.new(500, ''))
124
+
125
+ expect {
126
+ @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
127
+ .sync_streams.list()
128
+ }.to raise_exception(Twilio::REST::TwilioError)
129
+
130
+ values = {}
131
+ expect(
132
+ @holodeck.has_request?(Holodeck::Request.new(
133
+ method: 'get',
134
+ url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams',
135
+ ))).to eq(true)
136
+ end
137
+
138
+ it "receives read_empty responses" do
139
+ @holodeck.mock(Twilio::Response.new(
140
+ 200,
141
+ %q[
142
+ {
143
+ "streams": [],
144
+ "meta": {
145
+ "first_page_url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams?PageSize=50&Page=0",
146
+ "key": "streams",
147
+ "next_page_url": null,
148
+ "page": 0,
149
+ "page_size": 50,
150
+ "previous_page_url": null,
151
+ "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams?PageSize=50&Page=0"
152
+ }
153
+ }
154
+ ]
155
+ ))
156
+
157
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
158
+ .sync_streams.list()
159
+
160
+ expect(actual).to_not eq(nil)
161
+ end
162
+
163
+ it "receives read_full responses" do
164
+ @holodeck.mock(Twilio::Response.new(
165
+ 200,
166
+ %q[
167
+ {
168
+ "streams": [
169
+ {
170
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
171
+ "created_by": "created_by",
172
+ "date_created": "2015-07-30T20:00:00Z",
173
+ "date_updated": "2015-07-30T20:00:00Z",
174
+ "links": {
175
+ "messages": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages"
176
+ },
177
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
178
+ "sid": "TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
179
+ "unique_name": "unique_name",
180
+ "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
181
+ }
182
+ ],
183
+ "meta": {
184
+ "first_page_url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams?PageSize=50&Page=0",
185
+ "key": "streams",
186
+ "next_page_url": null,
187
+ "page": 0,
188
+ "page_size": 50,
189
+ "previous_page_url": null,
190
+ "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams?PageSize=50&Page=0"
191
+ }
192
+ }
193
+ ]
194
+ ))
195
+
196
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
197
+ .sync_streams.list()
198
+
199
+ expect(actual).to_not eq(nil)
200
+ end
201
+ end
@@ -34,7 +34,8 @@ describe 'Service' do
34
34
  "links": {
35
35
  "documents": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Documents",
36
36
  "lists": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists",
37
- "maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps"
37
+ "maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps",
38
+ "streams": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams"
38
39
  },
39
40
  "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40
41
  "unique_name": "unique_name",
@@ -104,7 +105,8 @@ describe 'Service' do
104
105
  "links": {
105
106
  "documents": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Documents",
106
107
  "lists": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists",
107
- "maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps"
108
+ "maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps",
109
+ "streams": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams"
108
110
  },
109
111
  "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
110
112
  "unique_name": "unique_name",
@@ -183,7 +185,8 @@ describe 'Service' do
183
185
  "links": {
184
186
  "documents": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Documents",
185
187
  "lists": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists",
186
- "maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps"
188
+ "maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps",
189
+ "streams": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams"
187
190
  },
188
191
  "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
189
192
  "unique_name": "unique_name",
@@ -229,7 +232,8 @@ describe 'Service' do
229
232
  "links": {
230
233
  "documents": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Documents",
231
234
  "lists": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists",
232
- "maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps"
235
+ "maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps",
236
+ "streams": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams"
233
237
  },
234
238
  "sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
235
239
  "unique_name": "unique_name",
@@ -0,0 +1,85 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ require 'spec_helper.rb'
8
+
9
+ describe 'DataSession' do
10
+ it "can read" do
11
+ @holodeck.mock(Twilio::Response.new(500, ''))
12
+
13
+ expect {
14
+ @client.wireless.v1.sims("DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
15
+ .data_sessions.list()
16
+ }.to raise_exception(Twilio::REST::TwilioError)
17
+
18
+ values = {}
19
+ expect(
20
+ @holodeck.has_request?(Holodeck::Request.new(
21
+ method: 'get',
22
+ url: 'https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions',
23
+ ))).to eq(true)
24
+ end
25
+
26
+ it "receives fetch responses" do
27
+ @holodeck.mock(Twilio::Response.new(
28
+ 200,
29
+ %q[
30
+ {
31
+ "data_sessions": [
32
+ {
33
+ "sid": "WNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34
+ "sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
+ "radio_link": "LTE",
37
+ "operator_mcc": 0,
38
+ "operator_mnc": 0,
39
+ "operator_country": "",
40
+ "operator_name": "",
41
+ "cell_id": "",
42
+ "cell_location_estimate": {},
43
+ "packets_uploaded": 0,
44
+ "packets_downloaded": 0,
45
+ "last_updated": "2015-07-30T20:00:00Z",
46
+ "start": "2015-07-30T20:00:00Z",
47
+ "end": null
48
+ },
49
+ {
50
+ "sid": "WNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
51
+ "sim_sid": "DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
52
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
53
+ "radio_link": "3G",
54
+ "operator_mcc": 0,
55
+ "operator_mnc": 0,
56
+ "operator_country": "",
57
+ "operator_name": "",
58
+ "cell_id": "",
59
+ "cell_location_estimate": {},
60
+ "packets_uploaded": 0,
61
+ "packets_downloaded": 0,
62
+ "last_updated": "2015-07-30T20:00:00Z",
63
+ "start": "2015-07-30T20:00:00Z",
64
+ "end": "2015-07-30T20:00:00Z"
65
+ }
66
+ ],
67
+ "meta": {
68
+ "first_page_url": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions?PageSize=50&Page=0",
69
+ "key": "data_sessions",
70
+ "next_page_url": null,
71
+ "page": 0,
72
+ "page_size": 50,
73
+ "previous_page_url": null,
74
+ "url": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions?PageSize=50&Page=0"
75
+ }
76
+ }
77
+ ]
78
+ ))
79
+
80
+ actual = @client.wireless.v1.sims("DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
81
+ .data_sessions.list()
82
+
83
+ expect(actual).to_not eq(nil)
84
+ end
85
+ end
@@ -43,6 +43,7 @@ describe 'Sim' do
43
43
  "voice_method": "http_method",
44
44
  "voice_url": "http://www.example.com",
45
45
  "links": {
46
+ "data_sessions": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions",
46
47
  "rate_plan": "https://wireless.twilio.com/v1/RatePlans/WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
47
48
  "usage_records": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/UsageRecords"
48
49
  },
@@ -115,6 +116,7 @@ describe 'Sim' do
115
116
  "date_updated": "2015-07-30T20:00:00Z",
116
117
  "friendly_name": "friendly_name",
117
118
  "links": {
119
+ "data_sessions": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions",
118
120
  "rate_plan": "https://wireless.twilio.com/v1/RatePlans/WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
119
121
  "usage_records": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/UsageRecords"
120
122
  },
@@ -180,6 +182,7 @@ describe 'Sim' do
180
182
  "date_updated": "2015-07-30T20:00:00Z",
181
183
  "friendly_name": "friendly_name",
182
184
  "links": {
185
+ "data_sessions": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/DataSessions",
183
186
  "rate_plan": "https://wireless.twilio.com/v1/RatePlans/WPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
184
187
  "usage_records": "https://wireless.twilio.com/v1/Sims/DEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/UsageRecords"
185
188
  },
@@ -14,21 +14,21 @@ describe Twilio::TwiML::MessagingResponse do
14
14
 
15
15
  it 'should allow populated response' do
16
16
  r = Twilio::TwiML::MessagingResponse.new
17
- r.message(body: 'Hello')
17
+ r.message(message: 'Hello')
18
18
  r.redirect('example.com')
19
19
 
20
20
  expect(r.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Message>Hello</Message><Redirect>example.com</Redirect></Response>')
21
21
  end
22
22
 
23
23
  it 'should allow chaining' do
24
- r = Twilio::TwiML::MessagingResponse.new.message(body: 'Hello').redirect('example.com')
24
+ r = Twilio::TwiML::MessagingResponse.new.message(message: 'Hello').redirect('example.com')
25
25
 
26
26
  expect(r.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Message>Hello</Message><Redirect>example.com</Redirect></Response>')
27
27
  end
28
28
 
29
29
  it 'should allow nesting' do
30
30
  r = Twilio::TwiML::MessagingResponse.new
31
- r.message(body: 'Hello') do |m|
31
+ r.message(message: 'Hello') do |m|
32
32
  m.media('foobar')
33
33
  end
34
34
 
@@ -37,7 +37,7 @@ describe Twilio::TwiML::MessagingResponse do
37
37
 
38
38
  it 'should allow nesting and chaining' do
39
39
  r = Twilio::TwiML::MessagingResponse.new
40
- r.message(body: 'Hello') do |m|
40
+ r.message(message: 'Hello') do |m|
41
41
  m.media('foobar')
42
42
  end
43
43
 
@@ -48,7 +48,7 @@ describe Twilio::TwiML::MessagingResponse do
48
48
 
49
49
  it 'should allow nesting from the initializer' do
50
50
  response = Twilio::TwiML::MessagingResponse.new do |r|
51
- r.message(body: 'Hello')
51
+ r.message(message: 'Hello')
52
52
  r.redirect('example.com')
53
53
  end
54
54
  expect(response.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Message>Hello</Message><Redirect>example.com</Redirect></Response>')
@@ -58,7 +58,7 @@ describe Twilio::TwiML::MessagingResponse do
58
58
  context 'Testing Message' do
59
59
  it 'should allow a body' do
60
60
  r = Twilio::TwiML::MessagingResponse.new
61
- r.message(body: 'Hello')
61
+ r.message(message: 'Hello')
62
62
 
63
63
  expect(r.to_s).to eq('<?xml version="1.0" encoding="UTF-8"?><Response><Message>Hello</Message></Response>')
64
64
  end