aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-09-01 10:34:08 +0100
committerLouise Crow <louise.crow@gmail.com>2014-09-01 11:19:53 +0100
commitbaf8be95fff5c00688af6f0fae72392600ee9254 (patch)
treeaf6b959b9266baa132c11537ba6b56be4a46b285 /spec/models
parent82565870dfa3b7da0a729723345097e230c4a163 (diff)
Return a list of all cache directories for the request
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/info_request_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb
index 3df99dd60..afb8e0949 100644
--- a/spec/models/info_request_spec.rb
+++ b/spec/models/info_request_spec.rb
@@ -147,14 +147,19 @@ describe InfoRequest do
end
- describe 'when managing the cache path' do
+ 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_directory.include?(default_locale_path).should == true
+ @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