[ARVADOS] updated: 501db79a2d00dcd79b3cf3757f6a93ef6c1c1696
git at public.curoverse.com
git at public.curoverse.com
Thu Mar 13 16:12:49 EDT 2014
Summary of changes:
.../functional/arvados/v1/users_controller_test.rb | 15 +++++++++++++++
services/api/test/unit/user_test.rb | 4 +---
2 files changed, 16 insertions(+), 3 deletions(-)
via 501db79a2d00dcd79b3cf3757f6a93ef6c1c1696 (commit)
from 22b6371cb0ff61b9dd19cef581ec1bdaae1b0bd9 (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 501db79a2d00dcd79b3cf3757f6a93ef6c1c1696
Author: radhika chippada <radhika at radhika.curoverse>
Date: Thu Mar 13 16:05:13 2014 -0400
Add functional test to create a new user
diff --git a/services/api/test/functional/arvados/v1/users_controller_test.rb b/services/api/test/functional/arvados/v1/users_controller_test.rb
index 6d129d8..583bd48 100644
--- a/services/api/test/functional/arvados/v1/users_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/users_controller_test.rb
@@ -38,4 +38,19 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
assert_equal true, me['is_active']
end
+ test "create new user" do
+ authorize_with :admin
+ post :create, user: {
+ first_name: "test_first_name",
+ last_name: "test_last_name",
+ email: "test at abc.com"
+ }
+ assert_response :success
+ created = JSON.parse(@response.body)
+ assert_equal 'test_first_name', created['first_name']
+ assert_not_nil created['uuid'], 'expected non-null uuid for the newly created user'
+ assert_not_nil created['email'], 'since email was given, expected non-nil email'
+ assert_nil created['identity_url'], 'even though email is provided, expected no identity_url since users_controller only creates user at this time'
+ end
+
end
diff --git a/services/api/test/unit/user_test.rb b/services/api/test/unit/user_test.rb
index 7eeccd7..9922ef4 100644
--- a/services/api/test/unit/user_test.rb
+++ b/services/api/test/unit/user_test.rb
@@ -1,10 +1,8 @@
require 'test_helper'
class UserTest < ActiveSupport::TestCase
- # test "the truth" do
- # assert true
- # end
+ # The fixture services/api/test/fixtures/users.yml serves as the input for this test case
setup do
@all_users = User.find(:all)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list