test: add setSessionKey test to DatabaseDriverTest

This commit is contained in:
Joel Male
2026-05-27 20:58:24 +10:00
parent 4702cf98ab
commit 9fcd50f81f
@@ -68,4 +68,12 @@
test('getSessionModel returns the Eloquent model', function () {
expect($this->driver->getSessionModel())->toBeInstanceOf(MockCartModel::class);
});
test('setSessionKey updates the session key on the model', function () {
$this->driver->putItems([['id' => 1]]);
$this->driver->setSessionKey('new-session');
expect($this->driver->getSessionKey())->toBe('new-session');
expect($this->driver->getItems())->toBe([['id' => 1]]);
});
});