Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1535 Tests for Post services.dart #2103

Merged

Conversation

AyushRaghuvanshi
Copy link
Contributor

What kind of change does this PR introduce?

Wrote tests for post_services.dart

Issue Number:

Fixes #1535

Did you add tests for your changes?

Yes

Summary
Added Tests for the file lib\services\post_service.dart.

Does this PR introduce a breaking change?
No

Have you read the contributing guide?
Yes

Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if either of these two conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

Other

🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.

@noman2002
Copy link
Member

@AyushRaghuvanshi Fix the failing test.

@AyushRaghuvanshi
Copy link
Contributor Author

@noman2002 It was not failing on my system. But the error seemed like, tests are trying to access the resource at the same time.
isar/#942 But i found this issue, which suggested to add deleteFromDisk() which i have added wherever the Hive is used.

@noman2002
Copy link
Member

@AyushRaghuvanshi The test is failing in this PR only. It is working fine in other. Please look into it.

Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b548497) 76.43% compared to head (3f0073f) 76.88%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2103      +/-   ##
===========================================
+ Coverage    76.43%   76.88%   +0.45%     
===========================================
  Files          152      152              
  Lines         7438     7438              
===========================================
+ Hits          5685     5719      +34     
+ Misses        1753     1719      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@noman2002 noman2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@palisadoes palisadoes merged commit a8128c4 into PalisadoesFoundation:develop Nov 17, 2023
palisadoes pushed a commit to palisadoes/talawa that referenced this pull request Jan 10, 2024
…oesFoundation#2103)

* Add:Tests for post_service.dart

* Fix: Format

* Fix: lint issues

* Add:Fixed Format

* Add:Hive.deleteFromDisk() wherever Hive is used

* Remove: Unused Hive Box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test post_service.dart
3 participants