|
8 | 8 | LaunchDarkly::Requestor.new( |
9 | 9 | "key", |
10 | 10 | LaunchDarkly::Config.new({ |
11 | | -<<<<<<< HEAD |
12 | | - proxy: "http://proxy.com", |
13 | | - base_uri: "http://ld.com" |
14 | | -======= |
15 | 11 | :proxy => "http://proxy.com", |
16 | 12 | :base_uri => "http://ld.com" |
17 | | ->>>>>>> ba355ed1fc08c6162e2335f60480c0d658b04964 |
18 | 13 | }) |
19 | 14 | ) |
20 | 15 | } |
21 | 16 | it "converts the proxy option" do |
22 | 17 | faraday = Faraday.new |
23 | 18 | requestor.instance_variable_set(:@client, faraday) |
24 | 19 | allow(faraday).to receive(:get) do |*args, &block| |
25 | | -<<<<<<< HEAD |
26 | | - req = double(Faraday::Request, headers: {}, options: Faraday::RequestOptions.new) |
27 | | -======= |
28 | 20 | req = double(Faraday::Request, :headers => {}, :options => Faraday::RequestOptions.new) |
29 | | ->>>>>>> ba355ed1fc08c6162e2335f60480c0d658b04964 |
30 | 21 | block.call(req) |
31 | 22 | expect(args).to eq ['http://ld.com/sdk/latest-flags'] |
32 | 23 | expect(req.options.proxy[:uri]).to eq URI("http://proxy.com") |
|
41 | 32 | LaunchDarkly::Requestor.new( |
42 | 33 | "key", |
43 | 34 | LaunchDarkly::Config.new({ |
44 | | -<<<<<<< HEAD |
45 | | - base_uri: "http://ld.com" |
46 | | -======= |
47 | 35 | :base_uri => "http://ld.com" |
48 | | ->>>>>>> ba355ed1fc08c6162e2335f60480c0d658b04964 |
49 | 36 | }) |
50 | 37 | ) |
51 | 38 | } |
52 | 39 | it "converts the proxy option" do |
53 | 40 | faraday = Faraday.new |
54 | 41 | requestor.instance_variable_set(:@client, faraday) |
55 | 42 | allow(faraday).to receive(:get) do |*args, &block| |
56 | | -<<<<<<< HEAD |
57 | | - req = double(Faraday::Request, headers: {}, options: Faraday::RequestOptions.new) |
58 | | -======= |
59 | 43 | req = double(Faraday::Request, :headers => {}, :options => Faraday::RequestOptions.new) |
60 | | ->>>>>>> ba355ed1fc08c6162e2335f60480c0d658b04964 |
61 | 44 | block.call(req) |
62 | 45 | expect(args).to eq ['http://ld.com/sdk/latest-flags'] |
63 | 46 | expect(req.options.proxy).to eq nil |
|
0 commit comments