Skip to content

Commit

Permalink
Rename newsletter as marketing on cummunication preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
nevalla committed Jan 11, 2024
1 parent b3d86a4 commit 8ea4b03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/User.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ describe(".user.*", () => {
nock(apiEndpointAddress).put(`/users/${username}/reset-password`).reply(204);

nock(apiEndpointAddress).get(`/users/${username}/communications`).reply(200, {
newsletter: false,
marketing: false,
onboarding: false,
});

nock(apiEndpointAddress).patch(`/users/${username}/communications`).reply(200, {
newsletter: true,
marketing: true,
onboarding: false,
});

Expand Down Expand Up @@ -72,12 +72,12 @@ describe(".user.*", () => {
it("can call getUserCommunicationPreferences", async () => {
const pref = await lensPlatformClient.user.getUserCommunicationsPreferences();

expect(pref.newsletter).toBeFalsy();
expect(pref.marketing).toBeFalsy();
});

it("can call updateUserCommunicationsPreferences", async () => {
await lensPlatformClient.user.updateUserCommunicationsPreferences({
newsletter: true,
marketing: true,
onboarding: false,
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface UserAttributes {
}

export interface UserCommunications {
newsletter?: boolean;
marketing?: boolean;
onboarding?: boolean;
}

Expand Down

0 comments on commit 8ea4b03

Please sign in to comment.