File tree Expand file tree Collapse file tree
server/src/test/java/invite/crm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -652,6 +652,32 @@ void profileWithUidIdp() {
652652 assertEquals (SUPER_ADMIN_NAME , authorisation .role ());
653653 }
654654
655+ @ Test
656+ void profileWithUidIdpForAttributeAggregation () {
657+ this .seedCRMData ();
658+ ProfileResponse profileResponse = given ()
659+ .when ()
660+ .auth ().preemptive ().basic ("aa" , "secret" )
661+ .accept (ContentType .JSON )
662+ .contentType (ContentType .JSON )
663+ .queryParam ("uid" , "guest" )
664+ .queryParam ("idp" , "kb.nl" )
665+ .get ("/api/external/v1/invite/crm/profile" )
666+ .as (new TypeRef <>() {
667+ });
668+ assertEquals (0 , profileResponse .code ());
669+ assertEquals ("OK" , profileResponse .message ());
670+ assertEquals (1 , profileResponse .profiles ().size ());
671+
672+ Profile profile = profileResponse .profiles ().getFirst ();
673+ assertEquals (CRM_ORGANIZATION_ID , profile .organisation ().get ("guid" ));
674+ assertEquals (1 , profile .authorisations ().size ());
675+
676+ Authorisation authorisation = profile .authorisations ().getFirst ();
677+ assertEquals ("SUPER_ADMIN" , authorisation .abbbrevation ());
678+ assertEquals (SUPER_ADMIN_NAME , authorisation .role ());
679+ }
680+
655681 @ Test
656682 void profileWithIdp () {
657683 this .seedCRMData ();
You can’t perform that action at this time.
0 commit comments