mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-03 00:40:12 -05:00
Generate unit tests for form requests
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\MassUpsertPlaylistTorrentRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'playlist_id' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'integer',
|
||||
],
|
||||
'torrent_urls' => [
|
||||
'required',
|
||||
'max:65535',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
Reference in New Issue
Block a user