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); + } +}