mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 20:38:57 +00:00
Tests for search [skip ci]
This commit is contained in:
39
tests/functional/SearchControllerCest.php
Normal file
39
tests/functional/SearchControllerCest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class SearchControllerCest
|
||||
*/
|
||||
class SearchControllerCest
|
||||
{
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _after(FunctionalTester $I)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _before(FunctionalTester $I)
|
||||
{
|
||||
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
|
||||
}
|
||||
|
||||
public function index(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('search for "salary"');
|
||||
$I->amOnPage('/search?q=salary');
|
||||
$I->see('Transactions');
|
||||
$I->see('Results for "salary"');
|
||||
|
||||
}
|
||||
|
||||
public function indexNoQuery(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('Search for empty string');
|
||||
$I->amOnPage('/search?q=');
|
||||
$I->see('Search for ""');
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user