3889: minor test assertion updates
[arvados.git] / services / api / test / functional / arvados / v1 / users_controller_test.rb
index 531f8e26eb09fd011f0fac2133199f88fe1d3c77..1cfb63ea52402d3bb910d537179d2c3b249dd428 100644 (file)
@@ -34,18 +34,20 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
                                 name: 'click',
                                 tail_uuid: users(:inactive).uuid,
                                 head_uuid: required_uuids).
-        collect(&:head_uuid)
+                          collect(&:head_uuid)
 
       assert_equal 0, signed_uuids.length
     end
 
     authorize_with :inactive
+    assert_equal false, users(:inactive).is_active
 
     post :activate, id: users(:inactive).uuid
     assert_response 403
 
-    response_body = JSON.parse(@response.body)
-    assert response_body['errors'].first.include? 'Cannot activate without user agreements'
+    resp = json_response
+    assert resp['errors'].first.include? 'Cannot activate without user agreements'
+    assert_nil resp['is_active']
   end
 
   test "activate an already-active user" do
@@ -360,7 +362,7 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
     verify_num_links @all_links_at_start, 5
   end
 
-  test "setup user with an exising user email and check different object is created" do
+  test "setup user with an existing user email and check different object is created" do
     authorize_with :admin
     inactive_user = users(:inactive)