mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Исправлена ошибка при попытке отправить сообщение в форму обратной связи, будучи залогиненным
This commit is contained in:
37
tests/codeception/api/functional/FeedbackCest.php
Normal file
37
tests/codeception/api/functional/FeedbackCest.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
namespace tests\codeception\api\functional;
|
||||
|
||||
use tests\codeception\api\FunctionalTester;
|
||||
|
||||
class FeedbackCest {
|
||||
|
||||
public function testFeedbackWithoutAuth(FunctionalTester $I) {
|
||||
$I->sendPOST('/feedback', [
|
||||
'subject' => 'Test',
|
||||
'email' => 'email@ely.by',
|
||||
'type' => 0,
|
||||
'message' => 'Hello world',
|
||||
]);
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->canSeeResponseContainsJson([
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
public function testFeedbackWithAuth(FunctionalTester $I) {
|
||||
$I->amAuthenticated();
|
||||
$I->sendPOST('/feedback', [
|
||||
'subject' => 'Test',
|
||||
'email' => 'email@ely.by',
|
||||
'type' => 0,
|
||||
'message' => 'Hello world',
|
||||
]);
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->canSeeResponseContainsJson([
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user