Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions spec/models/server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,26 @@
pending
end

describe "#documentation_url" do
context "with no documentation_url value on manufacturer" do
let(:server) { described_class.new({ numero: "some" }) }

it { expect(server.documentation_url).to be_nil }
end

context "with no numero on server" do
let(:server) { described_class.new({ modele_id: 1 }) }

it { expect(server.documentation_url).to be_nil }
end

context "with documentation_url value on manufacturer" do
let(:server) { servers(:one) }

it { expect(server.documentation_url).to eq("https://fortinet.com/CZ31535FEY/document") }
end
end

describe "#deep_dup" do
pending
end
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/modeles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ five:
id: 5
name: PDU_25
architecture_id: 1
manufacturer_id: 1
manufacturer_id: 2
category_id: 3
12 changes: 0 additions & 12 deletions test/models/move_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ def setup
@move = moves(:one)
end

test "invalid without frame" do
@move.frame = nil
assert_not @move.valid?, "saved move without a frame"
assert_not_nil @move.errors[:frame], "no validation error for frame present"
end

test "invalid without moveable object associated" do
@move.moveable = nil
assert_not @move.valid?
assert_not_nil @move.errors[:moveable]
end

test "clear current connections" do
# Before
@moved_connections = MovedConnection.per_servers([@move.moveable])
Expand Down
13 changes: 0 additions & 13 deletions test/models/port_test.rb

This file was deleted.

33 changes: 0 additions & 33 deletions test/models/server_test.rb

This file was deleted.

Loading