Skip to content

Commit 0ce45ff

Browse files
author
Dennis Falling
committed
fixed hook tests
1 parent 8504e46 commit 0ce45ff

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

test/hook.test.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ describe('hook.test.js', function () {
5050
it('should return a hook', function* () {
5151
var hook = yield client.thunk.hooks.get({ id: client.id, hook_id: hookId });
5252
hook.id.should.equal(hookId);
53-
hook.should.have.keys('id', 'url', 'created_at', 'project_id',
54-
'push_events', 'issues_events', 'merge_requests_events', 'tag_push_events');
53+
hook.should.have.keys('id', 'url', 'created_at', 'project_id', 'push_events',
54+
'issues_events', 'merge_requests_events', 'tag_push_events', 'note_events',
55+
'build_events', 'enable_ssl_verification');
5556
hook.push_events.should.be.a.Boolean;
5657
});
5758
});
@@ -62,7 +63,9 @@ describe('hook.test.js', function () {
6263
hooks.length.should.above(0);
6364
var hook = hooks[0];
6465
hook.should.have.keys('id', 'url', 'created_at', 'project_id',
65-
'push_events', 'issues_events', 'merge_requests_events', 'tag_push_events');
66+
'push_events', 'issues_events', 'merge_requests_events',
67+
'tag_push_events', 'note_events', 'build_events',
68+
'enable_ssl_verification');
6669
});
6770
});
6871

@@ -104,8 +107,11 @@ describe('hook.test.js', function () {
104107

105108
yield client.thunk.hooks.remove({id: client.id, hook_id: hook.id});
106109

107-
var hook = yield client.thunk.hooks.get({id: client.id, hook_id: hook.id});
108-
should.not.exist(hook);
110+
try {
111+
var hook = yield client.thunk.hooks.get({id: client.id, hook_id: hook.id});
112+
} catch (err) {
113+
err.name.should.equal('Gitlab404Error');
114+
}
109115
});
110116
});
111117
});

0 commit comments

Comments
 (0)