4523: update tests to include :* in the filters sent rather than expect server to...
authorRadhika Chippada <radhika@curoverse.com>
Mon, 9 Feb 2015 22:45:47 +0000 (17:45 -0500)
committerRadhika Chippada <radhika@curoverse.com>
Mon, 9 Feb 2015 22:45:47 +0000 (17:45 -0500)
services/api/test/integration/collections_api_test.rb
services/api/test/integration/groups_test.rb

index 983885d1adf4f80824b18463d47dc3a543067216..b44c4bef5e87d8046553c0ef763e8526f88c46c8 100644 (file)
@@ -218,14 +218,15 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
     created = json_response
 
     # search using the filename
-    search_using_full_text_search 'subdir2', 1
-    search_using_full_text_search 'subdir2/subdir', 1
+    search_using_full_text_search 'subdir2', 0
+    search_using_full_text_search 'subdir2:*', 1
     search_using_full_text_search 'subdir2/subdir3/subdir4', 1
-    search_using_full_text_search 'file4', 1
-    search_using_full_text_search 'file4_in_subdir', 1
-    search_using_full_text_search 'subdir2 file4', 1      # look for prefixes subdir2 and file4
-    search_using_full_text_search 'subdir2 ile4', 0
+    search_using_full_text_search 'file4:*', 1
+    search_using_full_text_search 'file4_in_subdir4.txt', 1
+    search_using_full_text_search 'subdir2 file4:*', 0      # first word is incomplete
+    search_using_full_text_search 'subdir2/subdir3/subdir4 file4:*', 1
     search_using_full_text_search 'subdir2/subdir3/subdir4 file4_in_subdir4.txt', 1
+    search_using_full_text_search 'ile4', 0                 # not a prefix match
   end
 
   def search_using_full_text_search search_filter, expected_items
index 7ede5be7cc07e57d94fa8a5f20b8fcef6c50d2ea..5ceb99bcb92ab5fcf92c771e257c2b388c0effcf 100644 (file)
@@ -40,10 +40,14 @@ class GroupsTest < ActionDispatch::IntegrationTest
   end
 
   [
-    ['Collection_', true],           # collections and pipelines templates
-    ['hash', true],                  # pipeline templates
-    ['fa7aeb5140e2848d39b', true],   # script_parameter of pipeline instances
-    ['no-such-thing', false],        # script_parameter of pipeline instances
+    ['Collection_', true],            # collections and pipelines templates
+    ['hash', true],                   # pipeline templates
+    ['fa7aeb5140e2848d39b', false],   # script_parameter of pipeline instances
+    ['fa7aeb5140e2848d39b:*', true],  # script_parameter of pipeline instances
+    ['project pipeline', true],       # finds "Completed pipeline in A Project"
+    ['project pipeli:*', true],       # finds "Completed pipeline in A Project"
+    ['proje pipeli:*', false],        # first word is incomplete, so no prefix match
+    ['no-such-thing', false],         # script_parameter of pipeline instances
   ].each do |search_filter, expect_results|
     test "full text search of group-owned objects for #{search_filter}" do
       get "/arvados/v1/groups/contents", {
@@ -69,6 +73,5 @@ class GroupsTest < ActionDispatch::IntegrationTest
       :filters => [['name', '@@', 'Private']].to_json
     }, auth(:active)
     assert_response 422
-    end
-
+  end
 end