From 3b2e00442867abe554c7a80f5368f0fa1c4ee2e2 Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Sun, 5 Feb 2017 10:56:29 +0100 Subject: [PATCH] update getter version tests --- test/store.getters.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/store.getters.js b/test/store.getters.js index 0eccec6..5ec3a14 100644 --- a/test/store.getters.js +++ b/test/store.getters.js @@ -3,6 +3,7 @@ import * as getters from '../src/store/getters'; test('version', t => { const state = { + route: {path: '/'}, password: {version: 2}, defaultPassword: {version: 1} }; @@ -10,8 +11,19 @@ test('version', t => { t.is(version, 2); }); +test('version path equal default options', t => { + const state = { + route: {path: '/options/default'}, + password: {version: 2}, + defaultPassword: {version: 1} + }; + const version = getters.version(state); + t.is(version, 1); +}); + test('version no password', t => { const state = { + route: {path: '/'}, password: null, defaultPassword: {version: 1} };