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
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)