-
Notifications
You must be signed in to change notification settings - Fork 4
mrc-357 add autocomplete and validate selected users #106
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
Changes from all commits
42fe81d
e924a22
9d554a3
3ab153d
3937529
76aecd1
9b8a79e
1a81cc2
9f01535
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,19 @@ class UserRepositoryTests : CleanDatabaseTests() | |
| assertThat(nullResult).isNull() | ||
| } | ||
|
|
||
| @Test | ||
| fun `gets user emails in alphabetical order`() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this test name misleading? I can't see ordering code, and I didn't think containsExactlyElementsOf checked order.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| { | ||
| val sut = OrderlyUserRepository() | ||
|
|
||
| insertUser("[email protected]", "some.name") | ||
| insertUser("[email protected]", "test.name") | ||
| insertUser("[email protected]", "test.name") | ||
|
|
||
| val result = sut.getUserEmails() | ||
| assertThat(result).containsExactlyElementsOf(listOf("[email protected]", "[email protected]", "[email protected]")) | ||
| } | ||
|
|
||
| @Test | ||
| fun `addUser can create new github user`() | ||
| { | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
So we're assuming that we always have a manageable number of users to be able to return the full list on each call? No value in doing an initial filter with first few letters here? Probably not for the number we have in Montagu, would just make the UI less responsive.
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 think so, yeah. The number of users would have to be pretty high for this to be a problem.