[ARVADOS] updated: 65be441066ac47f556b3a19872536b42b09c5e22
git at public.curoverse.com
git at public.curoverse.com
Mon Jun 2 13:03:30 EDT 2014
Summary of changes:
services/api/test/unit/user_test.rb | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
via 65be441066ac47f556b3a19872536b42b09c5e22 (commit)
from 4609a76d9b84e0f63233cdf6dcbef376b1686b69 (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 65be441066ac47f556b3a19872536b42b09c5e22
Author: Ward Vandewege <ward at curoverse.com>
Date: Mon Jun 2 13:02:30 2014 -0400
DTRT with system_user in our user test case. Partial revocation of
commit:e9fc734b
diff --git a/services/api/test/unit/user_test.rb b/services/api/test/unit/user_test.rb
index 0d55633..8f02779 100644
--- a/services/api/test/unit/user_test.rb
+++ b/services/api/test/unit/user_test.rb
@@ -3,6 +3,12 @@ require 'test_helper'
class UserTest < ActiveSupport::TestCase
include CurrentApiClient
+ # The fixture services/api/test/fixtures/users.yml serves as the input for this test case
+ setup do
+ # Make sure system_user exists before making "pre-test users" list
+ system_user
+ end
+
test "check non-admin active user properties" do
@active_user = users(:active) # get the active user
assert !@active_user.is_admin, 'is_admin should not be set for a non-admin user'
@@ -95,9 +101,7 @@ class UserTest < ActiveSupport::TestCase
user.save
# verify there is one extra user in the db now
- # the API server also auto-creates the root system user after the first user
- # is created, hence the test for the delta of 2.
- assert_equal @all_users.size+2, User.find(:all).size
+ assert_equal @all_users.size+1, User.find(:all).size
user = User.find(user.id) # get the user back
assert_equal(user.first_name, 'first_name_for_newly_created_user')
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list