spec/cases/api_spec.rb in koala-1.10.0rc vs spec/cases/api_spec.rb in koala-1.10.0rc2
- old
+ new
@@ -144,46 +144,9 @@
path = "/anything"
expect(Koala).to receive(:make_request).with(path, anything, anything, anything).and_return(Koala::HTTPService::Response.new(200, 'true', {}))
@service.api(path)
end
end
-
- context "API versions" do
- let(:path) { "/anything" }
-
- it "adds a version if specified by Koala.config" do
- Koala.config.api_version = "v1000.000"
- expect(Koala).to receive(:make_request).with(
- "/#{Koala.config.api_version}#{path}",
- anything,
- anything,
- anything
- ).and_return(Koala::HTTPService::Response.new(200, 'true', {}))
- @service.api(path)
- end
-
- it "prefers a version set in the options" do
- Koala.config.api_version = "v1000.000"
- version = "v2.0"
- expect(Koala).to receive(:make_request).with(
- "/#{version}#{path}",
- anything,
- anything,
- anything
- ).and_return(Koala::HTTPService::Response.new(200, 'true', {}))
- @service.api(path, {}, "get", api_version: "v2.0")
- end
-
- it "doesn't include a version if not specified" do
- expect(Koala).to receive(:make_request).with(
- path,
- anything,
- anything,
- anything
- ).and_return(Koala::HTTPService::Response.new(200, 'true', {}))
- @service.api(path)
- end
- end
end
describe "with an access token" do
before(:each) do
@api = Koala::Facebook::API.new(@token)