trabajo-afectivo/spec/lib/cache_spec.rb

16 lines
352 B
Ruby
Raw Permalink Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
require 'rails_helper'
RSpec.describe Cache do
describe '.get' do
before { allow(Rails.cache).to receive(:read) }
it 'alias of Rails.cache.read' do
described_class.read('foo')
expect(Rails.cache).to have_received(:read).with('foo')
end
end
end