Fix tests
This commit is contained in:
parent
449e8cc06c
commit
cb3e354cf1
2 changed files with 4 additions and 50 deletions
|
@ -216,54 +216,6 @@ App::post('/v1/projects')
|
||||||
}
|
}
|
||||||
$dbForProject->createCollection($key, $attributes, $indexes);
|
$dbForProject->createCollection($key, $attributes, $indexes);
|
||||||
}
|
}
|
||||||
$emailProvider = new Document([
|
|
||||||
'$id' => ID::custom('mock-email-provider'),
|
|
||||||
'name' => 'mock',
|
|
||||||
'provider' => 'mock',
|
|
||||||
'type' => MESSAGE_TYPE_EMAIL,
|
|
||||||
'enabled' => true,
|
|
||||||
'credentials' => [
|
|
||||||
'username' => 'username',
|
|
||||||
'password' => 'password'
|
|
||||||
],
|
|
||||||
'options' => [
|
|
||||||
'from' => 'sender-email'
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
$smsProvider = new Document([
|
|
||||||
'$id' => ID::custom('mock-sms-provider'),
|
|
||||||
'name' => 'mock',
|
|
||||||
'provider' => 'mock',
|
|
||||||
'type' => MESSAGE_TYPE_SMS,
|
|
||||||
'enabled' => true,
|
|
||||||
'credentials' => [
|
|
||||||
'username' => 'username',
|
|
||||||
'password' => 'password'
|
|
||||||
],
|
|
||||||
'options' => [
|
|
||||||
'from' => 'sender-email'
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
$pushProvider = new Document([
|
|
||||||
'$id' => ID::custom('mock-push-provider'),
|
|
||||||
'name' => 'mock',
|
|
||||||
'provider' => 'mock',
|
|
||||||
'type' => MESSAGE_TYPE_PUSH,
|
|
||||||
'enabled' => true,
|
|
||||||
'credentials' => [
|
|
||||||
'username' => 'username',
|
|
||||||
'password' => 'password'
|
|
||||||
],
|
|
||||||
'options' => [
|
|
||||||
'from' => 'sender-email'
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
$dbForProject->createDocument('providers', $emailProvider);
|
|
||||||
|
|
||||||
|
|
||||||
$dbForProject->createDocument('providers', $smsProvider);
|
|
||||||
|
|
||||||
$dbForProject->createDocument('providers', $pushProvider);
|
|
||||||
|
|
||||||
$response
|
$response
|
||||||
->setStatusCode(Response::STATUS_CODE_CREATED)
|
->setStatusCode(Response::STATUS_CODE_CREATED)
|
||||||
|
|
|
@ -608,7 +608,7 @@ trait MessagingBase
|
||||||
'name' => 'Sendgrid-provider',
|
'name' => 'Sendgrid-provider',
|
||||||
'apiKey' => $apiKey,
|
'apiKey' => $apiKey,
|
||||||
'fromName' => $fromName,
|
'fromName' => $fromName,
|
||||||
'fromEmail' => $fromEmail
|
'fromEmail' => $fromEmail,
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -765,7 +765,8 @@ trait MessagingBase
|
||||||
'name' => 'Msg91Sender',
|
'name' => 'Msg91Sender',
|
||||||
'senderId' => $senderId,
|
'senderId' => $senderId,
|
||||||
'authKey' => $authKey,
|
'authKey' => $authKey,
|
||||||
'from' => $from
|
'from' => $from,
|
||||||
|
'enabled' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals(201, $provider['headers']['status-code']);
|
$this->assertEquals(201, $provider['headers']['status-code']);
|
||||||
|
@ -926,6 +927,7 @@ trait MessagingBase
|
||||||
'providerId' => ID::unique(),
|
'providerId' => ID::unique(),
|
||||||
'name' => 'FCM-1',
|
'name' => 'FCM-1',
|
||||||
'serviceAccountJSON' => $serviceAccountJSON,
|
'serviceAccountJSON' => $serviceAccountJSON,
|
||||||
|
'enabled' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals(201, $provider['headers']['status-code']);
|
$this->assertEquals(201, $provider['headers']['status-code']);
|
||||||
|
|
Loading…
Reference in a new issue