twilio-ruby 5.12.0 → 5.12.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,117 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # \ / _ _ _| _ _
4
- # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- # / /
6
- #
7
- # frozen_string_literal: true
8
-
9
- require 'spec_helper.rb'
10
-
11
- describe 'Flow' do
12
- it "can read" do
13
- @holodeck.mock(Twilio::Response.new(500, ''))
14
-
15
- expect {
16
- @client.preview.studio.flows.list()
17
- }.to raise_exception(Twilio::REST::TwilioError)
18
-
19
- values = {}
20
- expect(
21
- @holodeck.has_request?(Holodeck::Request.new(
22
- method: 'get',
23
- url: 'https://preview.twilio.com/Studio/Flows',
24
- ))).to eq(true)
25
- end
26
-
27
- it "receives read_empty responses" do
28
- @holodeck.mock(Twilio::Response.new(
29
- 200,
30
- %q[
31
- {
32
- "meta": {
33
- "previous_page_url": null,
34
- "next_page_url": null,
35
- "url": "https://preview.twilio.com/Studio/Flows?PageSize=50&Page=0",
36
- "page": 0,
37
- "first_page_url": "https://preview.twilio.com/Studio/Flows?PageSize=50&Page=0",
38
- "page_size": 50,
39
- "key": "flows"
40
- },
41
- "flows": []
42
- }
43
- ]
44
- ))
45
-
46
- actual = @client.preview.studio.flows.list()
47
-
48
- expect(actual).to_not eq(nil)
49
- end
50
-
51
- it "can fetch" do
52
- @holodeck.mock(Twilio::Response.new(500, ''))
53
-
54
- expect {
55
- @client.preview.studio.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
56
- }.to raise_exception(Twilio::REST::TwilioError)
57
-
58
- values = {}
59
- expect(
60
- @holodeck.has_request?(Holodeck::Request.new(
61
- method: 'get',
62
- url: 'https://preview.twilio.com/Studio/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
63
- ))).to eq(true)
64
- end
65
-
66
- it "receives fetch responses" do
67
- @holodeck.mock(Twilio::Response.new(
68
- 200,
69
- %q[
70
- {
71
- "sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
72
- "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73
- "friendly_name": "Test Flow",
74
- "status": "published",
75
- "debug": false,
76
- "version": 1,
77
- "date_created": "2017-11-06T12:00:00Z",
78
- "date_updated": null,
79
- "url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
80
- "links": {
81
- "engagements": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements"
82
- }
83
- }
84
- ]
85
- ))
86
-
87
- actual = @client.preview.studio.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
88
-
89
- expect(actual).to_not eq(nil)
90
- end
91
-
92
- it "can delete" do
93
- @holodeck.mock(Twilio::Response.new(500, ''))
94
-
95
- expect {
96
- @client.preview.studio.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
97
- }.to raise_exception(Twilio::REST::TwilioError)
98
-
99
- values = {}
100
- expect(
101
- @holodeck.has_request?(Holodeck::Request.new(
102
- method: 'delete',
103
- url: 'https://preview.twilio.com/Studio/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
104
- ))).to eq(true)
105
- end
106
-
107
- it "receives delete responses" do
108
- @holodeck.mock(Twilio::Response.new(
109
- 204,
110
- nil,
111
- ))
112
-
113
- actual = @client.preview.studio.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
114
-
115
- expect(actual).to eq(true)
116
- end
117
- end