5176: Update API Collections test to accommodate new fixtures.
authorBrett Smith <brett@curoverse.com>
Tue, 10 Feb 2015 01:12:00 +0000 (20:12 -0500)
committerBrett Smith <brett@curoverse.com>
Tue, 10 Feb 2015 01:12:00 +0000 (20:12 -0500)
services/api/test/functional/arvados/v1/collections_controller_test.rb

index c3b5303e11e381f079eb8a1ad031ee3d05f89a9a..61b05570850635d9878c42522b728a12f2527476 100644 (file)
@@ -345,14 +345,15 @@ EOS
   end
 
   test "search collections with 'any' operator" do
   end
 
   test "search collections with 'any' operator" do
+    expect_pdh = collections(:docker_image).portable_data_hash
     authorize_with :active
     get :index, {
     authorize_with :active
     get :index, {
-      where: { any: ['contains', 'd0bc8c7f34be170a7b7b'] }
+      where: { any: ['contains', expect_pdh[5..25]] }
     }
     assert_response :success
     }
     assert_response :success
-    found = assigns(:objects).collect(&:portable_data_hash)
+    found = assigns(:objects)
     assert_equal 1, found.count
     assert_equal 1, found.count
-    assert_equal true, !!found.index('5bd9c1ad0bc8c7f34be170a7b7b39089+45')
+    assert_equal expect_pdh, found.first.portable_data_hash
   end
 
   [false, true].each do |permit_unsigned|
   end
 
   [false, true].each do |permit_unsigned|