mirror of
https://github.com/google/nomulus.git
synced 2025-07-13 22:45:10 +02:00
Prevent accidentally using full Drive URL as folder ID (#144)
* Prevent accidentally using full Drive URL as folder ID
This commit is contained in:
parent
8afc4f4d3d
commit
0564b207f2
7 changed files with 14 additions and 4 deletions
|
@ -452,6 +452,14 @@ public class RegistrarTest extends EntityTestCase {
|
|||
() -> registrar.asBuilder().setAllowedTldsUncached(ImmutableSet.of("bad")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_driveFolderId_asFullUrl() {
|
||||
IllegalArgumentException thrown =
|
||||
assertThrows(IllegalArgumentException.class, () -> registrar.asBuilder().setDriveFolderId(
|
||||
"https://drive.google.com/drive/folders/1j3v7RZkU25DjbTx2-Q93H04zKOBau89M"));
|
||||
assertThat(thrown).hasMessageThat().isEqualTo("Drive folder ID must not be a full URL");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_nullEmail() {
|
||||
NullPointerException thrown =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue