Fixes for tests
This commit is contained in:
parent
2f1cabd181
commit
987e262ac5
|
|
@ -83,10 +83,10 @@ class StoreClientRequest extends Request
|
||||||
$rules['shipping_country_id'] = 'integer|nullable|exists:countries,id';
|
$rules['shipping_country_id'] = 'integer|nullable|exists:countries,id';
|
||||||
$rules['number'] = ['sometimes', 'nullable', 'bail', Rule::unique('clients')->where('company_id', $user->company()->id)];
|
$rules['number'] = ['sometimes', 'nullable', 'bail', Rule::unique('clients')->where('company_id', $user->company()->id)];
|
||||||
$rules['country_id'] = 'integer|nullable|exists:countries,id';
|
$rules['country_id'] = 'integer|nullable|exists:countries,id';
|
||||||
$rules['custom_value1'] = 'bail|nullable|string';
|
$rules['custom_value1'] = 'bail|nullable|sometimes|string';
|
||||||
$rules['custom_value2'] = 'bail|nullable|string';
|
$rules['custom_value2'] = 'bail|nullable|sometimes|string';
|
||||||
$rules['custom_value3'] = 'bail|nullable|string';
|
$rules['custom_value3'] = 'bail|nullable|sometimes|string';
|
||||||
$rules['custom_value4'] = 'bail|nullable|string';
|
$rules['custom_value4'] = 'bail|nullable|sometimes|string';
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,10 @@ class UpdateClientRequest extends Request
|
||||||
//'regex:/[@$!%*#?&.]/', // must contain a special character
|
//'regex:/[@$!%*#?&.]/', // must contain a special character
|
||||||
];
|
];
|
||||||
|
|
||||||
$rules['custom_value1'] = 'bail|nullable|string';
|
$rules['custom_value1'] = 'bail|nullable|sometimes|string';
|
||||||
$rules['custom_value2'] = 'bail|nullable|string';
|
$rules['custom_value2'] = 'bail|nullable|sometimes|string';
|
||||||
$rules['custom_value3'] = 'bail|nullable|string';
|
$rules['custom_value3'] = 'bail|nullable|sometimes|string';
|
||||||
$rules['custom_value4'] = 'bail|nullable|string';
|
$rules['custom_value4'] = 'bail|nullable|sometimes|string';
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ class ClientFactory extends Factory
|
||||||
'paid_to_date' => 0,
|
'paid_to_date' => 0,
|
||||||
'vat_number' => $this->faker->numberBetween(123456789, 987654321),
|
'vat_number' => $this->faker->numberBetween(123456789, 987654321),
|
||||||
'id_number' => $this->faker->iban(),
|
'id_number' => $this->faker->iban(),
|
||||||
'custom_value1' => $this->faker->dateTime(),
|
'custom_value1' => $this->faker->date(),
|
||||||
'custom_value2' => $this->faker->colorName(),
|
'custom_value2' => $this->faker->colorName(),
|
||||||
'custom_value3' => $this->faker->word(),
|
'custom_value3' => $this->faker->word(),
|
||||||
'custom_value4' => $this->faker->email(),
|
'custom_value4' => $this->faker->email(),
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ class ClassificationTest extends TestCase
|
||||||
{
|
{
|
||||||
$this->client->classification = 'business';
|
$this->client->classification = 'business';
|
||||||
|
|
||||||
|
nlog($this->client->toArray());
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-TOKEN' => $this->token,
|
'X-API-TOKEN' => $this->token,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue