diff --git a/tests/Unit/Labels/LabelTest.php b/tests/Unit/Labels/LabelTest.php new file mode 100644 index 0000000000..b175dfcad9 --- /dev/null +++ b/tests/Unit/Labels/LabelTest.php @@ -0,0 +1,35 @@ +settings->set([ + 'label2_enable' => 1, + 'label2_2d_type' => 'QRCODE', + 'label2_2d_target' => 'location', + ]); + + $asset = Asset::factory()->create(['location_id' => null]); + + // pulled from BulkAssetsController@edit method + $label = (new Label) + // receives eloquent collection in practice + ->with('assets', Asset::findMany($asset->id)) + ->with('settings', Setting::getSettings()) + ->with('bulkedit', true) + ->with('count', 0); + + $label->render(); + } +}