Sha256: 22b96fba03675b351625b1fba6d9a59f53fb31afc05f4bb77583354b04559ce2
Contents?: true
Size: 840 Bytes
Versions: 49
Compression:
Stored size: 840 Bytes
Contents
# frozen_string_literal: true 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
49 entries across 49 versions & 1 rubygems