diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2019-10-07 14:17:58 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2019-10-07 14:17:58 +0000 |
| commit | 7448fe54c582f1c2535c3a41bfb51ac4e00161a6 (patch) | |
| tree | 128adbd5c97633d83b33ef9d18b4cf39ef8a36a9 /spec | |
| parent | Merge branch 'master' into ba (diff) | |
| download | mmm-7448fe54c582f1c2535c3a41bfb51ac4e00161a6.tar.gz mmm-7448fe54c582f1c2535c3a41bfb51ac4e00161a6.zip | |
SQL import and loading
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/driver_spec.moon | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/driver_spec.moon b/spec/driver_spec.moon index 60cd574..379dcac 100644 --- a/spec/driver_spec.moon +++ b/spec/driver_spec.moon @@ -1,4 +1,4 @@ -import TreeStore from require 'mmm.mmmfs.drivers.sql' +import SQLStore from require 'mmm.mmmfs.drivers.sql' sort2 = (a, b) -> {ax, ay}, {bx, by} = a, b @@ -11,7 +11,7 @@ toseq2 = (iter) -> with v = [{x, y} for x, y in iter] describe "sql driver", -> randomize false - ts = TreeStore! + ts = SQLStore memory: true it "starts out empty", -> assert.are.same {}, toseq ts\list_fileders_in! @@ -22,12 +22,14 @@ describe "sql driver", -> ts\create_fileder '/hello', 'world' it "can create root fileders", -> - ts\create_fileder nil, 'hello' + assert.are.same '/hello', ts\create_fileder '', 'hello' assert.are.same {'/hello'}, toseq ts\list_all_fileders! it "can create and list child fileders recursively", -> - ts\create_fileder '/hello', 'world' - ts\create_fileder '/hello/world', 'again' + assert.are.same '/hello/world', + ts\create_fileder '/hello', 'world' + assert.are.same '/hello/world/again', + ts\create_fileder '/hello/world', 'again' assert.are.same {'/hello', '/hello/world', '/hello/world/again'}, toseq ts\list_all_fileders! |
