-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adds test coverage for commands and project api routes #275
Conversation
…ses coverage from 34.1% -> 45.7%.
…reases coverage from 45.7% -> 52.2%.
- Swap the withoutWrapping call in favor of setting the static property wrap. Calling self::withoutWrapping will remove the data wrapper for ALL json resources, not just the ProjectResource used in the web routes.
So it looks like the secrets from a forked repo can't be used when running the test action here... would love a hand to see the best way to get this to green. |
Updated the PR with the latest changes from #276 and we are indeed green here! Thanks so much for making that change to get this PR through! |
Hey @driftingly - just as a reminder, I don't have write access so feel free to merge when you're ready :) |
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.
Thanks @omarrida 🙌
Thanks again for all the help here! |
Adds the following test cases:
Commands:
CreateProjectSnapshotsTest
FetchGitHubProjectsTest
FetchProjectStatsTest
OutputStatsTest
SendStatsToSlackTest
API routes:
GetProjectsTest
ShowProjectTest
Also makes some minor changes:
CachedProjectList
.FetchProjectStats
to make it easier to assert their values when testing.ProjectResource
because the previous approach actually removes wrapping fromJsonResource
affecting all json resources.getKey()
method on theOrgSlack
notifiable to allow testing usingNotification::fake()
.All test cases passing with these changes and linter is green. Happy to make any changes that you see fit in order to get this merged.