Skip to content

Commit

Permalink
✅ Fix Model cache_duration unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
skerit committed Feb 8, 2024
1 parent 3330e93 commit 1580c45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/03-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ describe('Model', function() {

describe('.cache_duration', function() {
it('gets the current cache_duration', function() {
assert.strictEqual(Person.cache_duration, undefined);
assert.strictEqual(Person.cache_duration, Classes.Alchemy.Setting.SYSTEM.get('data_management').get('model_query_cache_duration').default_value);
});

it('gets the cache duration from the settings', function() {

Person.cache_duration = null;

alchemy.setSetting('data_management.model_query_cache_duration', '1 second');
assert.strictEqual(Person.cache_duration, '1 second');

Expand Down

0 comments on commit 1580c45

Please sign in to comment.