Inviting people in bulk
An administrator invites people by pasting their email addresses into one
box. However they separate the addresses — commas, spaces, semicolons, or
a mix of all three — the vault reads the same list, because it is the
vault that does the reading and not the page. A submission may carry up
to a hundred addresses; one address too many is refused whole, with the
count said out loud, and nobody is invited at all. Each address is its
own invitation: one that cannot be read is refused on its own line while
the addresses around it still go out.
However the addresses are separated, the same people are invited
- Given three addresses separated by commas
- And the same three addresses separated by spaces
- And the same three addresses separated by semicolons and newlines
- When the vault reads each list
- Then all three lists name the same three people
The same address typed twice is one invitation
- Given a list that repeats one address in different letter case
- When the vault reads the list
- Then the repeated address is counted once, spelled as it was first typed
One address too many refuses the whole submission
- Given a list of a hundred and one addresses
- When the administrator submits it
- Then the vault refuses the whole submission and says how many were sent
- And nobody is invited
A hundred addresses is still allowed
- Given a list of exactly a hundred addresses
- When the administrator submits it
- Then the vault accepts the submission
An unreadable address is refused on its own line
- Given a list holding one unreadable address between two good ones
- When the administrator submits it
- Then the unreadable address is refused with a reason
- And the two good addresses are invited anyway