mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 00:18:27 +00:00
21 lines
559 B
Go
21 lines
559 B
Go
package update
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestSwiftDialogUpdatesDisabled(t *testing.T) {
|
|
cfg := &fleet.OrbitConfig{}
|
|
cfg.Notifications.NeedsMDMMigration = true
|
|
cfg.Notifications.RenewEnrollmentProfile = true
|
|
var f OrbitConfigFetcher = &dummyConfigFetcher{cfg: cfg}
|
|
f = ApplySwiftDialogDownloaderMiddleware(f, nil)
|
|
|
|
// we used to get a panic if updates were disabled (see #11980)
|
|
gotCfg, err := f.GetConfig()
|
|
require.NoError(t, err)
|
|
require.Equal(t, cfg, gotCfg)
|
|
}
|