A platform, 'Traffic-Violation-Report-System', enabling users in Taiwan to upload and share responses from law enforcement to traffic violations. This system aims for greater transparency in traffic law enforcement. It utilises Django for backend and Flutter for a separated frontend web development.
GNU Affero General Public License v3.0
0
stars
0
forks
source link
[Sweep Rules] Add Missing Unit Tests for New Business Logic #121
"All new business logic should have corresponding unit tests."
Description
This PR addresses the issue of missing unit tests for new business logic in the services directory of the repository. The missing unit tests are for the ReportService and AuthService classes. The ReportService class is responsible for creating, retrieving, updating, and deleting traffic violation reports, while the AuthService class handles user authentication and account management.
Summary of Changes
Added unit tests for the ReportService class in the test/services/report_service_test.dart file.
Added unit tests for the AuthService class in the test/services/auth_service_test.dart file.
These unit tests cover all methods and functionalities of the respective classes, including both successful and failure scenarios.
No modifications were required in the macos/Runner.xcodeproj/project.pbxproj and windows/runner/CMakeLists.txt files for adding the unit tests.
Please review and merge this PR to ensure proper test coverage for the new business logic in the services directory.
PR Feedback (click)
I created this PR to address this rule:
"All new business logic should have corresponding unit tests."
Description
This PR addresses the issue of missing unit tests for new business logic in the
services
directory of the repository. The missing unit tests are for theReportService
andAuthService
classes. TheReportService
class is responsible for creating, retrieving, updating, and deleting traffic violation reports, while theAuthService
class handles user authentication and account management.Summary of Changes
ReportService
class in thetest/services/report_service_test.dart
file.AuthService
class in thetest/services/auth_service_test.dart
file.These unit tests cover all methods and functionalities of the respective classes, including both successful and failure scenarios.
No modifications were required in the
macos/Runner.xcodeproj/project.pbxproj
andwindows/runner/CMakeLists.txt
files for adding the unit tests.Please review and merge this PR to ensure proper test coverage for the new business logic in the
services
directory.