diff options
Diffstat (limited to 'core/tests/Album_Helper_Test.php')
-rw-r--r-- | core/tests/Album_Helper_Test.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/tests/Album_Helper_Test.php b/core/tests/Album_Helper_Test.php index d4bfca55..522d58d9 100644 --- a/core/tests/Album_Helper_Test.php +++ b/core/tests/Album_Helper_Test.php @@ -58,4 +58,17 @@ class Album_Helper_Test extends Unit_Test_Case { $album = album::create($root, $rand, $rand, $rand); $this->assert_equal("http://./var/resizes/$rand/.album.jpg", $album->resize_url()); } + + public function create_album_shouldnt_allow_names_with_slash_test() { + $rand = rand(); + $root = ORM::factory("item", 1); + try { + $album = album::create($root, $rand . "/", $rand, $rand); + } catch (Exception $e) { + // pass + return; + } + + $this->assert_true(false, "Shouldn't create an album with / in the name"); + } } |