Browse Source

Merge branch 'get-set-additional-options' of ssh://ledger-git.dyne.org:2240/CoBox/cobox-config into get-set-additional-options

Kieran Gibb 2 years ago
parent
commit
2236ad4166
No account linked to committer's email address
1 changed files with 11 additions and 11 deletions
  1. 11
    11
      test/index.test.js

+ 11
- 11
test/index.test.js View File

@@ -38,13 +38,13 @@ describe('options', (context) => {
38 38
   })
39 39
 
40 40
   context('get', (assert, next) => {
41
-    var config = Config(storage.path)
41
+    var config = Config(storage)
42 42
     assert.same(config.options.get('mount'), '/cobox', 'mount defaults to /cobox')
43 43
     next()
44 44
   })
45 45
 
46 46
   context('set', (assert, next) => {
47
-    var config = Config(storage.path)
47
+    var config = Config(storage)
48 48
     config.options.set('mount', './mnt')
49 49
     assert.same(config._options['mount'], './mnt', 'sets mount option to ./mnt')
50 50
     config.save()
@@ -153,7 +153,7 @@ describe('del', (context) => {
153 153
   })
154 154
 
155 155
   context('deletes relevant entry using buffers', (assert, next) => {
156
-    var config = Config(storage.path)
156
+    var config = Config(storage)
157 157
     var group = crypto.unpack(crypto.accessKey())
158 158
     var identity = crypto.keyPair()
159 159
 
@@ -166,13 +166,13 @@ describe('del', (context) => {
166 166
     config.groups.delete(group.publicKey)
167 167
     config.identities.delete(identity.publicKey)
168 168
 
169
-    assert.same(config.groups.list(), [], 'deld the group')
170
-    assert.same(config.identities.list(), [], 'deld the identity')
169
+    assert.same(config.groups.list(), [], 'deleted the group')
170
+    assert.same(config.identities.list(), [], 'deleted the identity')
171 171
     next()
172 172
   })
173 173
 
174 174
   context('deletes relevant entry using buffers', (assert, next) => {
175
-    var config = Config(storage.path)
175
+    var config = Config(storage)
176 176
     var group = crypto.unpack(crypto.accessKey())
177 177
     var identity = crypto.keyPair()
178 178
 
@@ -185,13 +185,13 @@ describe('del', (context) => {
185 185
     config.groups.delete(group.publicKey.toString('hex'))
186 186
     config.identities.delete(identity.publicKey.toString('hex'))
187 187
 
188
-    assert.same(config.groups.list(), [], 'deld the group')
189
-    assert.same(config.identities.list(), [], 'deld the identity')
188
+    assert.same(config.groups.list(), [], 'deleted the group')
189
+    assert.same(config.identities.list(), [], 'deleted the identity')
190 190
     next()
191 191
   })
192 192
 
193 193
   context('deletes relevant entry using names', (assert, next) => {
194
-    var config = Config(storage.path)
194
+    var config = Config(storage)
195 195
     var group = Object.assign({ name: 'group-a' }, crypto.unpack(crypto.accessKey()))
196 196
     var identity = Object.assign({ name: 'Alice' }, crypto.keyPair())
197 197
 
@@ -210,8 +210,8 @@ describe('del', (context) => {
210 210
     config.save()
211 211
     config.load()
212 212
 
213
-    assert.same(config.groups.list(), [], 'deld the group')
214
-    assert.same(config.identities.list(), [], 'deld the identity')
213
+    assert.same(config.groups.list(), [], 'deleted the group')
214
+    assert.same(config.identities.list(), [], 'deleted the identity')
215 215
     next()
216 216
   })
217 217
 })