[ARVADOS] updated: afa3f1f4815f1895d3342de56713cc37435ec7bd

git at public.curoverse.com git at public.curoverse.com
Mon Feb 16 19:00:28 EST 2015


Summary of changes:
 apps/workbench/app/controllers/users_controller.rb  | 13 ++++++++++++-
 .../test/controllers/users_controller_test.rb       | 11 +++++++++++
 services/api/app/models/collection.rb               |  4 ----
 .../api/test/integration/collections_api_test.rb    | 21 +++++++++++----------
 4 files changed, 34 insertions(+), 15 deletions(-)

       via  afa3f1f4815f1895d3342de56713cc37435ec7bd (commit)
       via  37affe0fa1898e3945d58f2c8ae7fd632dda71ff (commit)
       via  1ee6ce5be0c86c1d2e903252ba2a70694be5cf31 (commit)
       via  c99e40c18e4ba67f529fcd928eed76509dbda130 (commit)
       via  1578bb430ce005137f49233ef87fac34ebc51e2e (commit)
       via  6ab5505797c96e3aa5652e0d964eec3787e023ac (commit)
       via  45d8d010e15b0c4860102b78692ec8bc5b2ef158 (commit)
      from  40e9d6a079634dcd4447e12f57b6262aa1e1f15e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit afa3f1f4815f1895d3342de56713cc37435ec7bd
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Mon Feb 16 18:59:39 2015 -0500

    4759: do not use modified_at getter method; test passes but still other things are not passing.

diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index a626d47..89ad874 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -306,10 +306,6 @@ class Collection < ArvadosModel
     super - ["manifest_text"]
   end
 
-  def modified_at
-    self[:modified_at].strftime "%Y-%m-%dT%H:%M:%S.%NZ" if self[:modified_at]
-  end
-
   protected
   def portable_manifest_text
     portable_manifest = self[:manifest_text].dup
diff --git a/services/api/test/integration/collections_api_test.rb b/services/api/test/integration/collections_api_test.rb
index bf9fec1..b5140bf 100644
--- a/services/api/test/integration/collections_api_test.rb
+++ b/services/api/test/integration/collections_api_test.rb
@@ -152,8 +152,8 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
     assert_equal 'something specific', json_response['description']
 
     # search
-    search_using_filter 'specific', 1
-    search_using_filter 'not specific enough', 0
+    search_using_filter 'specific', true
+    search_using_filter 'not specific enough', false
   end
 
   test "create collection, update manifest, and search with filename" do
@@ -170,7 +170,7 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
     created = json_response
 
     # search using the filename
-    search_using_filter 'my_test_file.txt', 1
+    search_using_filter 'my_test_file.txt', true
 
     # update the collection's manifest text
     signed_manifest = Collection.sign_manifest(". bad42fa702ae3ea7d888fef11b46f450+44 0:44:my_updated_test_file.txt\n", api_token(:active))
@@ -184,9 +184,9 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
     assert_not_includes json_response['manifest_text'], 'my_test_file.txt'
 
     # search using the new filename
-    search_using_filter 'my_updated_test_file.txt', 1
-    search_using_filter 'my_test_file.txt', 0
-    search_using_filter 'there_is_no_such_file.txt', 0
+    search_using_filter 'my_updated_test_file.txt', true
+    search_using_filter 'my_test_file.txt', false
+    search_using_filter 'there_is_no_such_file.txt', false
   end
 
   def search_using_filter search_filter, expected_items
@@ -196,12 +196,13 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
     assert_response :success
     response_items = json_response['items']
     assert_not_nil response_items
-    if expected_items == 0
-      assert_empty response_items
-    else
+    if expected_items
       refute_empty response_items
       first_item = response_items.first
       assert_not_nil first_item
+      return first_item
+    else
+      assert_empty response_items
     end
   end
 
@@ -316,7 +317,7 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
     assert_match /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}/, json_response['modified_at']
 
     # search using filename
-    search_result = search_using_filter 'my_updated_test_file.txt', 1
+    search_result = search_using_filter 'my_updated_test_file.txt', true
     assert_match /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}/, search_result['modified_at']
   end
 end

commit 37affe0fa1898e3945d58f2c8ae7fd632dda71ff
Merge: 40e9d6a 1ee6ce5
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Mon Feb 16 17:49:56 2015 -0500

    Merge branch 'master' into 4759-timestamp-precision


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list