File tree Expand file tree Collapse file tree
agent_api/src/test/java/helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import java .security .NoSuchAlgorithmException ;
77
88import static dev .aikido .agent_api .helpers .url .BuildRouteFromUrl .buildRouteFromUrl ;
9- import static org .junit .jupiter .api .Assertions .assertEquals ;
10- import static org .junit .jupiter .api .Assertions .assertNull ;
9+ import static org .junit .jupiter .api .Assertions .*;
1110
1211public class BuildRouteFromUrlTest {
1312
@@ -130,11 +129,19 @@ public void testReplaceSecrets() {
130129 @ Test
131130 public void testReplacesBsonObjectIds () {
132131 assertEquals ("/posts/:objectId" , buildRouteFromUrl ("/posts/66ec29159d00113616fc7184" ));
132+ // 25 characters :
133+ assertNotEquals ("/posts/:objectId" , buildRouteFromUrl ("/posts/66ec29159d00113616fc71845" ));
134+ // 23 characters :
135+ assertNotEquals ("/posts/:objectId" , buildRouteFromUrl ("/posts/66ec29159d00113616fc718" ));
133136 }
134137
135138 @ Test
136139 public void testReplacesUlidStrings () {
137140 assertEquals ("/posts/:ulid" , buildRouteFromUrl ("/posts/01ARZ3NDEKTSV4RRFFQ69G5FAV" ));
138141 assertEquals ("/posts/:ulid" , buildRouteFromUrl ("/posts/01arz3ndektsv4rrffq69g5fav" ));
142+ // 27 characters :
143+ assertNotEquals ("/posts/:ulid" , buildRouteFromUrl ("/posts/01arz3ndektsv4rrffq69g5favv" ));
144+ // 25 characters :
145+ assertNotEquals ("/posts/:ulid" , buildRouteFromUrl ("/posts/01arz3ndektsv4rrffq69g5fa" ));
139146 }
140147}
You can’t perform that action at this time.
0 commit comments