diff options
Diffstat (limited to 'spec/frontend/registry/settings/store/getters_spec.js')
-rw-r--r-- | spec/frontend/registry/settings/store/getters_spec.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/frontend/registry/settings/store/getters_spec.js b/spec/frontend/registry/settings/store/getters_spec.js index 44631b97a39..944057ebc9f 100644 --- a/spec/frontend/registry/settings/store/getters_spec.js +++ b/spec/frontend/registry/settings/store/getters_spec.js @@ -29,7 +29,7 @@ describe('Getters registry settings store', () => { }); }); - describe('getIsDisabled', () => { + describe('getIsEdited', () => { it('returns false when original is equal to settings', () => { const same = { foo: 'bar' }; expect(getters.getIsEdited({ original: same, settings: same })).toBe(false); @@ -41,4 +41,18 @@ describe('Getters registry settings store', () => { ); }); }); + + describe('getIsDisabled', () => { + it.each` + original | enableHistoricEntries | result + ${undefined} | ${false} | ${true} + ${{ foo: 'bar' }} | ${undefined} | ${false} + ${{}} | ${false} | ${false} + `( + 'returns $result when original is $original and enableHistoricEntries is $enableHistoricEntries', + ({ original, enableHistoricEntries, result }) => { + expect(getters.getIsDisabled({ original, enableHistoricEntries })).toBe(result); + }, + ); + }); }); |