I am writing the TDD for one of the application.and I need to mock the Ldap auth, I have researched but didn't find any useful link. Can any one gives a head start that would be great
Asked
Active
Viewed 432 times
0
-
1There is way too little information in your answer to help you out, but try these two questions. They seem very similar and the answers should be able to bring you further: https://stackoverflow.com/q/44257933/200987 https://stackoverflow.com/q/44528082/200987 Upvote if you find it helpful. – oligofren Jun 15 '17 at 08:47
-
1By the way, I think testing at the level network requests is testing the wrong abstraction. You should rather be stubbing out the actual `ldap` library. Try either using dependency injection or link seams. This might help you understand the general concept: https://stackoverflow.com/a/44482001/200987 It will make your tests far less brittle – oligofren Jun 15 '17 at 08:50
-
@oligofren Thanks for your reply. Let me try by ur comments and found some link https://stackoverflow.com/questions/28413700/mock-a-class-method-using-mockery-and-sinon – Vivek G.S Jun 21 '17 at 05:46