diff --git a/.rubocop.yml b/.rubocop.yml index 1b93d318d592bfc89876860ae76e2d880fbefdbf..aac0375efa2a615924cc0aebc843311c0829022c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -21,7 +21,7 @@ Style/StringLiteralsInInterpolation: Layout/LineLength: Max: 120 Metrics/ClassLength: - Max: 200 + Max: 250 Metrics/MethodLength: Max: 50 Metrics/ParameterLists: diff --git a/test/test_v1_models.rb b/test/test_v1_models.rb index 977272d2a880bfb3aa597f6c4a712feba729c7aa..ac56576eea7336328213a5123efd037f2d1b540e 100644 --- a/test/test_v1_models.rb +++ b/test/test_v1_models.rb @@ -48,20 +48,20 @@ class TestV1Models < Minitest::Test assert_equal "EFGH5678", hardware.capital_object_id assert_equal "ATEA", hardware.supplier assert_equal "ART1234", hardware.supplier_article_number - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.purchase_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.purchase_date assert_equal "LIU100024041", hardware.purchase_order assert_equal "Till foref48", hardware.purchase_order_reference assert_equal 1099.0, hardware.purchase_price - assert_equal Time.parse("2023-04-08T14:15:58.368Z"), hardware.delivery_date + assert_equal Time.parse("2023-04-08T14:15:58Z"), hardware.delivery_date assert_equal "001255", hardware.supplier_asset_id - assert_equal Time.parse("2023-04-08T14:15:58.368Z"), hardware.service_agreement_enddate + assert_equal Time.parse("2023-04-08T14:15:58Z"), hardware.service_agreement_enddate assert_equal "30:D0:42:E7:2B:DF", hardware.mac assert_equal "Guest", hardware.network_access_role assert_equal "En valfri beskrivning", hardware.description assert_equal "8e2cbcf0-1c79-4b4e-8813-71f8da3c3d81", hardware.guid assert_equal "HP eliteBook G8-0001", hardware.name - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.created_date - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.updated_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.created_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.updated_date assert_equal "lnx00001", hardware.hostname hardware.supplier = "Dustin" @@ -135,20 +135,20 @@ class TestV1Models < Minitest::Test assert_equal "EFGH5678", hardware.capital_object_id assert_equal "ATEA", hardware.supplier assert_equal "ART1234", hardware.supplier_article_number - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.purchase_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.purchase_date assert_equal "LIU100024041", hardware.purchase_order assert_equal "Till foref48", hardware.purchase_order_reference assert_equal 1099.0, hardware.purchase_price - assert_equal Time.parse("2023-04-08T14:15:58.368Z"), hardware.delivery_date + assert_equal Time.parse("2023-04-08T14:15:58Z"), hardware.delivery_date assert_equal "001255", hardware.supplier_asset_id - assert_equal Time.parse("2023-04-08T14:15:58.368Z"), hardware.service_agreement_enddate + assert_equal Time.parse("2023-04-08T14:15:58Z"), hardware.service_agreement_enddate assert_equal "30:D0:42:E7:2B:DF", hardware.mac assert_equal "Guest", hardware.network_access_role assert_equal "En valfri beskrivning", hardware.description assert_equal "8e2cbcf0-1c79-4b4e-8813-71f8da3c3d81", hardware.guid assert_equal "HP eliteBook G8-0001", hardware.name - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.created_date - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.updated_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.created_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.updated_date # assert_equal "win00001", hardware.hostname end @@ -171,9 +171,9 @@ class TestV1Models < Minitest::Test assert_equal "8e2cbcf0-1c79-4b4e-8813-71f8da3c3d81", server.hardware_id assert_equal "Windows 10", server.operating_system_type assert_equal "Windows 10 N Education 19042.2965", server.operating_system - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), server.operating_system_install_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), server.operating_system_install_date assert_equal "win00001", server.hostname - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), server.ad_creation_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), server.ad_creation_date assert_equal "eKlient/liuit", server.active_directory_ou assert_equal "string", server.group_or_lab assert_equal "string", server.contact_information @@ -182,8 +182,8 @@ class TestV1Models < Minitest::Test assert_equal "string", server.management_system_id assert_equal "string", server.icinga_link assert_equal "string", server.foreman_link - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), server.created_date - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), server.updated_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), server.created_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), server.updated_date @client.expect( :get, File.read("test/fixtures/post_hardware.json"), @@ -208,20 +208,20 @@ class TestV1Models < Minitest::Test assert_equal "EFGH5678", hardware.capital_object_id assert_equal "ATEA", hardware.supplier assert_equal "ART1234", hardware.supplier_article_number - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.purchase_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.purchase_date assert_equal "LIU100024041", hardware.purchase_order assert_equal "Till foref48", hardware.purchase_order_reference assert_equal 1099.0, hardware.purchase_price - assert_equal Time.parse("2023-04-08T14:15:58.368Z"), hardware.delivery_date + assert_equal Time.parse("2023-04-08T14:15:58Z"), hardware.delivery_date assert_equal "001255", hardware.supplier_asset_id - assert_equal Time.parse("2023-04-08T14:15:58.368Z"), hardware.service_agreement_enddate + assert_equal Time.parse("2023-04-08T14:15:58Z"), hardware.service_agreement_enddate assert_equal "30:D0:42:E7:2B:DF", hardware.mac assert_equal "Guest", hardware.network_access_role assert_equal "En valfri beskrivning", hardware.description assert_equal "8e2cbcf0-1c79-4b4e-8813-71f8da3c3d81", hardware.guid assert_equal "HP eliteBook G8-0001", hardware.name - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.created_date - assert_equal Time.parse("2023-04-06T14:15:58.368Z"), hardware.updated_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.created_date + assert_equal Time.parse("2023-04-06T14:15:58Z"), hardware.updated_date assert_equal "lnx00001", hardware.hostname end