Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-10-14 14:28:42 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-10-18 09:55:11 -0400
commitb3ab082e9ca120c34fdffa0a4cc4a7379ecaf1a6 (patch)
tree1ecdc9aec5d8cc0018e9bbfca7d61a78b0936c84 /test
parentd1f72cf5b3a0c114f33f5628acf39ec8596a3df6 (diff)
downloadliza-b3ab082e9ca120c34fdffa0a4cc4a7379ecaf1a6.tar.gz
liza-b3ab082e9ca120c34fdffa0a4cc4a7379ecaf1a6.tar.bz2
liza-b3ab082e9ca120c34fdffa0a4cc4a7379ecaf1a6.zip
{=>Persistent}TokenStore
This creates an interface for TokenStore. The main motivation of this right now is testing, since I'm punting on figuring out a mock framework right now (due to time constraints). * src/server/token/TokenStore.ts: Rename file. * src/server/token/store/PersistentTokenStore.ts: Rename from TokenStore. * test/server/token/TokenStoreTest.ts: Rename file. * test/server/token/store/PersistentTokenStoreTest.ts: Rename from TokenStoreTest.
Diffstat (limited to 'test')
-rw-r--r--test/server/token/store/PersistentTokenStoreTest.ts (renamed from test/server/token/TokenStoreTest.ts)15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/server/token/TokenStoreTest.ts b/test/server/token/store/PersistentTokenStoreTest.ts
index 9ed12a8..ff2409b 100644
--- a/test/server/token/TokenStoreTest.ts
+++ b/test/server/token/store/PersistentTokenStoreTest.ts
@@ -1,5 +1,5 @@
/**
- * Tests token management
+ * Tests persistent token management
*
* Copyright (C) 2010-2019 R-T Specialty, LLC.
*
@@ -19,22 +19,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import { TokenStore as Sut } from "../../../src/server/token/TokenStore";
-import { TokenDao, TokenData } from "../../../src/server/token/TokenDao";
-import { DocumentId } from "../../../src/document/Document";
+import {
+ PersistentTokenStore as Sut
+} from "../../../../src/server/token/store/PersistentTokenStore";
+
+import { TokenDao, TokenData } from "../../../../src/server/token/TokenDao";
+import { DocumentId } from "../../../../src/document/Document";
import {
Token,
TokenId,
TokenNamespace,
TokenState,
-} from "../../../src/server/token/Token";
+} from "../../../../src/server/token/Token";
import { expect, use as chai_use } from 'chai';
chai_use( require( 'chai-as-promised' ) );
-describe( 'TokenStore', () =>
+describe( 'PersistentTokenStore', () =>
{
// required via the ctor, but this name is just used to denote that it's
// not used for a particular test