Skip to content

Commit 6ce711c

Browse files
author
Emmanouil Konstantinidis
committed
More tests
1 parent 9b44ca3 commit 6ce711c

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/js/__tests__/components/login.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@ describe('Test for Login Component', function () {
2525
on: function (event, callback) {
2626

2727
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-
});
28+
callback(
29+
'did-get-redirect-request',
30+
'http://www.github.com/?code=123123123',
31+
'http://www.github.com/?code=123123123'
32+
);
3333
}
3434

3535
}
3636
},
3737
on: function () {
3838
return;
39+
},
40+
close: function () {
41+
return;
3942
}
4043
};
4144
};
@@ -105,6 +108,12 @@ describe('Test for Login Component', function () {
105108
var instance = TestUtils.renderIntoDocument(<Login />);
106109
expect(instance.authGithub).toBeDefined();
107110

111+
// Prevent testing requestGithubToken
112+
// Tested in another case
113+
instance.requestGithubToken = function () {
114+
return;
115+
};
116+
108117
instance.authGithub();
109118

110119
});

0 commit comments

Comments
 (0)