taskid 72455 Cookie Preferences per account

This commit is contained in:
Samuel
2020-08-13 20:11:32 +02:00
parent d1ee942bd4
commit e1fb87773c
2 changed files with 30 additions and 0 deletions

View File

@@ -78,6 +78,22 @@ public class EPersonTest extends AbstractUnitTest {
super.destroy();
}
@Test
public void testPreferences() throws Exception {
ePersonService.addMetadata(context, eperson, "dspace", "cookies", "functional", null, "true");
ePersonService.addMetadata(context, eperson, "dspace", "cookies", "statistics", null, "false");
context.commit();
assertEquals(
"true",
ePersonService.getMetadataFirstValue(eperson, "dspace", "cookies", "functional", null)
);
assertEquals(
"false",
ePersonService.getMetadataFirstValue(eperson, "dspace", "cookies", "statistics", null)
);
}
/**
* Test of equals method, of class EPerson.

View File

@@ -16,5 +16,19 @@
<scope_note></scope_note>
</dc-type>
<dc-type>
<schema>dspace</schema>
<element>cookies</element>
<qualifier>functional</qualifier>
<scope_note></scope_note>
</dc-type>
<dc-type>
<schema>dspace</schema>
<element>cookies</element>
<qualifier>statistics</qualifier>
<scope_note></scope_note>
</dc-type>
</dspace-dc-types>