Source

						public function testReadWithViewConditions() {
		$couchdb = new CouchDb($this->_testConfig);

		$this->query->conditions(array(
			'design' => 'latest', 'view' => 'all', 'limit' => 10, 'descending' => 'true'
		));
		$result = $couchdb->read($this->query);
		$this->assertEqual(array('total_rows' => 3, 'offset' => 0), $result->stats());

		$expected = array('id'=> 'a1', 'rev' => '1-1', 'author' => 'author 1', 'body' => 'body 1');
		$result = $result->data();
		$this->assertEqual($expected, $result[0]);

		$expected = '/lithium-test/_design/latest/_view/all/';
		$result = $couchdb->last->request->path;
		$this->assertEqual($expected, $result);

		$expected = '?limit=10&descending=true';
		$result = $couchdb->last->request->queryString();
		$this->assertEqual($expected, $result);
	}