Revision 5c835ff7
Added by Dominic Cleal over 6 years ago
config/as_deprecation_whitelist.yaml | ||
---|---|---|
and will be removed in Rails 5.1. Please call `reload` on the result collection
|
||
proxy instead.
|
||
callstack: test/models/host_test.rb
|
||
- message: Passing arguments to assert_nothing_raised is deprecated and will be removed
|
||
in Rails 5.1.
|
||
callstack: test/models/host_test.rb:1739:in `block (3 levels) in <class:HostTest>'
|
||
- message: Passing arguments to assert_nothing_raised is deprecated and will be removed
|
||
in Rails 5.1.
|
||
callstack: test/models/report_test.rb:126:in `block (2 levels) in <class:ReportTest>'
|
||
- message: Passing arguments to assert_nothing_raised is deprecated and will be removed
|
||
in Rails 5.1.
|
||
callstack: test/unit/foreman/renderer_test.rb:89:in `block in <class:RendererTest>'
|
||
- message: Passing arguments to assert_nothing_raised is deprecated and will be removed
|
||
in Rails 5.1.
|
||
callstack: test/unit/net/validations_test.rb
|
||
- message: Passing conditions to delete_all is deprecated and will be removed in
|
||
Rails 5.1. To achieve the same use where(conditions).delete_all.
|
||
- message: Passing conditions to destroy_all is deprecated and will be removed in
|
test/models/host_test.rb | ||
---|---|---|
test "deleting an host with an expired token does not cause a Foreign Key error" do
|
||
h = FactoryGirl.create(:host, :managed)
|
||
h.create_token(:value => "aaaaaa", :expires => 5.minutes.ago)
|
||
assert_nothing_raised(ActiveRecord::InvalidForeignKey) {h.reload.destroy}
|
||
assert_nothing_raised {h.reload.destroy}
|
||
end
|
||
|
||
test "token_expired? should be true if expiration date is in the past" do
|
test/models/report_test.rb | ||
---|---|---|
end
|
||
|
||
test 'Inherited children can search' do
|
||
assert_nothing_raised NoMethodError do
|
||
assert_nothing_raised do
|
||
TestReport.search_for('blah')
|
||
end
|
||
end
|
test/unit/foreman/renderer_test.rb | ||
---|---|---|
end
|
||
|
||
test "foreman_url should run with @host as nil" do
|
||
assert_nothing_raised(NoMethodError) { @renderer.foreman_url }
|
||
assert_nothing_raised { @renderer.foreman_url }
|
||
end
|
||
|
||
test "pxe_kernel_options are not set when no OS is set" do
|
test/unit/net/validations_test.rb | ||
---|---|---|
end
|
||
|
||
test "48-bit mac address should be valid" do
|
||
assert_nothing_raised Net::Validations::Error do
|
||
assert_nothing_raised do
|
||
Net::Validations.validate_mac! "aa:bb:cc:dd:ee:ff"
|
||
end
|
||
end
|
||
|
||
test "64-bit mac address should be valid" do
|
||
assert_nothing_raised Net::Validations::Error do
|
||
assert_nothing_raised do
|
||
Net::Validations.validate_mac! "aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd"
|
||
end
|
||
end
|
||
... | ... | |
end
|
||
|
||
test "hostname should be valid" do
|
||
assert_nothing_raised Net::Validations::Error do
|
||
assert_nothing_raised do
|
||
Net::Validations.validate_hostname! "this.is.an.example.com"
|
||
end
|
||
assert_nothing_raised Net::Validations::Error do
|
||
assert_nothing_raised do
|
||
Net::Validations.validate_hostname! "this-is.an.example.com"
|
||
end
|
||
assert_nothing_raised Net::Validations::Error do
|
||
assert_nothing_raised do
|
||
Net::Validations.validate_hostname! "localhost"
|
||
end
|
||
end
|
||
... | ... | |
|
||
describe "network validation" do
|
||
test "network should be valid" do
|
||
assert_nothing_raised Net::Validations::Error do
|
||
assert_nothing_raised do
|
||
Net::Validations.validate_network! "123.1.123.1"
|
||
end
|
||
end
|
||
... | ... | |
|
||
describe "mask validation" do
|
||
test "mask should be valid" do
|
||
assert_nothing_raised Net::Validations::Error do
|
||
assert_nothing_raised do
|
||
Net::Validations.validate_mask! "255.255.255.0"
|
||
end
|
||
end
|
||
... | ... | |
end
|
||
|
||
test "return IP when IPv4 address is valid" do
|
||
assert_nothing_raised Net::Validations::Error do
|
||
assert_nothing_raised do
|
||
assert "127.0.0.1", Net::Validations.validate_ip!("127.0.0.1")
|
||
end
|
||
end
|
Also available in: Unified diff
Fixes #20953 - Remove assert_nothing_raised args