@@ -5,9 +5,9 @@ import testUser from './fixtures/user.json';
5
5
import { assertSuccessful , assertArray } from './helpers/callbacks' ;
6
6
import getTestRepoName from './helpers/getTestRepoName' ;
7
7
8
- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
9
8
describe ( 'Organization' , function ( ) {
10
9
let github ;
10
+ const ORG_NAME = 'github-tools' ;
11
11
12
12
before ( function ( ) {
13
13
github = new Github ( {
@@ -22,12 +22,24 @@ describe('Organization', function() {
22
22
let organization ;
23
23
24
24
before ( function ( ) {
25
- organization = github . getOrganization ( 'openaddresses' ) ;
25
+ organization = github . getOrganization ( ORG_NAME ) ;
26
26
} ) ;
27
27
28
28
it ( 'should show user\'s organisation repos' , function ( done ) {
29
29
organization . getRepos ( assertArray ( done ) ) ;
30
30
} ) ;
31
+
32
+ it ( 'should list the users in the organization' , function ( done ) {
33
+ organization . listMembers ( )
34
+ . then ( function ( { data : members } ) {
35
+ expect ( members ) . to . be . an . array ( ) ;
36
+
37
+ let hasClayReimann = members . reduce ( ( found , member ) => member . login === 'clayreimann' || found , false ) ;
38
+ expect ( hasClayReimann ) . to . be . true ( ) ;
39
+
40
+ done ( ) ;
41
+ } ) . catch ( done ) ;
42
+ } ) ;
31
43
} ) ;
32
44
33
45
describe ( 'creating/updating' , function ( ) {
@@ -44,14 +56,14 @@ describe('Organization', function() {
44
56
description : 'test create organization repo' ,
45
57
homepage : 'https://github.com/' ,
46
58
private : false ,
47
- has_issues : true ,
48
- has_wiki : true ,
49
- has_downloads : true
59
+ has_issues : true , // jscs:ignore
60
+ has_wiki : true , // jscs:ignore
61
+ has_downloads : true // jscs:ignore
50
62
} ;
51
63
52
64
organization . createRepo ( options , assertSuccessful ( done , function ( err , repo ) {
53
65
expect ( repo . name ) . to . equal ( testRepoName ) ;
54
- expect ( repo . full_name ) . to . equal ( `${ testUser . ORGANIZATION } /${ testRepoName } ` ) ;
66
+ expect ( repo . full_name ) . to . equal ( `${ testUser . ORGANIZATION } /${ testRepoName } ` ) ; // jscs:ignore
55
67
done ( ) ;
56
68
} ) ) ;
57
69
} ) ;
0 commit comments