@@ -5,9 +5,9 @@ import testUser from './fixtures/user.json';
55import { assertSuccessful , assertArray } from './helpers/callbacks' ;
66import getTestRepoName from './helpers/getTestRepoName' ;
77
8- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
98describe ( 'Organization' , function ( ) {
109 let github ;
10+ const ORG_NAME = 'github-tools' ;
1111
1212 before ( function ( ) {
1313 github = new Github ( {
@@ -22,12 +22,24 @@ describe('Organization', function() {
2222 let organization ;
2323
2424 before ( function ( ) {
25- organization = github . getOrganization ( 'openaddresses' ) ;
25+ organization = github . getOrganization ( ORG_NAME ) ;
2626 } ) ;
2727
2828 it ( 'should show user\'s organisation repos' , function ( done ) {
2929 organization . getRepos ( assertArray ( done ) ) ;
3030 } ) ;
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+ } ) ;
3143 } ) ;
3244
3345 describe ( 'creating/updating' , function ( ) {
@@ -44,14 +56,14 @@ describe('Organization', function() {
4456 description : 'test create organization repo' ,
4557 homepage : 'https://github.com/' ,
4658 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
5062 } ;
5163
5264 organization . createRepo ( options , assertSuccessful ( done , function ( err , repo ) {
5365 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
5567 done ( ) ;
5668 } ) ) ;
5769 } ) ;
0 commit comments