From 48e27c47a71e93a501de77e1507f8b25dcdc6fb0 Mon Sep 17 00:00:00 2001 From: ysksn Date: Wed, 15 Nov 2017 04:44:11 +0900 Subject: [PATCH] Add a test for SiteUpload#cache_key (#5685) --- spec/models/site_upload_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/models/site_upload_spec.rb b/spec/models/site_upload_spec.rb index 8745d54b8fa..f7ea0692130 100644 --- a/spec/models/site_upload_spec.rb +++ b/spec/models/site_upload_spec.rb @@ -1,5 +1,13 @@ +# frozen_string_literal: true + require 'rails_helper' RSpec.describe SiteUpload, type: :model do + describe '#cache_key' do + let(:site_upload) { SiteUpload.new(var: 'var') } + it 'returns cache_key' do + expect(site_upload.cache_key).to eq 'site_uploads/var' + end + end end