git ssb

0+

Dominic / ssb-peer-invites



Tree: 3f14a6dcd8d9c4cb8d9fa48e216e5c4c1e91d52a

Files: 3f14a6dcd8d9c4cb8d9fa48e216e5c4c1e91d52a / test / error-without-pubs.js

968 bytesRaw
1//WARNING: this test currently only passes
2//if the computer has a network.
3var crypto = require('crypto')
4var ssbKeys = require('ssb-keys')
5var tape = require('tape')
6var pull = require('pull-stream')
7
8var createSbot = require('ssb-server')
9 .use(require('ssb-links'))
10 .use({
11 name: 'replicate', version: '1.0.0',
12 manifest: { request: 'sync' },
13 init: function () {
14 return { request: function () {} }
15 }
16 })
17 .use(require('ssb-query'))
18 .use(require('ssb-device-address'))
19 .use(require('ssb-identities'))
20 .use(require('ssb-friends'))
21 .use(require('../'))
22
23var caps = require('./randcaps')()
24
25var alice = createSbot({
26 temp: true,
27 timeout: 1000,
28 port: 12342,
29 keys:ssbKeys.generate(),
30 caps: caps
31})
32
33tape('create an invite', function (t) {
34 //without the pubs option, do not allow creating
35 //an invite.
36 alice.peerInvites.create({}, function (err, invite) {
37 t.ok(err)
38 alice.close()
39 t.end()
40 })
41})
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

Built with git-ssb-web