Kieran Gibb 2 years ago
parent
commit
6adac7ae7c
No known key found for this signature in database
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      test/index.test.js

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

@@ -9,8 +9,8 @@ const proxyquire = require('proxyquire')
9 9
 const Kappa = require('kappa-core')
10 10
 const collect = require('collect-stream')
11 11
 const { encodings } = require('cobox-schemas')
12
-const StartBroadcast = encodings.broadcast.start
13
-const StopBroadcast = encodings.broadcast.stop
12
+const Announce = encodings.command.announce
13
+const Hide = encodings.command.hide
14 14
 const { tmp, cleanup } = require('./util')
15 15
 const Admin = require('../')
16 16
 
@@ -85,14 +85,14 @@ describe('cobox-admin: Admin', (context) => {
85 85
 
86 86
     await admin.ready()
87 87
 
88
-    await admin.log.publish(StartBroadcast.encode({
89
-      type: 'broadcast/start',
88
+    await admin.log.publish(Announce.encode({
89
+      type: 'command/announce',
90 90
       timestamp: Date.now(),
91 91
       author: admin.identity.publicKey.toString('hex')
92 92
     }))
93 93
 
94
-    await admin.log.publish(StopBroadcast.encode({
95
-      type: 'broadcast/stop',
94
+    await admin.log.publish(Hide.encode({
95
+      type: 'command/hide',
96 96
       timestamp: Date.now(),
97 97
       author: admin.identity.publicKey.toString('hex')
98 98
     }))
@@ -102,7 +102,7 @@ describe('cobox-admin: Admin', (context) => {
102 102
     let data = await admin.log.query({
103 103
       $filter: {
104 104
         value: {
105
-          type: { $in: ['broadcast/start', 'broadcast/stop'] },
105
+          type: { $in: ['command/announce', 'command/hide'] },
106 106
           timestamp: { $gt: 0 }
107 107
         }
108 108
       }