Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GabsCoding committed Sep 28, 2024
1 parent ffef534 commit 643431f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@
$request = (new RequestFake())
->withFakeResponse(new ResponseFake($body));

$result = (new BlobManager($request, $container = 'container'))->list(['option' => 'value'], includes: ['metadata', 'snapshots']);
$result = (new BlobManager($request, $container = 'container'))->list(
['option' => 'value'],
['includes' => ['metadata', 'snapshots'], 'prefix' => 'test'],
);

expect($result)
->toBeInstanceOf(Blobs::class)
Expand All @@ -166,14 +169,14 @@
->leaseState->toBe('available')
->serverEncrypted->toBe(true);

$request->assertGet("{$container}/?restype=container&comp=list&include=metadata,snapshots")
$request->assertGet("{$container}/?restype=container&comp=list&include=metadata,snapshots&prefix=test/")
->assertSentWithOptions(['option' => 'value']);
});

it('should an exception if the BlobIncludeOption is invalid', function () {
$blobManager = new BlobManager(new RequestFake(), 'container');

$blobManager->list(includes: ['invalid']);
$blobManager->list(queryParams: ['includes' => ['invalid']]);
})->throws(InvalidArgumentException::class);

it('should find by tag', function () {
Expand Down

0 comments on commit 643431f

Please sign in to comment.