Skip to content

Commit

Permalink
Test URLFormatValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Oct 21, 2023
1 parent a8e458d commit 4ca0cf2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions server/src/test/java/access/validation/URLFormatValidatorTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package access.validation;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class URLFormatValidatorTest {

private static final URLFormatValidator urlFormatValidator = new URLFormatValidator();

@Test
void isValid() {
assertFalse(urlFormatValidator.isValid("javascript:alert(42)"));
}
}

0 comments on commit 4ca0cf2

Please sign in to comment.