aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/info_request_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-09-04 14:24:47 +0100
committerLouise Crow <louise.crow@gmail.com>2014-09-04 14:24:47 +0100
commitd9fd0d6ef7675b967e2962c84b16548946738cb9 (patch)
tree8352a39b1eddc7823800e46e522b89aa1cba8806 /spec/models/info_request_spec.rb
parente9215e6a4142e1eb2871879912fc5711c6c30e9c (diff)
parent72754b319b154ae175458750dafa597f8115d3b0 (diff)
Merge branch 'hotfix/0.19.0.1' into rails-3-develop
Diffstat (limited to 'spec/models/info_request_spec.rb')
-rw-r--r--spec/models/info_request_spec.rb17
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