diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-09-04 12:11:23 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-09-04 12:11:23 +0100 |
commit | ae29addfe3b4cd5ba6d6b04301f9d403c76089d8 (patch) | |
tree | b94bd0ef13075be5e55d0923c0a83a4922102827 /spec/models | |
parent | 0b511943ef5a8835af34842291725d1dce74b25a (diff) |
Fix purging of non-default locale cached attachments0.18.0.13hotfix/0.18.0.13
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/info_request_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb index 12499f50a..afb8e0949 100644 --- a/spec/models/info_request_spec.rb +++ b/spec/models/info_request_spec.rb @@ -147,6 +147,23 @@ describe InfoRequest do end + describe 'when managing the cache directories' do + before do + @info_request = info_requests(:fancy_dog_request) + end + + it 'should return the default locale cache path without locale parts' do + default_locale_path = File.join(Rails.root, 'cache', 'views', 'request', '101', '101') + @info_request.foi_fragment_cache_directories.include?(default_locale_path).should == true + end + + it 'should return the cache path for any other locales' do + other_locale_path = File.join(Rails.root, 'cache', 'views', 'es', 'request', '101', '101') + @info_request.foi_fragment_cache_directories.include?(other_locale_path).should == true + end + + end + describe " when emailing" do before do |