spec/lib/middleman-cdn/cdns/cloudflare_spec.rb in middleman-cdn-0.2.0 vs spec/lib/middleman-cdn/cdns/cloudflare_spec.rb in middleman-cdn-0.3.0
- old
+ new
@@ -50,11 +50,11 @@
describe '#invalidate' do
let(:double_cloudflare) { double("::Cloudflare") }
before do
allow(double_cloudflare).to receive(:zone_file_purge)
- allow(::CloudFlare).to receive(:connection).and_return(double_cloudflare)
+ allow(::Cloudflare).to receive(:connection).and_return(double_cloudflare)
end
let(:files) { (1..50).map { |i| "/test/file_#{i}.txt" } }
let(:all) { false }
@@ -67,11 +67,11 @@
base_urls: ['http://example.com', 'https://example.com']
}
end
it "should connect to cloudflare with credentails" do
- expect(::CloudFlare).to receive(:connection).with("000000000000000000000", "test@example.com")
+ expect(::Cloudflare).to receive(:connection).with("000000000000000000000", "test@example.com")
subject.invalidate(options, files)
end
it "should not raise errors" do
subject.invalidate(options, files)
@@ -164,10 +164,10 @@
base_urls: ['http://example.com', 'https://example.com']
}
end
it "should connect to cloudflare with environment variable credentails" do
- expect(::CloudFlare).to receive(:connection).with("111111111111111111111", "test-env@example.com")
+ expect(::Cloudflare).to receive(:connection).with("111111111111111111111", "test-env@example.com")
subject.invalidate(options, files)
end
it "should not raise errors" do
subject.invalidate(options, files)