Skip to content

Commit 9b44ca3

Browse files
author
Emmanouil Konstantinidis
committed
More mocking
1 parent 89750d8 commit 9b44ca3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/js/__tests__/components/login.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@ describe('Test for Login Component', function () {
2222
return;
2323
},
2424
webContents: {
25-
on: function () {
26-
return;
25+
on: function (event, callback) {
26+
27+
if (event == 'did-get-redirect-request') {
28+
callback({
29+
event: 'did-get-redirect-request',
30+
oldUrl: 'http://www.github.com/?code=123123123',
31+
newUrl: 'http://www.github.com/?code=123123123'
32+
});
33+
}
34+
2735
}
2836
},
2937
on: function () {

0 commit comments

Comments
 (0)