-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactor Company Application Status #349
base: develop
Are you sure you want to change the base?
Conversation
Your Render PR Server URL is https://nijobs-backend-pr-349.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cnotltqcn0vc73d8h7bg. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #349 +/- ##
===========================================
+ Coverage 90.34% 90.35% +0.01%
===========================================
Files 54 54
Lines 1470 1473 +3
Branches 246 245 -1
===========================================
+ Hits 1328 1331 +3
Misses 137 137
Partials 5 5 ☔ View full report in Codecov by Sentry. |
…h Application Status Enum - Tested "migration" of database (using the default value for ApplicationStatus) - Replaced the virtual ApplicationStatus field tests
29f88c7
to
fcd1f9a
Compare
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.
Seems to work as expected :)
Replaced the virtual state in company application with an enum.
Previously, the virtual state depended on whether the
rejectedAt
andapprovedAt
fields were defined. Now it is defined with an explicit enum instead of being a virtual field.I also had to define a default function for the application state enum depending on those same fields. With a simple default
PENDING
, migrating the database would cause approved/rejected applications to be seen as pending. This function makes the default value depend onapprovedAt
andrejectedAt
.Also replaced the tests related with the virtual state.
Closes #312