Add unique and valid name constraints.
[arvados.git] / services / api / test / unit / user_test.rb
index fd56a745a84a989eced4b0719437dc93fa979ff6..2d2db160cd3a0e971dd7ae56073b1de85216cfd0 100644 (file)
@@ -88,6 +88,8 @@ class UserTest < ActiveSupport::TestCase
   end
 
   test "full name should not contain spurious whitespace" do
+    Thread.current[:user] = @admin_user   # set admin user as the current user
+
     user = User.create ({uuid: 'zzzzz-tpzed-abcdefghijklmno', email: 'foo@example.com' })
 
     assert_equal '', user.full_name