foreman/test/lib/net/net_test.rb @ 0c3e15d2
a6f4f5f7 | Ohad Levy | require 'test_helper'
|
|
require 'net'
|
|||
class NetTest < ActiveSupport::TestCase
|
|||
test "Net record should auto assign attributes" do
|
|||
0c3e15d2 | Ohad Levy | record = Net::Record.new :hostname => "test", "proxy" => smart_proxies(:one)
|
|
assert_equal "test", record.hostname
|
|||
a6f4f5f7 | Ohad Levy | end
|
|
test "should have a logger" do
|
|||
0c3e15d2 | Ohad Levy | record = Net::Record.new :hostname => "test", "proxy" => smart_proxies(:one)
|
|
a6f4f5f7 | Ohad Levy | assert_not_nil record.logger
|
|
end
|
|||
test "should default logger to rails logger" do
|
|||
0c3e15d2 | Ohad Levy | record = Net::Record.new :hostname => "test", "proxy" => smart_proxies(:one)
|
|
a6f4f5f7 | Ohad Levy | assert_equal logger, record.logger
|
|
end
|
|||
end
|