richie-education 3.3.1-dev11 → 3.3.1-dev12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,6 +66,15 @@ describe('Fonzie Keycloak API', () => {
66
66
  expect(fetchMock.calls()).toHaveLength(2);
67
67
  });
68
68
 
69
+ it('provides an updateUrl pointing to the keycloak account page', () => {
70
+ const api = FonzieKeycloakAPIInterface(configuration);
71
+ const { account } = api.user;
72
+ expect(typeof (account as any).updateUrl).toBe('function');
73
+ expect((account as any).updateUrl()).toBe(
74
+ 'https://keycloak.test/auth/realms/richie-realm/account/',
75
+ );
76
+ });
77
+
69
78
  it('is able to retrieve access token within the session storage', () => {
70
79
  const accessToken = faker.string.uuid();
71
80
  sessionStorage.setItem(RICHIE_USER_TOKEN, accessToken);
@@ -51,6 +51,7 @@ const API = (APIConf: AuthenticationBackend): APILms => {
51
51
  return sessionStorage.getItem(RICHIE_USER_TOKEN);
52
52
  },
53
53
  account: {
54
+ updateUrl: () => APIOptions.routes.user.account,
54
55
  get: async (username: string) => {
55
56
  const options: RequestInit = {
56
57
  credentials: 'include',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "richie-education",
3
- "version": "3.3.1-dev11",
3
+ "version": "3.3.1-dev12",
4
4
  "description": "A CMS to build learning portals for Open Education",
5
5
  "main": "sandbox/manage.py",
6
6
  "scripts": {