mogreet 0.0.1 → 0.0.2.pre
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.
- data/.gitignore +6 -6
- data/Gemfile +1 -2
- data/README.md +49 -28
- data/Rakefile +8 -3
- data/lib/mogreet.rb +12 -8
- data/lib/mogreet/client.rb +60 -0
- data/lib/mogreet/deprecated.rb +56 -0
- data/lib/mogreet/keyword.rb +27 -0
- data/lib/mogreet/list.rb +67 -0
- data/lib/mogreet/media.rb +19 -0
- data/lib/mogreet/request.rb +19 -0
- data/lib/mogreet/response.rb +7 -0
- data/lib/mogreet/system.rb +10 -0
- data/lib/mogreet/transaction.rb +30 -0
- data/lib/mogreet/user.rb +33 -1
- data/lib/mogreet/version.rb +2 -2
- data/mogreet.gemspec +20 -19
- data/spec/cassettes/deprecated_mms.yml +53 -0
- data/spec/cassettes/keyword_add.yml +56 -0
- data/spec/cassettes/keyword_check.yml +57 -0
- data/spec/cassettes/keyword_list.yml +121 -0
- data/spec/cassettes/keyword_remove.yml +56 -0
- data/spec/cassettes/list_append.yml +61 -0
- data/spec/cassettes/list_create.yml +57 -0
- data/spec/cassettes/list_destroy.yml +56 -0
- data/spec/cassettes/list_download.yml +59 -0
- data/spec/cassettes/list_empty.yml +56 -0
- data/spec/cassettes/list_info.yml +65 -0
- data/spec/cassettes/list_list.yml +63 -0
- data/spec/cassettes/list_prune.yml +61 -0
- data/spec/cassettes/list_send.yml +56 -0
- data/spec/cassettes/media_destroy.yml +61 -0
- data/spec/cassettes/media_list.yml +72 -0
- data/spec/cassettes/media_upload.yml +3602 -0
- data/spec/cassettes/ping_invalid.yml +51 -0
- data/spec/cassettes/ping_success.yml +147 -0
- data/spec/cassettes/transaction_lookup.yml +74 -0
- data/spec/cassettes/transaction_send.yml +101 -0
- data/spec/cassettes/user_info_success.yml +56 -0
- data/spec/cassettes/user_lookup_success.yml +104 -0
- data/spec/cassettes/user_transactions_success.yml +62 -0
- data/spec/cassettes/user_uncache_success.yml +56 -0
- data/spec/deprecated_spec.rb +37 -0
- data/spec/fixtures/api.jpg +0 -0
- data/spec/keyword_spec.rb +84 -0
- data/spec/list_spec.rb +193 -0
- data/spec/media_spec.rb +67 -0
- data/spec/ping_spec.rb +43 -0
- data/spec/spec_helper.rb +26 -7
- data/spec/transaction_spec.rb +53 -0
- data/spec/user_spec.rb +66 -0
- metadata +93 -59
- data/.rspec +0 -1
- data/LICENSE +0 -22
- data/lib/mogreet/config.rb +0 -3
- data/lib/mogreet/message.rb +0 -8
- data/lib/mogreet/mogreet.rb +0 -13
- data/lib/mogreet/response/transaction_send.rb +0 -5
- data/spec/fixtures/transaction_send.xml +0 -6
- data/spec/mogreet/config_spec.rb +0 -17
- data/spec/mogreet/message_spec.rb +0 -32
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/moms/user.transactions?client_id=1010101&format=json&number=3108675309&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- text/xml
|
23
|
+
Connection:
|
24
|
+
- close
|
25
|
+
Server:
|
26
|
+
- mogreet moms api
|
27
|
+
- pserver
|
28
|
+
Host:
|
29
|
+
- pliny.mogreet.com:98
|
30
|
+
Content-Length:
|
31
|
+
- "1070"
|
32
|
+
Language:
|
33
|
+
- en
|
34
|
+
Type:
|
35
|
+
- text/xml
|
36
|
+
Status:
|
37
|
+
- OK
|
38
|
+
body:
|
39
|
+
encoding: US-ASCII
|
40
|
+
string: |
|
41
|
+
{
|
42
|
+
"response": {
|
43
|
+
"code": "1",
|
44
|
+
"status": "success",
|
45
|
+
"message": "user transactions",
|
46
|
+
"transactions": [
|
47
|
+
{
|
48
|
+
"campaign_id": "20861",
|
49
|
+
"campaign_name": "awesome response",
|
50
|
+
"datestamp": "2013-03-09 15:19:05",
|
51
|
+
"hash": "d450oav0",
|
52
|
+
"message_id": "181654693",
|
53
|
+
"from": "21534",
|
54
|
+
"to": "13108675309"
|
55
|
+
}
|
56
|
+
]
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
http_version:
|
61
|
+
recorded_at: Sat, 16 Mar 2013 20:16:19 GMT
|
62
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.mogreet.com/moms/user.info?client_id=1010101&format=json&number=3108675309&token=xyxyxyxyxyxyxyxyxyxyxyxyxyx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ""
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- "*/*; q=0.5, application/xml"
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Content-Type:
|
22
|
+
- text/xml
|
23
|
+
Connection:
|
24
|
+
- close
|
25
|
+
Server:
|
26
|
+
- mogreet moms api
|
27
|
+
- pserver
|
28
|
+
Host:
|
29
|
+
- pliny.mogreet.com:99
|
30
|
+
Content-Length:
|
31
|
+
- "239"
|
32
|
+
Language:
|
33
|
+
- en
|
34
|
+
Type:
|
35
|
+
- text/xml
|
36
|
+
Status:
|
37
|
+
- OK
|
38
|
+
body:
|
39
|
+
encoding: US-ASCII
|
40
|
+
string: |
|
41
|
+
{
|
42
|
+
"response": {
|
43
|
+
"code": "1",
|
44
|
+
"status": "success",
|
45
|
+
"message": "user info",
|
46
|
+
"number": "13108675309",
|
47
|
+
"carrier_id": "2",
|
48
|
+
"carrier_name": "T-Mobile",
|
49
|
+
"handset_id": "12025",
|
50
|
+
"handset_name": "Samsung Galaxy Nexus SCH-i515"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
http_version:
|
55
|
+
recorded_at: Sat, 16 Mar 2013 20:35:13 GMT
|
56
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require (File.expand_path('../spec_helper', __FILE__))
|
2
|
+
|
3
|
+
describe Mogreet::Config do
|
4
|
+
describe 'deprecated way of sending MMS' do
|
5
|
+
before do
|
6
|
+
VCR.insert_cassette 'deprecated_mms', :record => :new_episodes
|
7
|
+
|
8
|
+
Mogreet.configure do |config|
|
9
|
+
config.client_id = '1010101'
|
10
|
+
config.token = 'xyxyxyxyxyxyxyxyxyxyxyxyxyx'
|
11
|
+
config.campaign_id = ENV['MOGREET_MMS_CAMPAIGN_ID']
|
12
|
+
end
|
13
|
+
|
14
|
+
@response = Mogreet::Message.send(
|
15
|
+
:to => '3108675309',
|
16
|
+
:message => 'Hello World!',
|
17
|
+
:content_url => 'http://rubyonrails.org/images/rails.png'
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
after do
|
22
|
+
VCR.eject_cassette
|
23
|
+
end
|
24
|
+
|
25
|
+
it "has all expected attributes" do
|
26
|
+
methods_are_defined(@response, %W(status message message_id))
|
27
|
+
end
|
28
|
+
|
29
|
+
it "must have success code value" do
|
30
|
+
@response.code.must_equal '1'
|
31
|
+
end
|
32
|
+
|
33
|
+
it "must have correct transaction_hash value" do
|
34
|
+
@response.transaction_hash.must_equal 'd4coz040'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
Binary file
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require (File.expand_path('../spec_helper', __FILE__))
|
2
|
+
|
3
|
+
describe Mogreet::Keyword do
|
4
|
+
describe 'keyword.list' do
|
5
|
+
before do
|
6
|
+
VCR.insert_cassette 'keyword_list', :record => :new_episodes
|
7
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
8
|
+
@response = client.keyword.list
|
9
|
+
end
|
10
|
+
|
11
|
+
after do
|
12
|
+
VCR.eject_cassette
|
13
|
+
end
|
14
|
+
|
15
|
+
it "has all expected attributes" do
|
16
|
+
methods_are_defined(@response, %W(status message))
|
17
|
+
methods_are_defined(@response, %W(keywords))
|
18
|
+
end
|
19
|
+
|
20
|
+
it "must have success code value" do
|
21
|
+
@response.code.must_equal '1'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe 'keyword.check' do
|
26
|
+
before do
|
27
|
+
VCR.insert_cassette 'keyword_check', :record => :new_episodes
|
28
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
29
|
+
@response = client.keyword.check(:keyword => 'reallylongkeyword12345', :shortcode => '343434')
|
30
|
+
end
|
31
|
+
|
32
|
+
after do
|
33
|
+
VCR.eject_cassette
|
34
|
+
end
|
35
|
+
|
36
|
+
it "has all expected attributes" do
|
37
|
+
methods_are_defined(@response, %W(status message available))
|
38
|
+
end
|
39
|
+
|
40
|
+
it "must have success code value" do
|
41
|
+
@response.code.must_equal '1'
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe 'keyword.add' do
|
46
|
+
before do
|
47
|
+
VCR.insert_cassette 'keyword_add', :record => :new_episodes
|
48
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
49
|
+
@response = client.keyword.add(:keyword => 'reallylongkeyword12345', :shortcode => '343434', :campaign_id => ENV['MOGREET_SMS_CAMPAIGN_ID'])
|
50
|
+
end
|
51
|
+
|
52
|
+
after do
|
53
|
+
VCR.eject_cassette
|
54
|
+
end
|
55
|
+
|
56
|
+
it "has all expected attributes" do
|
57
|
+
methods_are_defined(@response, %W(status message))
|
58
|
+
end
|
59
|
+
|
60
|
+
it "must have success code value" do
|
61
|
+
@response.code.must_equal '1'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'keyword.remove' do
|
66
|
+
before do
|
67
|
+
VCR.insert_cassette 'keyword_remove', :record => :new_episodes
|
68
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
69
|
+
@response = client.keyword.remove(:keyword => 'reallylongkeyword12345', :shortcode => '343434', :campaign_id => ENV['MOGREET_SMS_CAMPAIGN_ID'])
|
70
|
+
end
|
71
|
+
|
72
|
+
after do
|
73
|
+
VCR.eject_cassette
|
74
|
+
end
|
75
|
+
|
76
|
+
it "has all expected attributes" do
|
77
|
+
methods_are_defined(@response, %W(status message))
|
78
|
+
end
|
79
|
+
|
80
|
+
it "must have success code value" do
|
81
|
+
@response.code.must_equal '1'
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
data/spec/list_spec.rb
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
require (File.expand_path('../spec_helper', __FILE__))
|
2
|
+
|
3
|
+
describe Mogreet::List do
|
4
|
+
describe 'list.list' do
|
5
|
+
before do
|
6
|
+
VCR.insert_cassette 'list_list', :record => :new_episodes
|
7
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
8
|
+
@response = client.list.list
|
9
|
+
end
|
10
|
+
|
11
|
+
after do
|
12
|
+
VCR.eject_cassette
|
13
|
+
end
|
14
|
+
|
15
|
+
it "has all expected attributes" do
|
16
|
+
methods_are_defined(@response, %W(status message))
|
17
|
+
methods_are_defined(@response, %W(lists))
|
18
|
+
methods_are_defined(@response.lists.first, %W(id name type))
|
19
|
+
end
|
20
|
+
|
21
|
+
it "must have success code value" do
|
22
|
+
@response.code.must_equal '1'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'list.info' do
|
27
|
+
before do
|
28
|
+
VCR.insert_cassette 'list_info', :record => :new_episodes
|
29
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
30
|
+
@response = client.list.info(:list_id => 8228)
|
31
|
+
end
|
32
|
+
|
33
|
+
after do
|
34
|
+
VCR.eject_cassette
|
35
|
+
end
|
36
|
+
|
37
|
+
it "has all expected attributes" do
|
38
|
+
methods_are_defined(@response, %W(status message))
|
39
|
+
methods_are_defined(@response.list, %W(id name type total last_used))
|
40
|
+
end
|
41
|
+
|
42
|
+
it "must have success code value" do
|
43
|
+
@response.code.must_equal '1'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'list.create' do
|
48
|
+
before do
|
49
|
+
VCR.insert_cassette 'list_create', :record => :new_episodes
|
50
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
51
|
+
@response = client.list.create(:name => 'test list')
|
52
|
+
end
|
53
|
+
|
54
|
+
after do
|
55
|
+
VCR.eject_cassette
|
56
|
+
end
|
57
|
+
|
58
|
+
it "has all expected attributes" do
|
59
|
+
methods_are_defined(@response, %W(status message))
|
60
|
+
end
|
61
|
+
|
62
|
+
it "must have success code value" do
|
63
|
+
@response.code.must_equal '1'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe 'list.append' do
|
68
|
+
before do
|
69
|
+
VCR.insert_cassette 'list_append', :record => :new_episodes
|
70
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
71
|
+
@response = client.list.append(:list_id => '8228', :numbers => '3108675309')
|
72
|
+
end
|
73
|
+
|
74
|
+
after do
|
75
|
+
VCR.eject_cassette
|
76
|
+
end
|
77
|
+
|
78
|
+
it "has all expected attributes" do
|
79
|
+
methods_are_defined(@response, %W(status message))
|
80
|
+
methods_are_defined(@response.statistics, %W(created duplicate rejected))
|
81
|
+
end
|
82
|
+
|
83
|
+
it "must have success code value" do
|
84
|
+
@response.code.must_equal '1'
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe 'list.prune' do
|
89
|
+
before do
|
90
|
+
VCR.insert_cassette 'list_prune', :record => :new_episodes
|
91
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
92
|
+
@response = client.list.prune(:list_id => '8228', :numbers => '3108675309')
|
93
|
+
end
|
94
|
+
|
95
|
+
after do
|
96
|
+
VCR.eject_cassette
|
97
|
+
end
|
98
|
+
|
99
|
+
it "has all expected attributes" do
|
100
|
+
methods_are_defined(@response, %W(status message))
|
101
|
+
methods_are_defined(@response.statistics, %W(deleted not_found rejected))
|
102
|
+
end
|
103
|
+
|
104
|
+
it "must have success code value" do
|
105
|
+
@response.code.must_equal '1'
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe 'list.send' do
|
110
|
+
before do
|
111
|
+
VCR.insert_cassette 'list_send', :record => :new_episodes
|
112
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
113
|
+
@response = client.list.send(
|
114
|
+
:campaign_id => ENV['MOGREET_SMS_CAMPAIGN_ID'],
|
115
|
+
:message => 'hello world',
|
116
|
+
:list_id => '8228'
|
117
|
+
)
|
118
|
+
end
|
119
|
+
|
120
|
+
after do
|
121
|
+
VCR.eject_cassette
|
122
|
+
end
|
123
|
+
|
124
|
+
it "has all expected attributes" do
|
125
|
+
methods_are_defined(@response, %W(status message))
|
126
|
+
end
|
127
|
+
|
128
|
+
it "must have success code value" do
|
129
|
+
@response.code.must_equal '1'
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
describe 'list.download' do
|
134
|
+
before do
|
135
|
+
VCR.insert_cassette 'list_download', :record => :new_episodes
|
136
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
137
|
+
@response = client.list.download(:list_id => '8228')
|
138
|
+
end
|
139
|
+
|
140
|
+
after do
|
141
|
+
VCR.eject_cassette
|
142
|
+
end
|
143
|
+
|
144
|
+
it "has all expected attributes" do
|
145
|
+
methods_are_defined(@response, %W(status message recipients))
|
146
|
+
end
|
147
|
+
|
148
|
+
it "must have success code value" do
|
149
|
+
@response.code.must_equal '1'
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
describe 'list.empty' do
|
154
|
+
before do
|
155
|
+
VCR.insert_cassette 'list_empty', :record => :new_episodes
|
156
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
157
|
+
@response = client.list.empty(:list_id => '8228', :name => 'test')
|
158
|
+
end
|
159
|
+
|
160
|
+
after do
|
161
|
+
VCR.eject_cassette
|
162
|
+
end
|
163
|
+
|
164
|
+
it "has all expected attributes" do
|
165
|
+
methods_are_defined(@response, %W(status message))
|
166
|
+
end
|
167
|
+
|
168
|
+
it "must have success code value" do
|
169
|
+
@response.code.must_equal '1'
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe 'list.destroy' do
|
174
|
+
before do
|
175
|
+
VCR.insert_cassette 'list_destroy', :record => :new_episodes
|
176
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
177
|
+
@response = client.list.destroy(:list_id => '8228', :name => 'test')
|
178
|
+
end
|
179
|
+
|
180
|
+
after do
|
181
|
+
VCR.eject_cassette
|
182
|
+
end
|
183
|
+
|
184
|
+
it "has all expected attributes" do
|
185
|
+
methods_are_defined(@response, %W(status message))
|
186
|
+
end
|
187
|
+
|
188
|
+
it "must have success code value" do
|
189
|
+
@response.code.must_equal '1'
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
end
|
data/spec/media_spec.rb
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
require (File.expand_path('../spec_helper', __FILE__))
|
2
|
+
|
3
|
+
describe Mogreet::Media do
|
4
|
+
describe 'media.list' do
|
5
|
+
before do
|
6
|
+
VCR.insert_cassette 'media_list', :record => :new_episodes
|
7
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
8
|
+
@response = client.media.list
|
9
|
+
end
|
10
|
+
|
11
|
+
after do
|
12
|
+
VCR.eject_cassette
|
13
|
+
end
|
14
|
+
|
15
|
+
it "has all expected attributes" do
|
16
|
+
methods_are_defined(@response, %W(status message media_list))
|
17
|
+
methods_are_defined(@response.media_list.first, %W(name type content_id smart_url filename))
|
18
|
+
end
|
19
|
+
|
20
|
+
it "must have success code value" do
|
21
|
+
@response.code.must_equal '1'
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe 'media.upload' do
|
26
|
+
before do
|
27
|
+
VCR.insert_cassette 'media_upload', :record => :new_episodes
|
28
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
29
|
+
upload_file = "#{File.dirname(__FILE__)}/fixtures/api.jpg"
|
30
|
+
@response = client.media.upload(:name => 'upload name', :type => 'image', :file => File.new(upload_file))
|
31
|
+
end
|
32
|
+
|
33
|
+
after do
|
34
|
+
VCR.eject_cassette
|
35
|
+
end
|
36
|
+
|
37
|
+
it "has all expected attributes" do
|
38
|
+
methods_are_defined(@response, %W(status message media))
|
39
|
+
methods_are_defined(@response.media, %W(name content_id smart_url))
|
40
|
+
end
|
41
|
+
|
42
|
+
it "must have success code value" do
|
43
|
+
@response.code.must_equal '1'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'media.destroy' do
|
48
|
+
before do
|
49
|
+
VCR.insert_cassette 'media_destroy', :record => :new_episodes
|
50
|
+
client = Mogreet::Client.new('1010101', 'xyxyxyxyxyxyxyxyxyxyxyxyxyx')
|
51
|
+
@response = client.media.destroy(:content_id => 308685)
|
52
|
+
end
|
53
|
+
|
54
|
+
after do
|
55
|
+
VCR.eject_cassette
|
56
|
+
end
|
57
|
+
|
58
|
+
it "has all expected attributes" do
|
59
|
+
methods_are_defined(@response, %W(status message media))
|
60
|
+
end
|
61
|
+
|
62
|
+
it "must have success code value" do
|
63
|
+
@response.code.must_equal '1'
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|