From dc286cc2bd96a70505c16487905b4aae761feeff Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 18 Jan 2010 09:00:14 -0800 Subject: Add a test to verify that bug #2504 is still around. When this test starts failing, the bug is fixed and we can go fix our code that works around it. --- modules/gallery/tests/Kohana_Bug_Test.php | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 modules/gallery/tests/Kohana_Bug_Test.php (limited to 'modules') diff --git a/modules/gallery/tests/Kohana_Bug_Test.php b/modules/gallery/tests/Kohana_Bug_Test.php new file mode 100644 index 00000000..61f5d69e --- /dev/null +++ b/modules/gallery/tests/Kohana_Bug_Test.php @@ -0,0 +1,38 @@ +name = rand(); + $group->save(); // this save works + + try { + $group->name = null; // now I change to an illegal value + $group->save(); // this passes, but it shouldn't. My model is broken! + + // This is the normal state when the bug is not fixed. + } catch (ORM_Validation_Exception $e) { + // When this triggers, the bug is fixed. Find any references to ticket #2504 in the code + // and update those accordingly + $this->assert_true(false, "Bug #2504 has been fixed"); + } + } +} -- cgit v1.2.3