Sha256: 1839b217c38536f9a818e95ccedbfc52db0f19af033c12aafe26fab2d6abc50a
Contents?: true
Size: 780 Bytes
Versions: 28
Compression:
Stored size: 780 Bytes
Contents
require 'test_plugin_helper' require 'foreman_tasks/test_helpers' class InventoryScheduledSyncTest < ActiveSupport::TestCase include ForemanTasks::TestHelpers::WithInThreadExecutor test 'Schedules an execution if auto upload is enabled' do Setting[:allow_auto_inventory_upload] = true InventorySync::Async::InventoryScheduledSync.any_instance.expects(:plan_org_sync).times(Organization.unscoped.count) ForemanTasks.sync_task(InventorySync::Async::InventoryScheduledSync) end test 'Skips execution if auto upload is disabled' do Setting[:allow_auto_inventory_upload] = false InventorySync::Async::InventoryScheduledSync.any_instance.expects(:plan_org_sync).never ForemanTasks.sync_task(InventorySync::Async::InventoryScheduledSync) end end
Version data entries
28 entries across 28 versions & 1 rubygems