mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-20 02:11:31 +00:00
/api/part_lots: add user_barcode filter
This commit is contained in:
parent
32a666f6c3
commit
5a6b270525
2 changed files with 15 additions and 0 deletions
|
|
@ -47,6 +47,19 @@ final class PartLotsEndpointTest extends CrudEndpointTestCase
|
|||
$this->_testGetItem(2);
|
||||
}
|
||||
|
||||
public function testFilterByUserBarcode(): void
|
||||
{
|
||||
$response = self::createAuthenticatedClient()->request('GET', '/api/part_lots?user_barcode=lot2_vendor_barcode');
|
||||
|
||||
self::assertResponseIsSuccessful();
|
||||
self::assertJsonContains([
|
||||
'hydra:totalItems' => 1,
|
||||
]);
|
||||
|
||||
$json = $response->toArray();
|
||||
self::assertSame('/api/part_lots/2', $json['hydra:member'][0]['@id']);
|
||||
}
|
||||
|
||||
public function testCreateItem(): void
|
||||
{
|
||||
$this->_testPostItem([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue