|
3 | 3 |
|
4 | 4 | describe BitBucket::Request do |
5 | 5 | let(:fake_api) { (Class.new { include BitBucket::Request })} |
6 | | - let(:faraday_connection) { Faraday.new(:url => 'https://bitbucket.org/api') } |
| 6 | + let(:faraday_connection) { Faraday.new(:url => 'https://api.bitbucket.org') } |
7 | 7 |
|
8 | 8 | describe "request" do |
9 | 9 | it "raises an ArgumentError if an unsupported HTTP verb is used" do |
|
17 | 17 | end |
18 | 18 |
|
19 | 19 | it "supports get" do |
20 | | - stub_request(:get, "https://bitbucket.org/api/1.0/repositories"). |
| 20 | + stub_request(:get, "https://api.bitbucket.org/1.0/repositories"). |
21 | 21 | with(:headers => { |
22 | 22 | 'Accept' => '*/*', |
23 | 23 | 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', |
|
29 | 29 | end |
30 | 30 |
|
31 | 31 | it "supports put" do |
32 | | - stub_request(:put, "https://bitbucket.org/api/1.0/repositories"). |
| 32 | + stub_request(:put, "https://api.bitbucket.org/1.0/repositories"). |
33 | 33 | with(:body => { "data" => "payload" }, |
34 | 34 | :headers => { |
35 | 35 | 'Accept' => '*/*', |
|
42 | 42 | end |
43 | 43 |
|
44 | 44 | it "supports patch" do |
45 | | - stub_request(:patch, "https://bitbucket.org/api/1.0/repositories"). |
| 45 | + stub_request(:patch, "https://api.bitbucket.org/1.0/repositories"). |
46 | 46 | with(:body => { "data" => "payload" }, |
47 | 47 | :headers => { |
48 | 48 | 'Accept' => '*/*', |
|
55 | 55 | end |
56 | 56 |
|
57 | 57 | it "supports delete" do |
58 | | - stub_request(:delete, "https://bitbucket.org/api/1.0/repositories"). |
| 58 | + stub_request(:delete, "https://api.bitbucket.org/1.0/repositories"). |
59 | 59 | with(:headers => { |
60 | 60 | 'Accept' => '*/*', |
61 | 61 | 'Authorization' => 'Bearer 12345', |
|
65 | 65 | end |
66 | 66 |
|
67 | 67 | it "supports post" do |
68 | | - stub_request(:post, "https://bitbucket.org/api/1.0/repositories"). |
| 68 | + stub_request(:post, "https://api.bitbucket.org/1.0/repositories"). |
69 | 69 | with(:body => { "data" => "payload" }, |
70 | 70 | :headers => { |
71 | 71 | 'Accept' => '*/*', |
|
0 commit comments