From ae00f739445717885e2fc82e241bae38b7e58d44 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 5 Nov 2008 09:42:47 +0000 Subject: * Add thumbnail and resize dimensions to the item table and use them properly in the theme. * Move thumbnail and resize generation down into the model for consistency. * Add a sample thumbnail for albums * Fix a bug in the ORM to clear the cache when we reload an object. * Add Kohana docs to the scaffold. --- core/tests/Photo_Test.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/tests') diff --git a/core/tests/Photo_Test.php b/core/tests/Photo_Test.php index 0980a187..cc4921c0 100644 --- a/core/tests/Photo_Test.php +++ b/core/tests/Photo_Test.php @@ -63,7 +63,9 @@ class Photo_Test extends Unit_Test_Case { public function resize_url_test() { $rand = rand(); - $photo = photo::create(1, DOCROOT . "core/tests/test.jpg", "$rand.jpg", $rand, $rand); - $this->assert_equal("http://./var/resizes/{$rand}.resize.jpg", $photo->resize_url()); + $album = album::create(1, $rand, $rand, $rand); + $photo = photo::create($album->id, DOCROOT . "core/tests/test.jpg", "$rand.jpg", $rand, $rand); + + $this->assert_equal("http://./var/resizes/{$rand}/{$rand}.resize.jpg", $photo->resize_url()); } } -- cgit v1.2.3