Skip to content

Commit

Permalink
[SHIBUI-906]
Browse files Browse the repository at this point in the history
Simple unit test fix.
Fixed messaging in an exception.
  • Loading branch information
Bill Smith committed Nov 7, 2018
1 parent 10ec71c commit 2a4dc66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public static JsonSchemaResourceLocation metadataSourcesSchema(JsonSchemaResourc
public static JsonSchemaResourceLocation entityAttributesFiltersSchema(JsonSchemaResourceLocationRegistry resourceLocationRegistry) {
return resourceLocationRegistry
.lookup(ENTITY_ATTRIBUTES_FILTERS)
.orElseThrow(() -> new IllegalStateException("JSON schema resource location for metadata sources is not registered."));
.orElseThrow(() -> new IllegalStateException("JSON schema resource location for entity attributes filters is not registered."));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import org.springframework.test.context.ActiveProfiles
import spock.lang.Specification

import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.*
import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.ENTITY_ATTRIBUTES_FILTERS
import static edu.internet2.tier.shibboleth.admin.ui.jsonschema.JsonSchemaResourceLocation.SchemaType.METADATA_SOURCES

/**
Expand Down Expand Up @@ -49,6 +50,12 @@ class BadJSONMetadataSourcesUiDefinitionControllerIntegrationTests extends Speci
.jacksonMapper(jacksonMapper)
.detectMalformedJson(false)
.build())
.register(ENTITY_ATTRIBUTES_FILTERS, JsonSchemaLocationBuilder.with()
.jsonSchemaLocation('classpath:entity-attributes-filters-ui-schema.json')
.resourceLoader(resourceLoader)
.jacksonMapper(jacksonMapper)
.detectMalformedJson(false)
.build())
}
}
}

0 comments on commit 2a4dc66

Please sign in to comment.