Unit tests for listing specific methods

- small fixes/optimization in Subscriber model
- added test for search and group in Subscriber
- added test for search in Newsletter
This commit is contained in:
Jonathan Labreuille
2015-09-03 13:47:39 +02:00
parent cf322ec3c2
commit d89f43dbe5
3 changed files with 59 additions and 4 deletions

View File

@@ -19,6 +19,11 @@ class NewsletterCest {
expect($this->saved)->equals(true);
}
function itHasASearchFilter() {
$newsletter = Newsletter::filter('search', 'first')->findOne();
expect($newsletter->subject)->equals($this->data['subject']);
}
function _after() {
ORM::for_table(Newsletter::$_table)
->delete_many();