From 8d0dbaeff8b9da3751beba615b72f5fbc5a43af3 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 28 Nov 2024 21:58:05 +0000 Subject: [PATCH] Fix .json extensions in URLs in spec tests --- spec/netbox_client_ruby/api/circuits/circuit_spec.rb | 2 +- .../netbox_client_ruby/api/circuits/circuit_termination_spec.rb | 2 +- spec/netbox_client_ruby/api/circuits/circuit_type_spec.rb | 2 +- spec/netbox_client_ruby/api/circuits/provider_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/console_connection_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/console_port_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/console_server_port_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/device_role_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/device_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/device_type_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/interface_connection_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/interface_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/inventory_item_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/manufacturer_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/platform_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/power_connection_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/power_outlet_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/power_port_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/rack_group_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/rack_reservation_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/rack_role_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/rack_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/region_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/site_spec.rb | 2 +- spec/netbox_client_ruby/api/dcim/virtual_chassis_spec.rb | 2 +- spec/netbox_client_ruby/api/extras/config_context_spec.rb | 2 +- spec/netbox_client_ruby/api/extras/journal_entry_spec.rb | 2 +- spec/netbox_client_ruby/api/extras/tag_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/aggregate_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/ip_address_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/ip_range_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/prefix_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/rir_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/role_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/service_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/vlan_group_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/vlan_spec.rb | 2 +- spec/netbox_client_ruby/api/ipam/vrf_spec.rb | 2 +- spec/netbox_client_ruby/api/secrets/secret_role_spec.rb | 2 +- spec/netbox_client_ruby/api/secrets/secret_spec.rb | 2 +- spec/netbox_client_ruby/api/tenancy/tenant_group_spec.rb | 2 +- spec/netbox_client_ruby/api/tenancy/tenant_spec.rb | 2 +- .../netbox_client_ruby/api/virtualization/cluster_group_spec.rb | 2 +- spec/netbox_client_ruby/api/virtualization/cluster_spec.rb | 2 +- spec/netbox_client_ruby/api/virtualization/cluster_type_spec.rb | 2 +- spec/netbox_client_ruby/api/virtualization/interface_spec.rb | 2 +- .../api/virtualization/virtual_machine_spec.rb | 2 +- 47 files changed, 47 insertions(+), 47 deletions(-) diff --git a/spec/netbox_client_ruby/api/circuits/circuit_spec.rb b/spec/netbox_client_ruby/api/circuits/circuit_spec.rb index c2492e7..049d7fc 100644 --- a/spec/netbox_client_ruby/api/circuits/circuit_spec.rb +++ b/spec/netbox_client_ruby/api/circuits/circuit_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Circuits::Circuit, faraday_stub: true do let(:id) { 1 } let(:base_url) { '/api/circuits/circuits/' } - let(:request_url) { "#{base_url}#{id}.json" } + let(:request_url) { "#{base_url}#{id}/" } let(:response) { File.read("spec/fixtures/circuits/circuit_#{id}.json") } subject { described_class.new id } diff --git a/spec/netbox_client_ruby/api/circuits/circuit_termination_spec.rb b/spec/netbox_client_ruby/api/circuits/circuit_termination_spec.rb index b36164a..63718ed 100644 --- a/spec/netbox_client_ruby/api/circuits/circuit_termination_spec.rb +++ b/spec/netbox_client_ruby/api/circuits/circuit_termination_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Circuits::CircuitTermination, faraday_stub: true do let(:id) { 1 } let(:base_url) { '/api/circuits/circuit-terminations/' } - let(:request_url) { "#{base_url}#{id}.json" } + let(:request_url) { "#{base_url}#{id}/" } let(:response) { File.read("spec/fixtures/circuits/circuit-termination_#{id}.json") } subject { described_class.new id } diff --git a/spec/netbox_client_ruby/api/circuits/circuit_type_spec.rb b/spec/netbox_client_ruby/api/circuits/circuit_type_spec.rb index 44686e5..88cce4b 100644 --- a/spec/netbox_client_ruby/api/circuits/circuit_type_spec.rb +++ b/spec/netbox_client_ruby/api/circuits/circuit_type_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Circuits::CircuitType, faraday_stub: true do let(:id) { 1 } let(:base_url) { '/api/circuits/circuit-types/' } - let(:request_url) { "#{base_url}#{id}.json" } + let(:request_url) { "#{base_url}#{id}/" } let(:response) { File.read("spec/fixtures/circuits/circuit-type_#{id}.json") } subject { described_class.new id } diff --git a/spec/netbox_client_ruby/api/circuits/provider_spec.rb b/spec/netbox_client_ruby/api/circuits/provider_spec.rb index 10d32f3..ac5eb6c 100644 --- a/spec/netbox_client_ruby/api/circuits/provider_spec.rb +++ b/spec/netbox_client_ruby/api/circuits/provider_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Circuits::Provider, faraday_stub: true do let(:id) { 1 } let(:base_url) { '/api/circuits/providers/' } - let(:request_url) { "#{base_url}#{id}.json" } + let(:request_url) { "#{base_url}#{id}/" } let(:response) { File.read("spec/fixtures/circuits/provider_#{id}.json") } subject { described_class.new id } diff --git a/spec/netbox_client_ruby/api/dcim/console_connection_spec.rb b/spec/netbox_client_ruby/api/dcim/console_connection_spec.rb index afe9de8..6360a93 100644 --- a/spec/netbox_client_ruby/api/dcim/console_connection_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/console_connection_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/console-connections/' } let(:response) { File.read("spec/fixtures/dcim/console-connection_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/console_port_spec.rb b/spec/netbox_client_ruby/api/dcim/console_port_spec.rb index 55bc25a..2ac9412 100644 --- a/spec/netbox_client_ruby/api/dcim/console_port_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/console_port_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/console-ports/' } let(:response) { File.read("spec/fixtures/dcim/console-port_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/console_server_port_spec.rb b/spec/netbox_client_ruby/api/dcim/console_server_port_spec.rb index 5038420..61b9cbd 100644 --- a/spec/netbox_client_ruby/api/dcim/console_server_port_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/console_server_port_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/console-server-ports/' } let(:response) { File.read("spec/fixtures/dcim/console-server-port_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/device_role_spec.rb b/spec/netbox_client_ruby/api/dcim/device_role_spec.rb index c00aa1c..5c401ab 100644 --- a/spec/netbox_client_ruby/api/dcim/device_role_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/device_role_spec.rb @@ -8,7 +8,7 @@ let(:sut) { NetboxClientRuby::DCIM::DeviceRole } let(:base_url) { '/api/dcim/device-roles/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/dcim/device-role_#{entity_id}.json") } subject { sut.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/device_spec.rb b/spec/netbox_client_ruby/api/dcim/device_spec.rb index 4dde31f..72fb5ab 100644 --- a/spec/netbox_client_ruby/api/dcim/device_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/device_spec.rb @@ -9,7 +9,7 @@ let(:base_url) { '/api/dcim/devices/' } let(:response) { File.read("spec/fixtures/dcim/device_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { sut.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/device_type_spec.rb b/spec/netbox_client_ruby/api/dcim/device_type_spec.rb index b1b0ff7..90648f1 100644 --- a/spec/netbox_client_ruby/api/dcim/device_type_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/device_type_spec.rb @@ -8,7 +8,7 @@ let(:sut) { NetboxClientRuby::DCIM::DeviceType } let(:base_url) { '/api/dcim/device-types/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/dcim/device-type_#{entity_id}.json") } subject { sut.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/interface_connection_spec.rb b/spec/netbox_client_ruby/api/dcim/interface_connection_spec.rb index 39f181c..a6e708f 100644 --- a/spec/netbox_client_ruby/api/dcim/interface_connection_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/interface_connection_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/interface-connections/' } let(:response) { File.read("spec/fixtures/dcim/interface-connection_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/interface_spec.rb b/spec/netbox_client_ruby/api/dcim/interface_spec.rb index 411053c..90bc5ba 100644 --- a/spec/netbox_client_ruby/api/dcim/interface_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/interface_spec.rb @@ -8,7 +8,7 @@ let(:sut) { NetboxClientRuby::DCIM::Interface } let(:base_url) { '/api/dcim/interfaces/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/dcim/interface_#{entity_id}.json") } subject { sut.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/inventory_item_spec.rb b/spec/netbox_client_ruby/api/dcim/inventory_item_spec.rb index 32b4c05..f4be6f0 100644 --- a/spec/netbox_client_ruby/api/dcim/inventory_item_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/inventory_item_spec.rb @@ -8,7 +8,7 @@ let(:sut) { NetboxClientRuby::DCIM::InventoryItem } let(:base_url) { '/api/dcim/inventory-items/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/dcim/inventory-item_#{entity_id}.json") } subject { sut.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/manufacturer_spec.rb b/spec/netbox_client_ruby/api/dcim/manufacturer_spec.rb index b341b75..0e2e1f3 100644 --- a/spec/netbox_client_ruby/api/dcim/manufacturer_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/manufacturer_spec.rb @@ -7,7 +7,7 @@ let(:expected_name) { 'manu1' } let(:sut) { NetboxClientRuby::DCIM::Manufacturer } let(:base_url) { '/api/dcim/manufacturers/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/dcim/manufacturer_#{entity_id}.json") } subject { sut.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/platform_spec.rb b/spec/netbox_client_ruby/api/dcim/platform_spec.rb index c0945c6..9421005 100644 --- a/spec/netbox_client_ruby/api/dcim/platform_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/platform_spec.rb @@ -8,7 +8,7 @@ let(:sut) { NetboxClientRuby::DCIM::Platform } let(:base_url) { '/api/dcim/platforms/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/dcim/platform_#{entity_id}.json") } subject { sut.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/power_connection_spec.rb b/spec/netbox_client_ruby/api/dcim/power_connection_spec.rb index 564d88f..8b6fb6e 100644 --- a/spec/netbox_client_ruby/api/dcim/power_connection_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/power_connection_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/power-connections/' } let(:response) { File.read("spec/fixtures/dcim/power-connection_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/power_outlet_spec.rb b/spec/netbox_client_ruby/api/dcim/power_outlet_spec.rb index 19509d1..56783a3 100644 --- a/spec/netbox_client_ruby/api/dcim/power_outlet_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/power_outlet_spec.rb @@ -7,7 +7,7 @@ let(:expected_name) { '3' } let(:base_url) { '/api/dcim/power-outlets/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/dcim/power-outlets_#{entity_id}.json") } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/power_port_spec.rb b/spec/netbox_client_ruby/api/dcim/power_port_spec.rb index 89b5862..186178c 100644 --- a/spec/netbox_client_ruby/api/dcim/power_port_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/power_port_spec.rb @@ -7,7 +7,7 @@ let(:expected_name) { 'psu1' } let(:base_url) { '/api/dcim/power-ports/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/dcim/power-ports_#{entity_id}.json") } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/rack_group_spec.rb b/spec/netbox_client_ruby/api/dcim/rack_group_spec.rb index ea2afe4..fbad820 100644 --- a/spec/netbox_client_ruby/api/dcim/rack_group_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/rack_group_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/rack-groups/' } let(:response) { File.read("spec/fixtures/dcim/rack-group_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/rack_reservation_spec.rb b/spec/netbox_client_ruby/api/dcim/rack_reservation_spec.rb index 030e087..6397ab5 100644 --- a/spec/netbox_client_ruby/api/dcim/rack_reservation_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/rack_reservation_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/rack-reservations/' } let(:response) { File.read("spec/fixtures/dcim/rack-reservation_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/rack_role_spec.rb b/spec/netbox_client_ruby/api/dcim/rack_role_spec.rb index d774b9e..1421cc0 100644 --- a/spec/netbox_client_ruby/api/dcim/rack_role_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/rack_role_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/rack-roles/' } let(:response) { File.read("spec/fixtures/dcim/rack-role_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/rack_spec.rb b/spec/netbox_client_ruby/api/dcim/rack_spec.rb index 1c1b375..ac7dd2c 100644 --- a/spec/netbox_client_ruby/api/dcim/rack_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/rack_spec.rb @@ -9,7 +9,7 @@ let(:base_url) { '/api/dcim/racks/' } let(:response) { File.read("spec/fixtures/dcim/rack_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { sut.new entity_id } diff --git a/spec/netbox_client_ruby/api/dcim/region_spec.rb b/spec/netbox_client_ruby/api/dcim/region_spec.rb index ad2d883..7529416 100644 --- a/spec/netbox_client_ruby/api/dcim/region_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/region_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::DCIM::Region, faraday_stub: true do let(:region_id) { 1 } let(:response) { File.read("spec/fixtures/dcim/region_#{region_id}.json") } - let(:request_url) { "/api/dcim/regions/#{region_id}.json" } + let(:request_url) { "/api/dcim/regions/#{region_id}/" } subject { NetboxClientRuby::DCIM::Region.new region_id } diff --git a/spec/netbox_client_ruby/api/dcim/site_spec.rb b/spec/netbox_client_ruby/api/dcim/site_spec.rb index 3fd918f..a7ce4c5 100644 --- a/spec/netbox_client_ruby/api/dcim/site_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/site_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::DCIM::Site, faraday_stub: true do let(:site_id) { 1 } let(:response) { File.read("spec/fixtures/dcim/site_#{site_id}.json") } - let(:request_url) { "/api/dcim/sites/#{site_id}.json" } + let(:request_url) { "/api/dcim/sites/#{site_id}/" } subject { NetboxClientRuby::DCIM::Site.new site_id } diff --git a/spec/netbox_client_ruby/api/dcim/virtual_chassis_spec.rb b/spec/netbox_client_ruby/api/dcim/virtual_chassis_spec.rb index 270586b..6296e51 100644 --- a/spec/netbox_client_ruby/api/dcim/virtual_chassis_spec.rb +++ b/spec/netbox_client_ruby/api/dcim/virtual_chassis_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/dcim/virtual-chassis/' } let(:response) { File.read("spec/fixtures/dcim/virtual-chassis_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/extras/config_context_spec.rb b/spec/netbox_client_ruby/api/extras/config_context_spec.rb index 534e372..75e3add 100644 --- a/spec/netbox_client_ruby/api/extras/config_context_spec.rb +++ b/spec/netbox_client_ruby/api/extras/config_context_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Extras::ConfigContext, faraday_stub: true do let(:entity_id) { 1 } let(:base_url) { '/api/extras/config-contexts/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/extras/config_context_#{entity_id}.json") } subject { NetboxClientRuby::Extras::ConfigContext.new entity_id } diff --git a/spec/netbox_client_ruby/api/extras/journal_entry_spec.rb b/spec/netbox_client_ruby/api/extras/journal_entry_spec.rb index 850a81b..6cdd0e1 100644 --- a/spec/netbox_client_ruby/api/extras/journal_entry_spec.rb +++ b/spec/netbox_client_ruby/api/extras/journal_entry_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Extras::JournalEntry, faraday_stub: true do let(:entity_id) { 1 } let(:base_url) { '/api/extras/journal-entries/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/extras/journal_entry_#{entity_id}.json") } subject { NetboxClientRuby::Extras::JournalEntry.new entity_id } diff --git a/spec/netbox_client_ruby/api/extras/tag_spec.rb b/spec/netbox_client_ruby/api/extras/tag_spec.rb index 1abb787..13d4231 100644 --- a/spec/netbox_client_ruby/api/extras/tag_spec.rb +++ b/spec/netbox_client_ruby/api/extras/tag_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Extras::Tag, faraday_stub: true do let(:entity_id) { 1 } let(:base_url) { '/api/extras/tags/' } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } let(:response) { File.read("spec/fixtures/extras/tag_#{entity_id}.json") } subject { NetboxClientRuby::Extras::Tag.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/aggregate_spec.rb b/spec/netbox_client_ruby/api/ipam/aggregate_spec.rb index 0e239e4..97e3536 100644 --- a/spec/netbox_client_ruby/api/ipam/aggregate_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/aggregate_spec.rb @@ -9,7 +9,7 @@ let(:expected_prefix) { '10.0.0.0/8' } let(:entity_id) { 1 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { class_under_test.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/ip_address_spec.rb b/spec/netbox_client_ruby/api/ipam/ip_address_spec.rb index ee37564..02fef88 100644 --- a/spec/netbox_client_ruby/api/ipam/ip_address_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/ip_address_spec.rb @@ -10,7 +10,7 @@ let(:expected_address) { IPAddress.parse('10.0.0.1/8') } let(:entity_id) { 1 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { class_under_test.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/ip_range_spec.rb b/spec/netbox_client_ruby/api/ipam/ip_range_spec.rb index 5226228..99eac8d 100644 --- a/spec/netbox_client_ruby/api/ipam/ip_range_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/ip_range_spec.rb @@ -11,7 +11,7 @@ let(:expected_start_address) { IPAddress.parse '10.2.0.10/16' } let(:expected_end_address) { IPAddress.parse '10.2.0.20/16' } let(:entity_id) { 3 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { class_under_test.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/prefix_spec.rb b/spec/netbox_client_ruby/api/ipam/prefix_spec.rb index 97960ec..fe81776 100644 --- a/spec/netbox_client_ruby/api/ipam/prefix_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/prefix_spec.rb @@ -10,7 +10,7 @@ let(:expected_prefix) { IPAddress.parse '10.2.0.0/16' } let(:entity_id) { 3 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { class_under_test.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/rir_spec.rb b/spec/netbox_client_ruby/api/ipam/rir_spec.rb index 2ad5c4a..fb59131 100644 --- a/spec/netbox_client_ruby/api/ipam/rir_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/rir_spec.rb @@ -9,7 +9,7 @@ let(:response) { File.read("spec/fixtures/ipam/rir_#{entity_id}.json") } let(:entity_id) { 1 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { class_under_test.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/role_spec.rb b/spec/netbox_client_ruby/api/ipam/role_spec.rb index 1667481..b28d12f 100644 --- a/spec/netbox_client_ruby/api/ipam/role_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/role_spec.rb @@ -9,7 +9,7 @@ let(:response) { File.read("spec/fixtures/ipam/role_#{entity_id}.json") } let(:entity_id) { 1 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { NetboxClientRuby::IPAM::Role.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/service_spec.rb b/spec/netbox_client_ruby/api/ipam/service_spec.rb index d15bca6..eaff5e1 100644 --- a/spec/netbox_client_ruby/api/ipam/service_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/service_spec.rb @@ -8,7 +8,7 @@ let(:response) { File.read("spec/fixtures/ipam/service_#{entity_id}.json") } let(:entity_id) { 1 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { NetboxClientRuby::IPAM::Service.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/vlan_group_spec.rb b/spec/netbox_client_ruby/api/ipam/vlan_group_spec.rb index 21f8030..17c679b 100644 --- a/spec/netbox_client_ruby/api/ipam/vlan_group_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/vlan_group_spec.rb @@ -10,7 +10,7 @@ let(:response) { File.read("spec/fixtures/ipam/vlan-group_#{entity_id}.json") } let(:entity_id) { 1 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { class_under_test.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/vlan_spec.rb b/spec/netbox_client_ruby/api/ipam/vlan_spec.rb index 524a149..e1309a1 100644 --- a/spec/netbox_client_ruby/api/ipam/vlan_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/vlan_spec.rb @@ -9,7 +9,7 @@ let(:response) { File.read("spec/fixtures/ipam/vlan_#{entity_id}.json") } let(:entity_id) { 1 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { class_under_test.new entity_id } diff --git a/spec/netbox_client_ruby/api/ipam/vrf_spec.rb b/spec/netbox_client_ruby/api/ipam/vrf_spec.rb index 73c9e8c..f0f46a8 100644 --- a/spec/netbox_client_ruby/api/ipam/vrf_spec.rb +++ b/spec/netbox_client_ruby/api/ipam/vrf_spec.rb @@ -9,7 +9,7 @@ let(:response) { File.read("spec/fixtures/ipam/vrf_#{entity_id}.json") } let(:entity_id) { 1 } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { class_under_test.new entity_id } diff --git a/spec/netbox_client_ruby/api/secrets/secret_role_spec.rb b/spec/netbox_client_ruby/api/secrets/secret_role_spec.rb index 5f1b444..9424e1d 100644 --- a/spec/netbox_client_ruby/api/secrets/secret_role_spec.rb +++ b/spec/netbox_client_ruby/api/secrets/secret_role_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Secrets::SecretRole, faraday_stub: true do let(:secret_id) { 1 } let(:base_url) { '/api/secrets/secret-roles/' } - let(:request_url) { "#{base_url}#{secret_id}.json" } + let(:request_url) { "#{base_url}#{secret_id}/" } let(:response) { File.read("spec/fixtures/secrets/secret-role_#{secret_id}.json") } subject { NetboxClientRuby::Secrets::SecretRole.new secret_id } diff --git a/spec/netbox_client_ruby/api/secrets/secret_spec.rb b/spec/netbox_client_ruby/api/secrets/secret_spec.rb index 35e1922..ade9faf 100644 --- a/spec/netbox_client_ruby/api/secrets/secret_spec.rb +++ b/spec/netbox_client_ruby/api/secrets/secret_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Secrets::Secret, faraday_stub: true do let(:secret_id) { 1 } let(:base_url) { '/api/secrets/secrets/' } - let(:request_url) { "#{base_url}#{secret_id}.json" } + let(:request_url) { "#{base_url}#{secret_id}/" } let(:response) { File.read("spec/fixtures/secrets/secret_#{secret_id}.json") } subject { NetboxClientRuby::Secrets::Secret.new secret_id } diff --git a/spec/netbox_client_ruby/api/tenancy/tenant_group_spec.rb b/spec/netbox_client_ruby/api/tenancy/tenant_group_spec.rb index f5c6f7b..7665024 100644 --- a/spec/netbox_client_ruby/api/tenancy/tenant_group_spec.rb +++ b/spec/netbox_client_ruby/api/tenancy/tenant_group_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Tenancy::TenantGroup, faraday_stub: true do let(:region_id) { 1 } let(:base_url) { '/api/tenancy/tenant-groups/' } - let(:request_url) { "#{base_url}#{region_id}.json" } + let(:request_url) { "#{base_url}#{region_id}/" } let(:response) { File.read("spec/fixtures/tenancy/tenant-group_#{region_id}.json") } subject { NetboxClientRuby::Tenancy::TenantGroup.new region_id } diff --git a/spec/netbox_client_ruby/api/tenancy/tenant_spec.rb b/spec/netbox_client_ruby/api/tenancy/tenant_spec.rb index d998726..9aaadff 100644 --- a/spec/netbox_client_ruby/api/tenancy/tenant_spec.rb +++ b/spec/netbox_client_ruby/api/tenancy/tenant_spec.rb @@ -5,7 +5,7 @@ RSpec.describe NetboxClientRuby::Tenancy::Tenant, faraday_stub: true do let(:region_id) { 1 } let(:base_url) { '/api/tenancy/tenants/' } - let(:request_url) { "#{base_url}#{region_id}.json" } + let(:request_url) { "#{base_url}#{region_id}/" } let(:response) { File.read("spec/fixtures/tenancy/tenant_#{region_id}.json") } subject { NetboxClientRuby::Tenancy::Tenant.new region_id } diff --git a/spec/netbox_client_ruby/api/virtualization/cluster_group_spec.rb b/spec/netbox_client_ruby/api/virtualization/cluster_group_spec.rb index d2ec1fd..1579b40 100644 --- a/spec/netbox_client_ruby/api/virtualization/cluster_group_spec.rb +++ b/spec/netbox_client_ruby/api/virtualization/cluster_group_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/virtualization/cluster-groups/' } let(:response) { File.read("spec/fixtures/virtualization/cluster-group_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/virtualization/cluster_spec.rb b/spec/netbox_client_ruby/api/virtualization/cluster_spec.rb index 72f365b..22d4bb9 100644 --- a/spec/netbox_client_ruby/api/virtualization/cluster_spec.rb +++ b/spec/netbox_client_ruby/api/virtualization/cluster_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/virtualization/clusters/' } let(:response) { File.read("spec/fixtures/virtualization/cluster_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/virtualization/cluster_type_spec.rb b/spec/netbox_client_ruby/api/virtualization/cluster_type_spec.rb index dc6bbaf..4b0ca9f 100644 --- a/spec/netbox_client_ruby/api/virtualization/cluster_type_spec.rb +++ b/spec/netbox_client_ruby/api/virtualization/cluster_type_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/virtualization/cluster-types/' } let(:response) { File.read("spec/fixtures/virtualization/cluster-type_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/virtualization/interface_spec.rb b/spec/netbox_client_ruby/api/virtualization/interface_spec.rb index bdd4614..643855f 100644 --- a/spec/netbox_client_ruby/api/virtualization/interface_spec.rb +++ b/spec/netbox_client_ruby/api/virtualization/interface_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/virtualization/interfaces/' } let(:response) { File.read("spec/fixtures/virtualization/interface_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id } diff --git a/spec/netbox_client_ruby/api/virtualization/virtual_machine_spec.rb b/spec/netbox_client_ruby/api/virtualization/virtual_machine_spec.rb index b7d2b28..3cc5450 100644 --- a/spec/netbox_client_ruby/api/virtualization/virtual_machine_spec.rb +++ b/spec/netbox_client_ruby/api/virtualization/virtual_machine_spec.rb @@ -8,7 +8,7 @@ let(:base_url) { '/api/virtualization/virtual-machines/' } let(:response) { File.read("spec/fixtures/virtualization/virtual-machine_#{entity_id}.json") } - let(:request_url) { "#{base_url}#{entity_id}.json" } + let(:request_url) { "#{base_url}#{entity_id}/" } subject { described_class.new entity_id }