]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1590] Wrong URL returned by SearchService.getArtifactVersions.
authorOlivier Lamy <olamy@apache.org>
Thu, 19 Jan 2012 10:10:02 +0000 (10:10 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 19 Jan 2012 10:10:02 +0000 (10:10 +0000)
improve unit test with testing getArtifactVersions method too.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233267 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/SearchServiceTest.java

index 4f8fd620a9e6a36fd8f1c05ecc339e10fca67beb..43ac0b14d5ebed259c62bcefbaed09c4ff4aedd4 100644 (file)
@@ -92,10 +92,19 @@ public class SearchServiceTest
         // END SNIPPET: searchservice-artifact-versions
 
         assertNotNull( artifacts );
-        assertTrue( " not 3 results for commons-logging search but " + artifacts.size() + ":" + artifacts,
+        assertTrue( " not 13 results for commons-logging search but " + artifacts.size() + ":" + artifacts,
                     artifacts.size() == 13 );
         log.info( "artifacts for commons-logging size {} search {}", artifacts.size(), artifacts );
 
+        for ( Artifact artifact : artifacts )
+        {
+            log.info( "url:" + artifact.getUrl() );
+            String version = artifact.getVersion();
+            assertTrue( artifact.getUrl().contains( version ) );
+
+
+        }
+
         deleteTestRepo( testRepoId );
     }