]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1843] provide mechanism to obtain the latest version of an artifact
authorOlivier Lamy <olamy@apache.org>
Wed, 21 May 2014 04:30:32 +0000 (14:30 +1000)
committerOlivier Lamy <olamy@apache.org>
Wed, 21 May 2014 04:30:32 +0000 (14:30 +1000)
test for no content

archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactFromQueryTest.java

index ce39b6846c54974c02f03d81927181b3cbd52cc4..c108af3e952535219057d8fb1e832696bee26b3c 100644 (file)
@@ -174,6 +174,31 @@ public class DownloadArtifactFromQueryTest
             Assert.assertEquals( "http://localhost:" + port + "/repository/" + id
                                      + "/org/apache/archiva/archiva-test/2.0/archiva-test-2.0.jar", location
             );
+
+
+        }
+        finally
+        {
+            getManagedRepositoriesService().deleteManagedRepository( id, false );
+        }
+
+    }
+
+    @Test
+    public void download_no_content()
+        throws Exception
+    {
+        String id = createAndScanRepo();
+
+        try
+        {
+            Response response =
+                getSearchService().redirectToArtifactFile( null, "org.apache.archiva.beer", "archiva-wine", "LATEST", null,
+                                                           null );
+
+            Assert.assertEquals( Response.Status.NO_CONTENT.getStatusCode(), response.getStatus() );
+
+
         }
         finally
         {