-
Notifications
You must be signed in to change notification settings - Fork 252
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
fix: Remove length constraint from organization external id lookup #597
fix: Remove length constraint from organization external id lookup #597
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.
I don't see any trace in the Zendesk documentation, nor in this repository history, explaining why this limitation was added.
I suppose it's therefore ok to lift it, but I'd like to have a test cover this use case.
@PierreBtz Thank you having a look at this! I added the test case when the external Id is empty. |
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.
Change looks good, I'd like for the test to be more precise in its assertion. Proposed something, please tell me what you think about it.
assertNotNull(resultOrganization); | ||
|
||
Iterable<Organization> or = instance.lookupOrganizationsByExternalId("i"); | ||
assertTrue(or.iterator().hasNext()); |
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.
Only makes sure something is returned, we should also make sure the size is ok, what about the following?
assertTrue(or.iterator().hasNext()); | |
assertEquals(1, StreamSupport.stream(or.spliterator(), false).count()); |
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.
Added the change in the test.
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.
alright, perfect, thanks!
No description provided.