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 tests for new business logic in social_service.dart #133
"All new business logic should have corresponding unit tests."
Description
This PR adds unit tests for the new business logic introduced in the getConnectedAccounts, getAvailableProviders, disconnectAccount, and connectWithProvider methods in the lib/services/social_service.dart file. The unit tests are added in the test/services/social_service_test.dart file and cover different scenarios and handle any exceptions that may occur.
Summary of Changes
Created a new file test/services/social_service_test.dart to add unit tests for the methods in lib/services/social_service.dart.
Modified the existing unit tests in test/services/social_service_test.dart to include tests for the getConnectedAccounts, getAvailableProviders, disconnectAccount, and connectWithProvider methods.
Added test cases to cover different scenarios and handle exceptions.
Referenced the necessary files, imports, and entity names from lib/services/social_service.dart.
Please review and merge this PR once the tests pass.
PR Feedback (click)
I created this PR to address this rule:
"All new business logic should have corresponding unit tests."
Description
This PR adds unit tests for the new business logic introduced in the
getConnectedAccounts
,getAvailableProviders
,disconnectAccount
, andconnectWithProvider
methods in thelib/services/social_service.dart
file. The unit tests are added in thetest/services/social_service_test.dart
file and cover different scenarios and handle any exceptions that may occur.Summary of Changes
test/services/social_service_test.dart
to add unit tests for the methods inlib/services/social_service.dart
.test/services/social_service_test.dart
to include tests for thegetConnectedAccounts
,getAvailableProviders
,disconnectAccount
, andconnectWithProvider
methods.lib/services/social_service.dart
.Please review and merge this PR once the tests pass.