Skip to content

Commit 714638c

Browse files
committed
add test for hooks
1 parent 1c3559c commit 714638c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugins/hooks/tests.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,16 @@ describe('Testing Hooks', function() {
136136
done();
137137
});
138138
});
139+
it('should fail to fetch hook details with invalid hook ID', function(done) {
140+
const invalidHookId = "invalid-id"; // Invalid hook ID
141+
request.get(getRequestURL('/o/hook/list') + '&id=' + invalidHookId)
142+
.expect(404) // Not found error for invalid hook ID
143+
.end(function(err, res) {
144+
// Test response
145+
res.body.should.have.property('hooksList').which.is.an.Array().and.have.lengthOf(0);
146+
done();
147+
});
148+
});
139149
});
140150

141151

0 commit comments

Comments
 (0)