feat: Update notification object to match the updated examples

This commit is contained in:
Joachim Van Herwegen
2023-01-24 13:45:22 +01:00
parent caee563dd6
commit 7c343a5fcc
12 changed files with 26 additions and 61 deletions

View File

@@ -15,11 +15,8 @@ describe('A ComposedNotificationHandler', (): void => {
'https://www.w3.org/ns/solid/notification/v1',
],
id: `urn:123:http://example.com/foo`,
type: [ 'Update' ],
object: {
id: 'http://example.com/foo',
type: [],
},
type: 'Update',
object: 'http://example.com/foo',
published: '123',
state: '123',
};

View File

@@ -35,11 +35,8 @@ describe('A WebHookEmitter', (): void => {
'https://www.w3.org/ns/solid/notification/v1',
],
id: `urn:123:http://example.com/foo`,
type: [ 'Update' ],
object: {
id: 'http://example.com/foo',
type: [],
},
type: 'Update',
object: 'http://example.com/foo',
published: '123',
};
let representation: Representation;

View File

@@ -51,13 +51,8 @@ describe('An ActivityNotificationGenerator', (): void => {
'https://www.w3.org/ns/solid/notification/v1',
],
id: `urn:${ms}:http://example.com/foo`,
type: [ 'Update' ],
object: {
id: 'http://example.com/foo',
type: [
LDP.Resource,
],
},
type: 'Update',
object: 'http://example.com/foo',
state: expect.stringMatching(/"\d+"/u),
published: date,
});

View File

@@ -36,11 +36,8 @@ describe('A DeleteNotificationGenerator', (): void => {
'https://www.w3.org/ns/solid/notification/v1',
],
id: `urn:${ms}:http://example.com/foo`,
type: [ 'Delete' ],
object: {
id: 'http://example.com/foo',
type: [],
},
type: 'Delete',
object: 'http://example.com/foo',
published: date,
});

View File

@@ -23,11 +23,8 @@ describe('A StateNotificationGenerator', (): void => {
'https://www.w3.org/ns/solid/notification/v1',
],
id: `urn:123:http://example.com/foo`,
type: [ 'Update' ],
object: {
id: 'http://example.com/foo',
type: [],
},
type: 'Update',
object: 'http://example.com/foo',
published: '123',
};
let source: jest.Mocked<NotificationGenerator>;

View File

@@ -16,11 +16,8 @@ describe('A ConvertingNotificationSerializer', (): void => {
'https://www.w3.org/ns/solid/notification/v1',
],
id: `urn:123:http://example.com/foo`,
type: [ 'Update' ],
object: {
id: 'http://example.com/foo',
type: [],
},
type: 'Update',
object: 'http://example.com/foo',
published: '123',
};
let representation: Representation;

View File

@@ -19,11 +19,8 @@ describe('A JsonLdNotificationSerializer', (): void => {
'https://www.w3.org/ns/solid/notification/v1',
],
id: `urn:123:http://example.com/foo`,
type: [ 'Update' ],
object: {
id: 'http://example.com/foo',
type: [],
},
type: 'Update',
object: 'http://example.com/foo',
published: '123',
};