-
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 GetReadNotificationsActionTest #13220
base: master
Are you sure you want to change the base?
Conversation
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.
LGTM but do consider the changes!
|
||
@Test | ||
protected void testExecute_getReadNotificationsAsInstructor_shouldSucceed() { | ||
InstructorAttributes instructor = typicalBundle.instructors.get("instructor1OfCourse1"); |
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.
It looks like typicalBundle.instructors.get("instructor1OfCourse1")
is related to the Google Datastore pre-migration. Would it be better to create the InstructorStub manually instead?
loginAsInstructor(instructor.getGoogleId()); | ||
|
||
List<NotificationAttributes> notificationAttributesList = List.of( | ||
typicalBundle.notifications.get("notification1"), |
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.
Should typicalBundle be used here as well? This seems related to the previous comment.
|
||
readNotificationsData.forEach(notificationId -> | ||
assertTrue(testNotificationIds.contains(UUID.fromString(notificationId)))); | ||
assertEquals(2, readNotificationsData.size()); |
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.
Aside from a few minor nits mentioned, the code is well-structured and effectively accomplishes its purpose!
Part of #12048
Outline of Solution
Added the unit tests for GetReadNotificationsActionTest for PostgreSQL.