From 534b8525ce95f9d11875cde7a31c93d9c0557475 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 May 2009 01:55:42 -0700 Subject: Rename Core_Installer_Test -> Gallery_Installer_Test to match the change from application -> modules/gallery. --- modules/gallery/tests/Gallery_Installer_Test.php | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 modules/gallery/tests/Gallery_Installer_Test.php (limited to 'modules/gallery/tests/Gallery_Installer_Test.php') diff --git a/modules/gallery/tests/Gallery_Installer_Test.php b/modules/gallery/tests/Gallery_Installer_Test.php new file mode 100644 index 00000000..24d24b38 --- /dev/null +++ b/modules/gallery/tests/Gallery_Installer_Test.php @@ -0,0 +1,50 @@ +assert_true(file_exists(VARPATH . "albums")); + $this->assert_true(file_exists(VARPATH . "resizes")); + } + + public function install_registers_gallery_module_test() { + $gallery = ORM::factory("module")->where("name", "gallery")->find(); + $this->assert_equal("gallery", $gallery->name); + + // This is probably too volatile to keep for long + $this->assert_equal(1, $gallery->version); + } + + public function install_creates_root_item_test() { + $max_right = ORM::factory("item") + ->select("MAX(`right`) AS `right`") + ->find()->right; + $root = ORM::factory('item')->find(1); + $this->assert_equal("Gallery", $root->title); + $this->assert_equal(1, $root->left); + $this->assert_equal($max_right, $root->right); + $this->assert_equal(null, $root->parent_id); + $this->assert_equal(1, $root->level); + } +} -- cgit v1.2.3