-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Unit Tests
oguzpancuk edited this page Dec 20, 2024
·
1 revision
- Description: Tests registration of a user with valid credentials.
- Input: Valid username, email, and password.
- Expected Output: Status 201, user is created, and a confirmation email is sent.
- Result: Pass
- Description: Tests registration with missing/invalid credentials.
- Input: Missing username, invalid email, short password.
- Expected Output: Status 400, no user is created.
- Result: Pass
- Description: Tests email verification with a valid token.
- Input: Valid JWT token.
- Expected Output: Status 200, user email marked as verified.
- Result: Pass
- Description: Tests email verification with an expired token.
- Input: Expired JWT token.
- Expected Output: Status 400, error "Activation Expired."
- Result: Pass
- Description: Tests email verification with an invalid token.
- Input: Invalid JWT token string.
- Expected Output: Status 400, error "Invalid token."
- Result: Pass
- Description: Tests email verification for a user already verified.
- Input: Valid JWT token for an already verified user.
- Expected Output: Status 400, error "Email already verified."
- Result: Pass
- Description: Tests login and token retrieval with valid credentials.
- Input: Valid username and password.
- Expected Output: Status 200, access and refresh tokens returned.
- Result: Pass
- Description: Tests login with incorrect credentials.
- Input: Valid username, incorrect password.
- Expected Output: Status 401, error message returned.
- Result: Pass
- Description: Tests retrieving a list of users.
- Input: None.
- Expected Output: Status 200, list of users.
- Result: Pass
- Description: Tests retrieving a specific user's details.
- Input: User ID.
- Expected Output: Status 200, user details.
- Result: Pass
- Description: Tests creating a new user.
- Input: Valid user data.
- Expected Output: Status 201, user is created.
- Result: Pass
- Description: Tests updating an existing user's details.
- Input: User ID and updated data.
- Expected Output: Status 200, user details updated.
- Result: Pass
- Description: Tests deleting an existing user.
- Input: User ID.
- Expected Output: Status 204, user is deleted.
- Result: Pass
- Description: Tests retrieving user by username.
- Input: Username.
- Expected Output: Status 200, user details returned.
- Result: Pass
- Description: Tests retrieving user by a nonexistent username.
- Input: Username.
- Expected Output: Status 404, error "User not found."
- Result: Pass
- Description: Tests retrieving a list of profiles.
- Input: None.
- Expected Output: Status 200, list of profiles.
- Result: Pass
- Description: Tests retrieving a specific user's profile.
- Input: Profile ID.
- Expected Output: Status 200, profile details.
- Result: Pass
- Description: Tests updating a user's profile.
- Input: Profile ID and updated data.
- Expected Output: Status 200, profile details updated.
- Result: Pass
- Description: Tests deleting a user's profile.
- Input: Profile ID.
- Expected Output: Status 204, profile deleted.
- Result: Pass
- Description: Tests following a user.
- Input: Username of the user to follow.
- Expected Output: Status 200, success message returned.
- Result: Pass
- Description: Tests following a user already followed.
- Input: Username of the user already followed.
- Expected Output: Status 400, error "Already following this user."
- Result: Pass
- Description: Tests following a nonexistent user.
- Input: Username of a nonexistent user.
- Expected Output: Status 404, error "User not found."
- Result: Pass
- Description: Tests unfollowing a user.
- Input: Username of the user to unfollow.
- Expected Output: Status 200, success message returned.
- Result: Pass
- Description: Tests unfollowing a user not currently followed.
- Input: Username of the user not followed.
- Expected Output: Status 400, error "You are not following this user."
- Result: Pass
- Description: Tests unfollowing a nonexistent user.
- Input: Username of a nonexistent user.
- Expected Output: Status 404, error "User not found."
- Result: Pass
- Description: Tests retrieving a list of portfolios for a logged-in user.
- Input: None.
- Expected Output: Status 200, list of portfolios for the user.
- Result: Pass
- Description: Tests retrieving a list of posts.
- Input: None.
- Expected Output: Status 200, list of posts.
- Result: Pass
- Description: Tests retrieving a specific post by ID.
- Input: Post ID.
- Expected Output: Status 200, post details.
- Result: Pass
- Description: Tests deleting a specific post by ID.
- Input: Post ID.
- Expected Output: Status 204, post deleted.
- Result: Pass
- Description: Tests retrieving a list of currencies.
- Input: None.
- Expected Output: Status 200, list of currencies.
- Result: Pass
- Description: Tests creating a new currency with valid data.
- Input: Valid currency data.
- Expected Output: Status 201, currency created.
- Result: Pass
- Description: Tests creating a currency with invalid data.
- Input: Invalid currency data.
- Expected Output: Status 400, validation error.
- Result: Pass
- Description: Tests retrieving a specific currency by ID.
- Input: Currency ID.
- Expected Output: Status 200, currency details.
- Result: Pass
- Description: Tests updating an existing currency.
- Input: Currency ID and updated data.
- Expected Output: Status 200, currency details updated.
- Result: Pass
- Description: Tests deleting a specific currency by ID.
- Input: Currency ID.
- Expected Output: Status 204, currency deleted.
- Result: Pass
- Description: Tests retrieving a list of stocks.
- Input: None.
- Expected Output: Status 200, list of stocks.
- Result: Pass
- Description: Tests retrieving a specific stock by ID.
- Input: Stock ID.
- Expected Output: Status 200, stock details.
- Result: Pass
- Description: Tests creating a new stock with valid data.
- Input: Valid stock data.
- Expected Output: Status 201, stock created.
- Result: Pass
- Description: Tests creating a stock with invalid data.
- Input: Invalid stock data.
- Expected Output: Status 400, validation error.
- Result: Pass
- Description: Tests updating an existing stock.
- Input: Stock ID and updated data.
- Expected Output: Status 200, stock details updated.
- Result: Pass
- Description: Tests deleting a specific stock by ID.
- Input: Stock ID.
- Expected Output: Status 204, stock deleted.
- Result: Pass
- Description: Tests searching for stocks by a pattern.
- Input: Pattern and limit.
- Expected Output: Status 200, matching stocks returned.
- Result: Pass
- Description: Tests creating a new annotation with valid data.
- Input: Valid annotation data including body, target, and creator.
- Expected Output: Status 201, annotation is created with correct source.
- Result: Pass
- Description: Tests retrieving annotations by the specified source ID.
- Input: Source ID of an existing annotation.
- Expected Output: Status 200, annotations for the given source returned.
- Result: Pass
- Description: Tests retrieving annotations when no annotations exist for the specified source.
- Input: Nonexistent source ID.
- Expected Output: Status 404, error message "No annotations found for the specified source."
- Result: Pass
- Lab Report #1,24.09.2024
- Lab Report #2,01.10.2024
- Lab Report #3,08.10.2024
- Lab Report #4,15.10.2024
- Lab Report #5,06.11.2024
- Lab Report #9,10.12.2024
- 1st Meeting, 24.09.2024
- 2nd Meeting, 01.10.2024
- 3rd Meeting, 08.10.2024
- 4th Meeting, 15.10.2024
- 5th Meeting, 06.11.2024
- 8th Meeting, 03.12.2024
- 1st Meeting, 03.10.2024
- 2nd Meeting, 10.10.2024
- 3rd Meeting, 17.10.2024
- 4th Meeting, 19.10.2024
- 5th Meeting, 24.10.2024
- 6th Meeting, 02.11.2024
- 8th Meeting, 15.11.2024
- 9th Meeting, 28.11.2024
- 10th Meeting, 04.12.2024
- 11th Meeting, 12.12.2024
- Halil İbrahim Kasapoğlu
- Rukiye Aslan
- Kamil Deniz Coşkuner
- Mahmut Buğra Mert
- Furkan Şenkal
- Muhammed Erkam Gökcepınar
- Cem Güngör
- Oğuz Pançuk
Orkun Mahir Kılıç
SemanticFlix Archieve
- 1st Meeting,19.02.2024
- 2nd Meeting,21.02.2024
- 3rd Meeting,03.03.2024
- 4th Meeting,07.03.2024
- 5th Meeting,10.03.2024
- 6th Meeting,14.03.2024
- 7th Meeting,21.03.2024
- 8th Meeting,01.04.2024
- 9th Meeting,17.04.2024
- 10th Meeting,18.04.2024
- 11th Meeting,25.04.2024
- 12th Meeting,02.05.2024
- 13th Meeting,09.05.2024
- Halil İbrahim Kasapoğlu (Communicator)
- Rukiye Aslan
- Kamil Deniz Coşkuner
- Mahmut Buğra Mert
- İrem Nur Yıldırım
- Furkan Şenkal
- Muhammed Erkam Gökcepınar
- Osman Yasin Baştuğ
Okay DemirSait Hızlı