mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
100b211ba5
for #11980
22 lines
559 B
Go
22 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)
|
|
}
|