-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3bf6ae
commit 90a7186
Showing
6 changed files
with
62 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,5 +119,62 @@ describe('Test LMS Application', () => { | |
}); | ||
|
||
}); | ||
describe('Student Features Test Suite', () => { | ||
test('should student allow a user to sign up ', async () => { | ||
const response = await request(app) | ||
.post('/user') | ||
.send({ | ||
name: 'John Doe', | ||
email: '[email protected]', | ||
password: 'password123', | ||
role: 'student', | ||
}); | ||
|
||
expect(response.statusCode).toBe(302); // Redirect after successful signup | ||
}); | ||
test('should student allow enroll in a course', async () => { | ||
const courseId = 'your-course-id'; | ||
const response = await request(app) | ||
.post(`/enrollCourse/${courseId}`) | ||
|
||
expect(response.statusCode).toBe(302); // Redirect after successful signup | ||
|
||
}); | ||
test('should student allow mark a page as completed ', async () => { | ||
const pageId = 1; | ||
const response = await request(app) | ||
.post(`/completePage/${pageId}`) | ||
|
||
expect(response.statusCode).toBe(302); | ||
|
||
}); | ||
test('User can signout of application ', async () => { | ||
|
||
const response = await request(app) | ||
.get('/signout') | ||
|
||
expect(response.statusCode).toBe(302); | ||
|
||
}); | ||
}); | ||
|
||
}); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters