Sha256: 32134ae007f27d388f58641700a530bd8205d1f95a76f651a5a4cad2b9ec1f43
Contents?: true
Size: 809 Bytes
Versions: 54
Compression:
Stored size: 809 Bytes
Contents
require 'rails_helper' describe LHC::Caching do before(:each) do LHC.config.interceptors = [LHC::Caching] LHC::Caching.cache = Rails.cache Rails.cache.clear end let!(:first_request) do stub_request(:get, "http://local.ch/").to_return(body: 'Website') end let!(:second_request) do stub_request(:get, "http://local.ch/weather").to_return(body: 'The weather') end it 'does not fetch requests served from cache when doing requests in parallel with hydra' do LHC.request([{ url: 'http://local.ch', cache: true }, { url: 'http://local.ch/weather', cache: true }]) LHC.request([{ url: 'http://local.ch', cache: true }, { url: 'http://local.ch/weather', cache: true }]) assert_requested first_request, times: 1 assert_requested second_request, times: 1 end end
Version data entries
54 entries across 54 versions & 1 rubygems