Przeglądaj źródła

Matching path.

Very basic, just tests for expected being prefix of actual.
Herby Vojčík 7 lat temu
rodzic
commit
76eb12c028
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      src/Znock/ZnockClient.class.st

+ 1 - 0
src/Znock/ZnockClient.class.st

@@ -55,6 +55,7 @@ ZnockClient >> matches: aZnockExpectation [
 		[ :authority | authority = req url authority ifFalse: [ ^ false ] ].
 		[ :authority | authority = req url authority ifFalse: [ ^ false ] ].
 	exp method ifNotNil:
 	exp method ifNotNil:
 		[ :method | method = req method ifFalse: [ ^ false ] ].
 		[ :method | method = req method ifFalse: [ ^ false ] ].
+	(req url path beginsWith: exp url path) ifFalse: [ ^ false ].
 
 
 	^ true
 	^ true
 ]
 ]