18 lines
638 B
Go
18 lines
638 B
Go
package connectors
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/samcharles93/archie-core/modules/connectors/internal/store"
|
|
)
|
|
|
|
// TestFormSchemaUsesCatalogueWhenRuntimeOmitsSettings checks that starting an
|
|
// extension doesn't hide the settings published in its signed descriptor.
|
|
func TestFormSchemaUsesCatalogueWhenRuntimeOmitsSettings(t *testing.T) {
|
|
a := store.Installed{DeclaredSettings: []byte(`[{"key":"timezone","label":"Time zone"}]`)}
|
|
got, err := formSchema(a, []Setting{}, true)
|
|
if err != nil || len(got) != 1 || got[0].Key != "timezone" {
|
|
t.Fatalf("settings = %v, error = %v; want the catalogue's timezone setting", got, err)
|
|
}
|
|
}
|