Files: 3f14a6dcd8d9c4cb8d9fa48e216e5c4c1e91d52a / test / error-without-pubs.js
968 bytesRaw
1 | //WARNING: this test currently only passes |
2 | //if the computer has a network. |
3 | var crypto = require('crypto') |
4 | var ssbKeys = require('ssb-keys') |
5 | var tape = require('tape') |
6 | var pull = require('pull-stream') |
7 | |
8 | var 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 | |
23 | var caps = require('./randcaps')() |
24 | |
25 | var alice = createSbot({ |
26 | temp: true, |
27 | timeout: 1000, |
28 | port: 12342, |
29 | keys:ssbKeys.generate(), |
30 | caps: caps |
31 | }) |
32 | |
33 | tape('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