1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/tests/acceptance/GatewayCest.php
2015-08-20 18:09:04 +03:00

31 lines
674 B
PHP

<?php
use \AcceptanceTester;
use Faker\Factory;
class GatewayCest
{
private $faker;
public function _before(AcceptanceTester $I)
{
$I->checkIfLogin($I);
$this->faker = Factory::create();
}
// tests
public function create(AcceptanceTester $I)
{
$I->wantTo("create a gateway");
$I->amOnPage('/gateways/create');
$I->seeCurrentUrlEquals('/gateways/create');
$I->fillField(['name' => '23_apiKey'], $this->faker->swiftBicNumber);
$I->click('Save');
$I->see('Successfully created gateway');
$I->seeInDatabase('account_gateways', array('gateway_id' => 23));
}
}