Skip to content

Commit 8e9ea58

Browse files
committed
logout tested and added
Signed-off-by: TG1999 <[email protected]>
1 parent e263bcf commit 8e9ea58

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

.DS_Store

8 KB
Binary file not shown.

config/credential.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
clientID: "192695093229-kf95jtdv1jge25d86ak99e68dkrpu33o.apps.googleusercontent.com",
44
clientSecret: "rXvfxBahDlJF1ORk7y660XM8"
55
},
6-
database: 'YOUR MONGODB URL',
6+
database: 'mongodb://localhost:27017',
77
github: {
88
clientID: 'c9afdb238ed98b213912',
99
clientSecret: '3031efea8badea1381da682fd5f21e88e5a15d2f'

tests/controller_test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ describe('controllers', () => {
3838
.post('/auth/userlogin')
3939
.send({
4040
fname: 'tushar',
41+
4142
lname: 'goel',
4243
dob: '29/08/1999',
4344
github: 'TG1999',
@@ -47,4 +48,11 @@ describe('controllers', () => {
4748
.expect(200)
4849
.expect(/Codeuino/, done);
4950
});
51+
it('logout user', done => {
52+
request(server)
53+
.get('/auth/logout')
54+
.expect(302)
55+
.expect('Found. Redirecting to /', done);
56+
});
57+
5058
});

views/other-landing.ejs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
<li class="nav-item">
6969
<a class="nav-link" href="/profile/submitProject">Publish</a>
7070
</li>
71+
<li class="nav-item">
72+
<a class="nav-link" href="/auth/logout">Logout</a>
73+
</li>
7174
</ul>
7275
</ul>
7376
</div>

0 commit comments

Comments
 (0)