Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 26e573f

Browse files
committed
Merge pull request #24 from ariskemper/patch-1
Extending tests to cover other methods
2 parents b0e087d + 702d354 commit 26e573f

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

test/test.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ describe('helpers', function () {
1212

1313
describe('helpers.it', function() {
1414
['shouldBeAllowed',
15-
'shouldBeDenied']
15+
'shouldBeDenied',
16+
'shouldNotBeFound',
17+
'shouldBeAllowedWhenCalledAnonymously',
18+
'shouldBeDeniedWhenCalledAnonymously',
19+
'shouldBeAllowedWhenCalledUnauthenticated',
20+
'shouldBeDeniedWhenCalledUnauthenticated',
21+
'shouldBeAllowedWhenCalledByUser',
22+
'shouldBeDeniedWhenCalledByUser']
1623
.forEach(function(func) {
1724
it('should have a method named ' + func, function () {
1825
assert.equal(typeof helpers.it[func], 'function');
@@ -22,8 +29,11 @@ describe('helpers', function () {
2229

2330
describe('helpers.describe', function() {
2431
['staticMethod',
32+
'instanceMethod',
2533
'whenLoggedInAsUser',
26-
'whenCalledAnonymously']
34+
'whenCalledByUser',
35+
'whenCalledAnonymously',
36+
'whenCalledUnauthenticated']
2737
.forEach(function(func) {
2838
it('should have a method named ' + func, function () {
2939
assert.equal(typeof helpers.describe[func], 'function');
@@ -34,7 +44,10 @@ describe('helpers', function () {
3444
describe('helpers.beforeEach', function() {
3545
['withArgs',
3646
'givenModel',
37-
'givenUser']
47+
'givenUser',
48+
'givenLoggedInUser',
49+
'givenAnUnauthenticatedToken',
50+
'givenAnAnonymousToken']
3851
.forEach(function(func) {
3952
it('should have a helper method named ' + func, function () {
4053
assert.equal(typeof helpers.beforeEach[func], 'function');

0 commit comments

Comments
 (0)