Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Jan 11, 2024
1 parent 816c6bc commit 055eeba
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -988,19 +988,18 @@ public void importFeedIdemPotency() throws IOException {
.get("manage/api/client/metadata/saml20_sp/" + id)
.getBody()
.as(MetaData.class);
Map<String, Object> metaDataFields = metaData.metaDataFields();
assertEquals("eduGAIN", metaDataFields.get("coin:interfed_source"));
assertEquals(true, metaDataFields.get("coin:imported_from_edugain"));

importRequest = new Import(urlS, "https://impacter.eu/sso/metadata");
result = given()
result= given()
.body(importRequest)
.header("Content-type", "application/json")
.post("manage/api/client/import/endpoint/xml/saml20_sp")
.getBody()
.as(Map.class);
Set<String> keysFromMetaData = metaData.metaDataFields().keySet();
Set<String> metaDataFields = ((Map) result.get("metaDataFields")).keySet();

keysFromMetaData.removeAll(metaDataFields);
assertEquals(Arrays.asList("coin:imported_from_edugain", "coin:interfed_source"), new ArrayList(keysFromMetaData));
assertEquals("eduGAIN", ((Map)result.get("metaDataFields")).get("coin:interfed_source"));
}


Expand Down

0 comments on commit 055eeba

Please sign in to comment.