-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[#12048] Migrate tests for CreateNotificationActionTest #13209
base: master
Are you sure you want to change the base?
Conversation
Hi @InfinityTwo, thank you for your interest in contributing to TEAMMATES!
Please address the above before we proceed to review your PR. |
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 for the PR, just need some auth/access control tests to be added. Good work!
return req; | ||
} | ||
|
||
} |
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.
add some access control tests as well
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.
just to add on, i believe the old tests do some authentication (i.e. loginAsAdmin
or loginAsInstructor
, would be good to carry over that logic where possible
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 for the catch, I've added the access control tests 😄
Part of #12048
Outline of Solution
Added the unit tests for CreateNotificationActionTest for PostgreSQL.
However, two of the tests (
testExecute_addNotification_success()
andtestExecute_invalidParameter_throwsInvalidHttpParameterException()
) that fails are disabled, which is inline with the originally disabled tests since it did not work in the first place. The goal here for now was to migrate the code without changing functionality.