Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add test for .members

  • Loading branch information...
commit 05aa683dbf033a56dcc7061b5af477537ddc9085 1 parent 976eb74
@chakrit chakrit authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 test/groups-test.js
View
10 test/groups-test.js
@@ -13,7 +13,7 @@ var Tom = group('tom')
test('test all the things', function (t) {
- t.plan(98)
+ t.plan(100)
Tom.membership.add('anonymous', function (error, result) {
t.deepEqual(error, null, 'error should be null')
@@ -163,6 +163,10 @@ test('test all the things', function (t) {
t.deepEqual(result.sort(), [ 'javascript', 'nodejs', 'otherGroup', 'anonymous', 'admin', 'one', 'two' ].sort(), 'result should be the same')
})
+ nodejs.members.has(javascript, function (error, result) {
+ t.notOk(result, 'result should be falsy')
+ })
+
nodejs.members.add(javascript, function (error, result) {
t.deepEqual(error, null, 'error should be null')
t.deepEqual(result, [ 1, 1 ], 'result should be the same')
@@ -172,6 +176,10 @@ test('test all the things', function (t) {
})
})
+ nodejs.members.has(javascript, function (error, result) {
+ t.ok(result, 'result should be truthy')
+ })
+
javascript.members.all(function (error, result) {
t.deepEqual(error, null, 'error should be null')
t.deepEqual(result.sort(), [ 'tom', 'bob', 'bill' ].sort(), 'result should be the same')
Please sign in to comment.
Something went wrong with that request. Please try again.