Warenwirtschaft: AP-09 bis AP-13 (Produktbestand, Set-Produkte, Ausschuss, Konzepte)
- AP-09 Produktbestand inkl. Bewegungshistorie (product_stock_movements, ProductStockService) - AP-10 Rohstoffbestand-Ansicht je Lager (RawMaterialStockController) - AP-11 Bestandsschwellen / Out-of-Stock-Handling fuer Produkte und Shop - AP-12 Ausgang/Ausschuss (stock_disposals, StockDisposalController, InventoryService) - Set-Produkte (product_set_items) inkl. Aufloesung - Produktentwicklung & Hinweise-Verwaltung (Notices) - AP-13 Entwicklungskonzept Shop-Bestandsabzug im Plan dokumentiert - Feature-Tests fuer neue Module + aktualisierter Entwicklungsplan Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
78679e0c55
commit
3ee2d756e9
63 changed files with 5968 additions and 901 deletions
41
tests/Feature/InventoryNoticesTest.php
Normal file
41
tests/Feature/InventoryNoticesTest.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
uses(TestCase::class, RefreshDatabase::class);
|
||||
|
||||
function noticeUser(int $adminLevel = 8): User
|
||||
{
|
||||
$user = User::query()->create([
|
||||
'email' => uniqid('notice_', true).'@test.example',
|
||||
'password' => bcrypt('password'),
|
||||
]);
|
||||
$user->forceFill([
|
||||
'admin' => $adminLevel,
|
||||
'confirmed' => true,
|
||||
'active' => true,
|
||||
'wizard' => 100,
|
||||
'blocked' => false,
|
||||
])->save();
|
||||
|
||||
return $user->fresh();
|
||||
}
|
||||
|
||||
test('hinweise-seite rendert das markdown gerendert als html', function () {
|
||||
$this->actingAs(noticeUser(8), 'user');
|
||||
|
||||
$response = $this->get(route('admin.inventory.notices'));
|
||||
|
||||
$response->assertSuccessful();
|
||||
$response->assertSee('Hinweise');
|
||||
$response->assertSee('Entwicklungsstand', false);
|
||||
$response->assertSee('<h2', false);
|
||||
});
|
||||
|
||||
test('nicht-superadmin hat keinen zugriff auf hinweise-seite', function () {
|
||||
$this->actingAs(noticeUser(7), 'user');
|
||||
|
||||
$this->get(route('admin.inventory.notices'))->assertRedirect('/home');
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue