|
8 | 8 |
|
9 | 9 | describe "#rate_limit_status" do
|
10 | 10 | before do
|
11 |
| - stub_get("/1/account/rate_limit_status.json"). |
| 11 | + stub_get("/1.1/account/rate_limit_status.json"). |
12 | 12 | to_return(:body => fixture("rate_limit_status.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
13 | 13 | end
|
14 | 14 | it "requests the correct resource" do
|
15 | 15 | @client.rate_limit_status
|
16 |
| - a_get("/1/account/rate_limit_status.json"). |
| 16 | + a_get("/1.1/account/rate_limit_status.json"). |
17 | 17 | should have_been_made
|
18 | 18 | end
|
19 | 19 | it "returns the remaining number of API requests available to the requesting user before the API limit is reached" do
|
|
25 | 25 |
|
26 | 26 | describe "#verify_credentials" do
|
27 | 27 | before do
|
28 |
| - stub_get("/1/account/verify_credentials.json"). |
| 28 | + stub_get("/1.1/account/verify_credentials.json"). |
29 | 29 | to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
30 | 30 | end
|
31 | 31 | it "requests the correct resource" do
|
32 | 32 | @client.verify_credentials
|
33 |
| - a_get("/1/account/verify_credentials.json"). |
| 33 | + a_get("/1.1/account/verify_credentials.json"). |
34 | 34 | should have_been_made
|
35 | 35 | end
|
36 | 36 | it "returns the requesting user" do
|
|
42 | 42 |
|
43 | 43 | describe "#end_session" do
|
44 | 44 | before do
|
45 |
| - stub_post("/1/account/end_session.json"). |
| 45 | + stub_post("/1.1/account/end_session.json"). |
46 | 46 | to_return(:body => fixture("end_session.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
47 | 47 | end
|
48 | 48 | it "requests the correct resource" do
|
49 | 49 | @client.end_session
|
50 |
| - a_post("/1/account/end_session.json"). |
| 50 | + a_post("/1.1/account/end_session.json"). |
51 | 51 | should have_been_made
|
52 | 52 | end
|
53 | 53 | it "returns a null cookie" do
|
|
58 | 58 |
|
59 | 59 | describe "#update_delivery_device" do
|
60 | 60 | before do
|
61 |
| - stub_post("/1/account/update_delivery_device.json"). |
| 61 | + stub_post("/1.1/account/update_delivery_device.json"). |
62 | 62 | with(:body => {:device => "sms"}).
|
63 | 63 | to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
64 | 64 | end
|
65 | 65 | it "requests the correct resource" do
|
66 | 66 | @client.update_delivery_device("sms")
|
67 |
| - a_post("/1/account/update_delivery_device.json"). |
| 67 | + a_post("/1.1/account/update_delivery_device.json"). |
68 | 68 | with(:body => {:device => "sms"}).
|
69 | 69 | should have_been_made
|
70 | 70 | end
|
|
77 | 77 |
|
78 | 78 | describe "#update_profile" do
|
79 | 79 | before do
|
80 |
| - stub_post("/1/account/update_profile.json"). |
| 80 | + stub_post("/1.1/account/update_profile.json"). |
81 | 81 | with(:body => {:url => "http://github.com/sferik/"}).
|
82 | 82 | to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
83 | 83 | end
|
84 | 84 | it "requests the correct resource" do
|
85 | 85 | @client.update_profile(:url => "http://github.com/sferik/")
|
86 |
| - a_post("/1/account/update_profile.json"). |
| 86 | + a_post("/1.1/account/update_profile.json"). |
87 | 87 | with(:body => {:url => "http://github.com/sferik/"}).
|
88 | 88 | should have_been_made
|
89 | 89 | end
|
|
96 | 96 |
|
97 | 97 | describe "#update_profile_background_image" do
|
98 | 98 | before do
|
99 |
| - stub_post("/1/account/update_profile_background_image.json"). |
| 99 | + stub_post("/1.1/account/update_profile_background_image.json"). |
100 | 100 | to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
101 | 101 | end
|
102 | 102 | it "requests the correct resource" do
|
103 | 103 | @client.update_profile_background_image(fixture("we_concept_bg2.png"))
|
104 |
| - a_post("/1/account/update_profile_background_image.json"). |
| 104 | + a_post("/1.1/account/update_profile_background_image.json"). |
105 | 105 | should have_been_made
|
106 | 106 | end
|
107 | 107 | it "returns a user" do
|
|
113 | 113 |
|
114 | 114 | describe "#update_profile_colors" do
|
115 | 115 | before do
|
116 |
| - stub_post("/1/account/update_profile_colors.json"). |
| 116 | + stub_post("/1.1/account/update_profile_colors.json"). |
117 | 117 | with(:body => {:profile_background_color => "000000"}).
|
118 | 118 | to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
119 | 119 | end
|
120 | 120 | it "requests the correct resource" do
|
121 | 121 | @client.update_profile_colors(:profile_background_color => "000000")
|
122 |
| - a_post("/1/account/update_profile_colors.json"). |
| 122 | + a_post("/1.1/account/update_profile_colors.json"). |
123 | 123 | with(:body => {:profile_background_color => "000000"}).
|
124 | 124 | should have_been_made
|
125 | 125 | end
|
|
132 | 132 |
|
133 | 133 | describe "#update_profile_image" do
|
134 | 134 | before do
|
135 |
| - stub_post("/1/account/update_profile_image.json"). |
| 135 | + stub_post("/1.1/account/update_profile_image.json"). |
136 | 136 | to_return(:body => fixture("sferik.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
137 | 137 | end
|
138 | 138 | it "requests the correct resource" do
|
139 | 139 | @client.update_profile_image(fixture("me.jpeg"))
|
140 |
| - a_post("/1/account/update_profile_image.json"). |
| 140 | + a_post("/1.1/account/update_profile_image.json"). |
141 | 141 | should have_been_made
|
142 | 142 | end
|
143 | 143 | it "returns a user" do
|
|
149 | 149 |
|
150 | 150 | describe "#settings" do
|
151 | 151 | before do
|
152 |
| - stub_get("/1/account/settings.json"). |
| 152 | + stub_get("/1.1/account/settings.json"). |
153 | 153 | to_return(:body => fixture("settings.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
154 |
| - stub_post("/1/account/settings.json"). |
| 154 | + stub_post("/1.1/account/settings.json"). |
155 | 155 | with(:body => {:trend_location_woeid => "23424803"}).
|
156 | 156 | to_return(:body => fixture("settings.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
157 | 157 | end
|
158 | 158 | it "requests the correct resource on GET" do
|
159 | 159 | @client.settings
|
160 |
| - a_get("/1/account/settings.json"). |
| 160 | + a_get("/1.1/account/settings.json"). |
161 | 161 | should have_been_made
|
162 | 162 | end
|
163 | 163 | it "returns settings" do
|
|
167 | 167 | end
|
168 | 168 | it "requests the correct resource on POST" do
|
169 | 169 | @client.settings(:trend_location_woeid => "23424803")
|
170 |
| - a_post("/1/account/settings.json"). |
| 170 | + a_post("/1.1/account/settings.json"). |
171 | 171 | with(:body => {:trend_location_woeid => "23424803"}).
|
172 | 172 | should have_been_made
|
173 | 173 | end
|
|
0 commit comments