mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 20:21:10 -04:00
v6 update
This commit is contained in:
39
tests/Unit/Request/ExchangeRateProviderTest.php
Normal file
39
tests/Unit/Request/ExchangeRateProviderTest.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Crater\Http\Requests\ExchangeRateProviderRequest;
|
||||
|
||||
test('exchange rate provider request validation rules', function () {
|
||||
$request = new ExchangeRateProviderRequest();
|
||||
|
||||
$this->assertEquals(
|
||||
[
|
||||
'driver' => [
|
||||
'required'
|
||||
],
|
||||
'key' => [
|
||||
'required',
|
||||
],
|
||||
'currencies' => [
|
||||
'nullable',
|
||||
],
|
||||
'currencies.*' => [
|
||||
'nullable',
|
||||
],
|
||||
'driver_config' => [
|
||||
'nullable'
|
||||
],
|
||||
'active' => [
|
||||
'nullable',
|
||||
'boolean'
|
||||
],
|
||||
],
|
||||
$request->rules()
|
||||
);
|
||||
});
|
||||
|
||||
test('exchange rate provider request authorize', function () {
|
||||
$request = new ExchangeRateProviderRequest();
|
||||
|
||||
$this->assertTrue($request->authorize());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user