diff options
author | Bharat Mediratta <bharat@menalto.com> | 2013-01-23 20:50:54 -0500 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2013-01-23 20:50:54 -0500 |
commit | 34198e71d320fe013993abff870986eafb6aa8bc (patch) | |
tree | 5ed97b3426ab44bdc765b32f7135655204851334 /modules/gallery/tests | |
parent | 7f0a844794fbdced45d23eb898fc0475eeef18e2 (diff) |
Add a cache buster to all data_rest urls, add caching headers to all
data_rest responses, and check cache validity. Fixes #1909.
Diffstat (limited to 'modules/gallery/tests')
-rw-r--r-- | modules/gallery/tests/Data_Rest_Helper_Test.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gallery/tests/Data_Rest_Helper_Test.php b/modules/gallery/tests/Data_Rest_Helper_Test.php index 69d17997..e6a94864 100644 --- a/modules/gallery/tests/Data_Rest_Helper_Test.php +++ b/modules/gallery/tests/Data_Rest_Helper_Test.php @@ -99,4 +99,13 @@ class Data_Rest_Helper_Test extends Gallery_Unit_Test_Case { // pass } } + + public function cache_buster_test() { + $photo = test::random_photo(); + + $this->assert_same( + url::abs_site("rest/data/{$photo->id}?size=thumb&m=" . filemtime($photo->thumb_path())), + data_rest::url($photo, "thumb")); + } } + |