forked from bankonme/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.user.js
More file actions
81 lines (69 loc) · 1.72 KB
/
test.user.js
File metadata and controls
81 lines (69 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
'use strict';
var test = require('tape'); //jshint ignore:line
var Github = require("../");
var test_user = require('./user.json');
test("User API", function(t) {
var timeout = setTimeout(function () { t.fail(); }, 100000);
var github = new Github({
username: test_user.USERNAME,
password: test_user.PASSWORD,
auth: "basic"
});
var user = github.getUser();
t.test('user.orgs', function(q) {
user.orgs(function(err) {
q.error(err, 'user orgs');
q.end();
});
});
t.test('user.gists', function(q) {
user.gists(function(err) {
q.error(err, 'user gists');
q.end();
});
});
t.test('user.notifications', function(q) {
user.notifications(function(err) {
q.error(err, 'user notifications');
q.end();
});
});
t.test('user.show', function(q) {
user.show('ingalls', function(err) {
q.error(err, 'user show');
q.end();
});
});
t.test('user.userRepos', function(q) {
user.userRepos(test_user.USERNAME, function(err) {
q.error(err, 'alt user repos');
q.end();
});
});
t.test('user.userGists', function(q) {
user.userGists(test_user.USERNAME, function(err) {
q.error(err, 'alt user gists');
q.end();
});
});
t.test('user.orgRepos', function(q) {
user.orgRepos('openaddresses', function(err) {
q.error(err, 'org users');
q.end();
});
});
t.test('user.follow', function(q) {
user.follow('ingalls', function(err) {
q.error(err, 'follow ingalls');
q.end();
});
});
t.test('user.unfollow', function(q) {
user.unfollow('ingalls', function(err) {
q.error(err, 'unfollow ingalls');
q.end();
});
});
clearTimeout(timeout);
t.end();
});