spec/range_spec.rb in infoblox-0.2.19 vs spec/range_spec.rb in infoblox-0.3.0

- old
+ new

@@ -3,25 +3,25 @@ RangeResponse = Struct.new(:body) describe Infoblox::Host, "#next_available_ip" do it "returns empty array when no IP is available." do connection = double - uri = Infoblox::BASE_PATH + Infoblox::Range.wapi_object + uri = Infoblox.base_path + Infoblox::Range.wapi_object return_json = RangeResponse.new('{"ips": "[]"}') allow(connection).to receive(:post).with(uri + "?_function=next_available_ip" , {:num=>1, :exclude=>[]}).and_return(return_json) response = Infoblox::Range.new(:connection => connection) expect(response.next_available_ip).to eq '[]' end it "gets next available ip from range" do connection = double - uri = Infoblox::BASE_PATH + Infoblox::Range.wapi_object + uri = Infoblox.base_path + Infoblox::Range.wapi_object return_json = RangeResponse.new(' { "ips": "[\"1.1.1.1\", \"1.1.1.2\"]" }') allow(connection).to receive(:post).with(uri + "?_function=next_available_ip" , {:num=>1, :exclude=>[]}).and_return(return_json) response = Infoblox::Range.new(:connection => connection) expect(response.next_available_ip).to eq '["1.1.1.1", "1.1.1.2"]' end -end \ No newline at end of file +end