From 085ba7cd46c3fcc5bcb7a3f4c98ee580e67b6800 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 10 Nov 2008 00:16:41 +0000 Subject: Tests for Item_Controller --- core/tests/Item_Controller_Test.php | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 core/tests/Item_Controller_Test.php (limited to 'core/tests') diff --git a/core/tests/Item_Controller_Test.php b/core/tests/Item_Controller_Test.php new file mode 100644 index 00000000..b52d8219 --- /dev/null +++ b/core/tests/Item_Controller_Test.php @@ -0,0 +1,43 @@ +post($album); + $this->assert_equal("new title", $album->title); + $this->assert_equal("new description", $album->description); + } + + public function change_item_test_with_return() { + $controller = new Item_Controller(); + $album = album::create(1, "test", "test"); + $_POST["title"] = "item_title"; + $_POST["description"] = "item_description"; + $_POST["__return"] = "item_description"; + + $tihs->assert_equal("item_description", $controller->post($album)); + $this->assert_equal("item_title", $album->title); + $this->assert_equal("item_description", $album->description); + } +} -- cgit v1.2.3