-
Notifications
You must be signed in to change notification settings - Fork 5
test: add test for dataset controller. #1314
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development #1314 +/- ##
=================================================
+ Coverage 55.61% 56.63% +1.02%
Complexity 2268 2268
=================================================
Files 207 207
Lines 8730 8733 +3
=================================================
+ Hits 4855 4946 +91
+ Misses 3875 3787 -88
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive feature tests for the Dataset controller and simplifies the public dataset route. The changes improve test coverage for dataset viewing, NMRium data management, versioning, and snapshot functionality, while also streamlining the route structure.
Key Changes:
- Added 11 feature tests covering dataset controller endpoints including public/private access, NMRium info operations, versioning, and snapshot storage
- Simplified public dataset route from
datasets/{owner}/{slug}todatasets/{slug} - Refactored controller authorization logic to return JSON 401 response for private datasets instead of not rendering them
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 16 comments.
| File | Description |
|---|---|
| tests/Feature/DatasetTest.php | New test file with comprehensive coverage for dataset controller endpoints, including public/private access, NMRium data operations, version tracking, and SVG snapshot storage |
| routes/web.php | Simplified public dataset route by removing the {owner} parameter from the URL pattern |
| app/Http/Controllers/DatasetController.php | Refactored authorization logic to return explicit JSON 401 response for non-public datasets instead of conditional rendering |
No description provided.