12
12
describe 'retrieve_all' do
13
13
it 'sends the proper request' do
14
14
request_url = "https://api.natero.com/api/v2/accounts/?api_key=#{ api_key } "
15
- data = nil
15
+ data = { }
16
16
method = :get
17
17
18
18
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
26
26
it 'sends the proper request' do
27
27
id = 1
28
28
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /?api_key=#{ api_key } "
29
- data = nil
29
+ data = { }
30
30
method = :get
31
31
32
32
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
71
71
it 'sends the proper request' do
72
72
id = 1
73
73
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /metrics/?api_key=#{ api_key } "
74
- data = nil
74
+ data = { }
75
75
method = :get
76
76
77
77
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
85
85
it 'sends the proper request' do
86
86
id = 1
87
87
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /statements/?api_key=#{ api_key } "
88
- data = nil
88
+ data = { }
89
89
method = :get
90
90
91
91
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
99
99
it 'sends the proper request' do
100
100
id = 1
101
101
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /subscriptions/?api_key=#{ api_key } "
102
- data = nil
102
+ data = { }
103
103
method = :get
104
104
105
105
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
113
113
it 'sends the proper request' do
114
114
id = 1
115
115
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /support_tickets/?api_key=#{ api_key } "
116
- data = nil
116
+ data = { }
117
117
method = :get
118
118
119
119
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
127
127
it 'sends the proper request' do
128
128
id = 1
129
129
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /users/?api_key=#{ api_key } "
130
- data = nil
130
+ data = { }
131
131
method = :get
132
132
133
133
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
141
141
it 'sends the proper request' do
142
142
id = 1
143
143
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /contacts/?api_key=#{ api_key } "
144
- data = nil
144
+ data = { }
145
145
method = :get
146
146
147
147
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
155
155
it 'sends the proper request' do
156
156
id = 1
157
157
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /?api_key=#{ api_key } "
158
- data = nil
158
+ data = { }
159
159
method = :delete
160
160
161
161
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
171
171
name = 'paul'
172
172
timestamp = '1000000'
173
173
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /stage_history/#{ name } /#{ timestamp } /?api_key=#{ api_key } "
174
- data = nil
174
+ data = { }
175
175
method = :delete
176
176
177
177
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
186
186
id = 1
187
187
key = 'so_random'
188
188
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /dimension_values/#{ key } /?api_key=#{ api_key } "
189
- data = nil
189
+ data = { }
190
190
method = :delete
191
191
192
192
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
201
201
id = 1
202
202
key = 'so_random'
203
203
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /dimension_labels/#{ key } /?api_key=#{ api_key } "
204
- data = nil
204
+ data = { }
205
205
method = :delete
206
206
207
207
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
216
216
id = 1
217
217
218
218
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /assigned_csms/#{ email } /?api_key=#{ api_key } "
219
- data = nil
219
+ data = { }
220
220
method = :delete
221
221
222
222
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
231
231
id = 1
232
232
timestamp = 10000
233
233
request_url = "https://api.natero.com/api/v2/accounts/#{ id } /nps_history/#{ timestamp } /?api_key=#{ api_key } "
234
- data = nil
234
+ data = { }
235
235
method = :delete
236
236
237
237
expect ( HTTParty ) . to receive ( method ) . with ( request_url , data ) . and_return ( valid_message )
240
240
Natero ::Account . delete_nps_history ( id , timestamp )
241
241
end
242
242
end
243
- end
243
+ end
0 commit comments