1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(tests): update tests for entires

This commit is contained in:
Awilum
2022-05-22 08:50:15 +03:00
parent 6d82f0d09a
commit e1c05209d1

View File

@@ -89,6 +89,12 @@ test('get cache ID for entry with cache enabled true', function () {
expect(strlen(entries()->getCacheID('foo')))->toEqual(32);
});
test('get cache ID for entry with cache enabled true and with salt', function () {
registry()->set('flextype.settings.cache.enabled', true);
expect(entries()->create('foo', []))->toBeTrue();
expect(strlen(entries()->getCacheID('foo', 'Foo')))->toEqual(32);
});
test('registry for entry', function() {
entries()->registry()->set('foo', ['title' => 'Foo']);
expect(entries()->registry()->get('foo.title'))->toEqual('Foo');