summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/QueryBuilderTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/QueryBuilderTest.php b/test/QueryBuilderTest.php
index 590f5e2..2f60c59 100644
--- a/test/QueryBuilderTest.php
+++ b/test/QueryBuilderTest.php
@@ -550,5 +550,11 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase {
$expected = "UPDATE `widget` SET `added` = NOW() WHERE `id` = '1'";
$this->assertEquals($expected, ORM::get_last_query());
}
+
+ public function testIssue176LimitDoesntWorkFirstTime() {
+ $rs = ORM::for_table('position')->limit(1)->find_array();
+ $expected = "SELECT * FROM `position` LIMIT 1";
+ $this->assertEquals($expected, ORM::get_last_query());
+ }
}