cache_spec.rb 352 B

123456789101112131415
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe Cache do
  4. describe '.get' do
  5. before { allow(Rails.cache).to receive(:read) }
  6. it 'alias of Rails.cache.read' do
  7. described_class.read('foo')
  8. expect(Rails.cache).to have_received(:read).with('foo')
  9. end
  10. end
  11. end