Sha256: add0dd9d11123a7aaad2156cbb4cfafa2f796e0f4665ed1d3d2c1d1967363632
Contents?: true
Size: 489 Bytes
Versions: 10
Compression:
Stored size: 489 Bytes
Contents
require 'test_plugin_helper' class HostgroupExtensionsTest < ActiveSupport::TestCase test "should remove all linked assets on hostgroup destroy" do hostgroup = FactoryBot.create(:hostgroup) FactoryBot.create_list(:asset, 3, :assetable_id => hostgroup.id, :assetable_type => 'Hostgroup') asset_scope = ::ForemanOpenscap::Asset.where(:assetable_id => hostgroup.id, :assetable_type => 'Hostgroup') assert_difference("asset_scope.count", -3) { hostgroup.destroy } end end
Version data entries
10 entries across 10 versions & 1 rubygems