Merge branch 'master' into 3193-manage-account
[arvados.git] / apps / workbench / test / functional / collections_controller_test.rb
index babe4fbf931542b7dc0c46d79afbb6874b8d198e..4745d1b9ac7a8f7860e3c10b5b86299f404c7d07 100644 (file)
@@ -1,6 +1,8 @@
 require 'test_helper'
 
 class CollectionsControllerTest < ActionController::TestCase
+  NONEXISTENT_COLLECTION = "ffffffffffffffffffffffffffffffff+0"
+
   def collection_params(collection_name, file_name=nil)
     uuid = api_fixture('collections')[collection_name.to_s]['uuid']
     params = {uuid: uuid, id: uuid}
@@ -173,4 +175,9 @@ class CollectionsControllerTest < ActionController::TestCase
                "when showing the user agreement.")
     assert_response :success
   end
+
+  test "requesting nonexistent Collection returns 404" do
+    show_collection({uuid: NONEXISTENT_COLLECTION, id: NONEXISTENT_COLLECTION},
+                    :active, 404)
+  end
 end