mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
parent
0eadab49f1
commit
54b4db86d2
|
@ -6,13 +6,11 @@ use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
|
||||||
class ReportTemplate extends Model
|
class ReportTemplate extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
use SoftDeletes;
|
|
||||||
use ValidatingTrait;
|
use ValidatingTrait;
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
|
|
@ -18,7 +18,6 @@ class CreateReportTemplatesTable extends Migration
|
||||||
$table->integer('created_by')->nullable();
|
$table->integer('created_by')->nullable();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->json('options');
|
$table->json('options');
|
||||||
$table->softDeletes();
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->index('created_by');
|
$table->index('created_by');
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,7 +43,7 @@ class DeleteReportTemplateTest extends TestCase implements TestsPermissionsRequi
|
||||||
->delete($this->getRoute($reportTemplate))
|
->delete($this->getRoute($reportTemplate))
|
||||||
->assertRedirect(route('reports/custom'));
|
->assertRedirect(route('reports/custom'));
|
||||||
|
|
||||||
$this->assertSoftDeleted($reportTemplate);
|
$this->assertModelMissing($reportTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getRoute(ReportTemplate $reportTemplate): string
|
private function getRoute(ReportTemplate $reportTemplate): string
|
||||||
|
|
Loading…
Reference in a new issue