mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
31 lines
674 B
PHP
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));
|
|
}
|
|
}
|