From: Tom Clegg Date: Tue, 28 Mar 2017 17:24:57 +0000 (-0400) Subject: 7709: Use assert_nil instead of assert_equal nil. X-Git-Tag: 1.1.0~285^2~8 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/7fd4aa96f997a133d31b3df88a8d2f4820c5b881 7709: Use assert_nil instead of assert_equal nil. --- diff --git a/services/api/test/functional/arvados/v1/virtual_machines_controller_test.rb b/services/api/test/functional/arvados/v1/virtual_machines_controller_test.rb index 9b805af8e3..626d7f04b0 100644 --- a/services/api/test/functional/arvados/v1/virtual_machines_controller_test.rb +++ b/services/api/test/functional/arvados/v1/virtual_machines_controller_test.rb @@ -59,8 +59,8 @@ class Arvados::V1::VirtualMachinesControllerTest < ActionController::TestCase get :logins, id: vm.uuid assert_response :success assert_equal 1, json_response['items'].length - assert_equal nil, json_response['items'][0]['public_key'] - assert_equal nil, json_response['items'][0]['authorized_key_uuid'] + assert_nil json_response['items'][0]['public_key'] + assert_nil json_response['items'][0]['authorized_key_uuid'] assert_equal u.uuid, json_response['items'][0]['user_uuid'] assert_equal 'bobblogin', json_response['items'][0]['username'] end diff --git a/services/api/test/unit/workflow_test.rb b/services/api/test/unit/workflow_test.rb index c7c528828d..29ca09bdab 100644 --- a/services/api/test/unit/workflow_test.rb +++ b/services/api/test/unit/workflow_test.rb @@ -85,8 +85,8 @@ class WorkflowTest < ActiveSupport::TestCase definition = "more: etc" w.update_attributes!(definition: definition) w.reload - assert_equal nil, w.name - assert_equal nil, w.description + assert_nil w.name + assert_nil w.description # Workflow name and desc set using definition yaml should be cleared # if definition yaml is cleared @@ -96,8 +96,8 @@ class WorkflowTest < ActiveSupport::TestCase definition = nil w.update_attributes!(definition: definition) w.reload - assert_equal nil, w.name - assert_equal nil, w.description + assert_nil w.name + assert_nil w.description # Workflow name and desc should be set to provided custom values definition = "name: test name 3\ndescription: test desc 3\nother: some more"