[ARVADOS] updated: 6d6de24e35e291ef9b7a0f05def9b8e8ea5f7508
git at public.curoverse.com
git at public.curoverse.com
Tue Sep 30 13:00:00 EDT 2014
Summary of changes:
.../functional/arvados/v1/collections_controller_test.rb | 7 +++++--
.../test/functional/arvados/v1/groups_controller_test.rb | 13 +++++++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
via 6d6de24e35e291ef9b7a0f05def9b8e8ea5f7508 (commit)
from dc29394d6e4df36a1cab5beae69c3331e037bdb1 (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 6d6de24e35e291ef9b7a0f05def9b8e8ea5f7508
Author: Tim Pierce <twp at curoverse.com>
Date: Tue Sep 30 12:59:40 2014 -0400
3961: more explicit assertions and error text
diff --git a/services/api/test/functional/arvados/v1/collections_controller_test.rb b/services/api/test/functional/arvados/v1/collections_controller_test.rb
index 6f3e2c8..e11a1cc 100644
--- a/services/api/test/functional/arvados/v1/collections_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb
@@ -147,6 +147,10 @@ EOS
}
}
assert_response 422
+ response_errors = json_response['errors']
+ assert_not_nil response_errors, 'Expected error in response'
+ assert(response_errors.first.include?('duplicate key'),
+ "Expected 'duplicate key' error in #{response_errors.first}")
end
test "create succeeds with duplicate name with ensure_unique_name" do
@@ -163,8 +167,7 @@ EOS
ensure_unique_name: true
}
assert_response :success
- resp = JSON.parse(@response.body)
- assert_equal 'owned_by_active (2)', resp['name']
+ assert_equal 'owned_by_active (2)', json_response['name']
end
test "create with owner_uuid set to group i can_manage" do
diff --git a/services/api/test/functional/arvados/v1/groups_controller_test.rb b/services/api/test/functional/arvados/v1/groups_controller_test.rb
index 5a67b5c..c4b5aef 100644
--- a/services/api/test/functional/arvados/v1/groups_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb
@@ -340,6 +340,10 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
},
}
assert_response 422
+ response_errors = json_response['errors']
+ assert_not_nil response_errors, 'Expected error in response'
+ assert(response_errors.first.include?('duplicate key'),
+ "Expected 'duplicate key' error in #{response_errors.first}")
end
test 'creating duplicate named subproject succeeds with ensure_unique_name' do
@@ -353,7 +357,12 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
ensure_unique_name: true
}
assert_response :success
- assert_not_equal json_response['uuid'], groups(:aproject).uuid
- assert_equal json_response['name'], 'A Project (2)'
+ new_project = json_response
+ assert_not_equal(new_project['uuid'],
+ groups(:aproject).uuid,
+ "create returned same uuid as existing project")
+ assert_equal(new_project['name'],
+ 'A Project (2)',
+ "new project name '#{new_project['name']}' was expected to be 'A Project (2)'")
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list