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 unit test for updated field in report_service_test.dart #128
"All new business logic should have corresponding unit tests."
Description
This PR adds a new unit test for the "title" field in the getViolation method of the ReportService class in the report_service_test.dart file. The test ensures that the getViolation method returns a TrafficViolation object with the correct "title" field value when the HTTP call completes successfully.
Summary of Changes
Added a new test case for the "title" field in the getViolation should return a TrafficViolation when the http call completes successfully test.
Updated the expected values to match the new business logic introduced in the code changes.
Please review and merge this PR to ensure proper test coverage for the updated field in the ReportService class.
PR Feedback (click)
I created this PR to address this rule:
"All new business logic should have corresponding unit tests."
Description
This PR adds a new unit test for the "title" field in the
getViolation
method of theReportService
class in thereport_service_test.dart
file. The test ensures that thegetViolation
method returns aTrafficViolation
object with the correct "title" field value when the HTTP call completes successfully.Summary of Changes
getViolation should return a TrafficViolation when the http call completes successfully
test.Please review and merge this PR to ensure proper test coverage for the updated field in the
ReportService
class.