Skip to content

Commit

Permalink
BC-5820 Remove mongoose version keys (#2921)
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedwiper authored Nov 20, 2023
1 parent 16e40e1 commit d718801
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 46 deletions.
1 change: 0 additions & 1 deletion src/components/molecules/AddContentModal.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ const lessons = {
date: "1999-12-31T23:00:00.000Z",
createdAt: "2021-08-18T09:11:18.962Z",
updatedAt: "2021-08-18T10:30:37.348Z",
__v: 0,
},
],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ const school = {
systems: [{ $oid: "0000d186816abba584714c90" }],
updatedAt: { $date: "2020-07-27T08:21:14.719Z" },
createdAt: { $date: "2017-01-01T00:06:37.148Z" },
__v: 0,
currentYear: {
_id: { $oid: "5ebd6dc14a431f75ec9a3e77" },
name: "2021/22",
startDate: "2021-08-01T00:00:00.000Z",
endDate: "2022-07-31T00:00:00.000Z",
__v: 0,
},
purpose: "demo",
enableStudentTeamCreation: false,
Expand Down
1 change: 0 additions & 1 deletion src/components/templates/RoomWrapper.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const getWrapper = (
};

const mockAuthStoreData = {
__v: 0,
_id: "asdf",
id: "asdf",
firstName: "Arthur",
Expand Down
1 change: 0 additions & 1 deletion src/components/templates/TasksDashboardMain.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const defaultTasksModuleGetters: Partial<TasksModule> = {
};

const mockAuthStoreDataTeacher = {
__v: 1,
_id: "asdfg",
id: "asdfg",
firstName: "Peter",
Expand Down
1 change: 0 additions & 1 deletion src/layouts/legacyLoggedIn.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ setupStores({
authModule.setUser({
permissions: ["ADMIN_VIEW", "LERNSTORE_VIEW"],
roles: [{ name: "administrator" }],
__v: 0,
_id: "asdf",
id: "asdf",
firstName: "Arthur",
Expand Down
2 changes: 0 additions & 2 deletions src/pages/administration/SchoolSettings.page.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ describe("SchoolSettingsPage", () => {
abbreviation: "BB",
logoUrl:
"https://upload.wikimedia.org/wikipedia/commons/thumb/4/45/Brandenburg_Wappen.svg/354px-Brandenburg_Wappen.svg.png",
__v: 0,
};

const mockSystems: any[] = [{ _id: "123", type: "itslearning" }];
Expand All @@ -65,7 +64,6 @@ describe("SchoolSettingsPage", () => {
getCurrentYear: {
_id: "123",
name: "School Year 3000",
__v: 1,
startDate: "",
endDate: "",
},
Expand Down
8 changes: 0 additions & 8 deletions src/pages/administration/migration.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ const schoolMock = {
],
updatedAt: "2022-02-10T11:56:22.817Z",
createdAt: "2017-01-01T00:06:37.148Z",
__v: 1,
currentYear: {
_id: "5ebd6dc14a431f75ec9a3e77",
name: "2021/22",
startDate: "2021-08-01T00:00:00.000Z",
endDate: "2022-07-31T00:00:00.000Z",
__v: 0,
},
purpose: "demo",
features: {
Expand Down Expand Up @@ -98,43 +96,37 @@ const schoolMock = {
name: "2021/22",
startDate: "2021-08-01T00:00:00.000Z",
endDate: "2022-07-31T00:00:00.000Z",
__v: 0,
},
{
_id: "5ebd6dc14a431f75ec9a3e78",
name: "2022/23",
startDate: "2022-08-01T00:00:00.000Z",
endDate: "2023-07-31T00:00:00.000Z",
__v: 0,
},
],
activeYear: {
_id: "5ebd6dc14a431f75ec9a3e77",
name: "2021/22",
startDate: "2021-08-01T00:00:00.000Z",
endDate: "2022-07-31T00:00:00.000Z",
__v: 0,
},
defaultYear: {
_id: "5ebd6dc14a431f75ec9a3e77",
name: "2021/22",
startDate: "2021-08-01T00:00:00.000Z",
endDate: "2022-07-31T00:00:00.000Z",
__v: 0,
},
nextYear: {
_id: "5ebd6dc14a431f75ec9a3e78",
name: "2022/23",
startDate: "2022-08-01T00:00:00.000Z",
endDate: "2023-07-31T00:00:00.000Z",
__v: 0,
},
lastYear: {
_id: "5d44297075e1502c27e405e2",
name: "2020/21",
startDate: "2020-08-01T00:00:00.000Z",
endDate: "2021-07-31T00:00:00.000Z",
__v: 0,
},
},
isTeamCreationByStudentsEnabled: false,
Expand Down
2 changes: 0 additions & 2 deletions src/pages/rooms/room-details.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ const mockData = {
};

const mockAuthStoreDataStudentInvalid = {
__v: 0,
_id: "asdf",
id: "asdf",
firstName: "Arthur",
Expand All @@ -83,7 +82,6 @@ const mockAuthStoreDataStudentInvalid = {
};

const mockAuthStoreDataTeacher = {
__v: 1,
_id: "asdfg",
id: "asdfg",
firstName: "Peter",
Expand Down
1 change: 0 additions & 1 deletion src/pages/rooms/room-overview.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const mockCourseData = [
];

const mockAuthStoreData = {
__v: 0,
_id: "asdf",
id: "asdf",
firstName: "Arthur",
Expand Down
2 changes: 0 additions & 2 deletions src/store/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default class AuthModule extends VuexModule {
payload = null;
user: User | null = {
_id: "",
__v: 0,
firstName: "",
lastName: "",
email: "",
Expand All @@ -44,7 +43,6 @@ export default class AuthModule extends VuexModule {
createdAt: "",
roles: [],
permissions: [],
__v: 2,
displayName: "",
id: "",
},
Expand Down
1 change: 0 additions & 1 deletion src/store/content.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ const mockLessons: { data: Lessons } = {
position: 0,
time: "",
updatedAt: "",
__v: 0,
_id: "",
},
],
Expand Down
7 changes: 0 additions & 7 deletions src/store/schools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,11 @@ export default class SchoolsModule extends VuexModule {
systems: [],
updatedAt: "",
createdAt: "",
__v: 0,
currentYear: {
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
purpose: "",
features: {
Expand All @@ -108,28 +106,24 @@ export default class SchoolsModule extends VuexModule {
name: "",
startDate: "",
endDate: "",
__v: 0,
},
lastYear: {
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
activeYear: {
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
defaultYear: {
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
schoolYears: [],
},
Expand All @@ -141,7 +135,6 @@ export default class SchoolsModule extends VuexModule {
name: "",
abbreviation: "",
logoUrl: "",
__v: 0,
};
systems: any[] = [];
loading = false;
Expand Down
3 changes: 0 additions & 3 deletions src/store/schools.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ describe("schools module", () => {
authModule.setUser({
schoolId: "4711",
_id: "",
__v: 0,
firstName: "",
lastName: "",
email: "",
Expand Down Expand Up @@ -624,7 +623,6 @@ describe("schools module", () => {
it("should set federalState data", () => {
const schoolsModule = new SchoolsModule({});
const mockFederalState = {
__v: 0,
counties: [],
logoUrl: "",
_id: "mockId",
Expand Down Expand Up @@ -699,7 +697,6 @@ describe("schools module", () => {
it("shoud return federalState state", () => {
const schoolsModule = new SchoolsModule({});
const mockFederalState = {
__v: 0,
counties: [],
logoUrl: "",
_id: "mockId",
Expand Down
1 change: 0 additions & 1 deletion src/store/types/auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export type User = {
_id: string;
__v: number;
firstName: string;
lastName: string;
email: string;
Expand Down
1 change: 0 additions & 1 deletion src/store/types/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export type Lesson = {
position: number;
time: string;
updatedAt: string;
__v: number;
_id: string;
};

Expand Down
3 changes: 0 additions & 3 deletions src/store/types/schools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export type Year = {
name: string;
endDate: string;
startDate: string;
__v: number;
};

export type County = {
Expand All @@ -19,7 +18,6 @@ export type FederalState = {
counties: County[];
logoUrl: string;
name: string;
__v: number;
_id: string;
};

Expand All @@ -34,7 +32,6 @@ export type School = {
systems: string[];
updatedAt: string;
createdAt: string;
__v: number;
currentYear: Year;
purpose: string;
features: {
Expand Down
9 changes: 0 additions & 9 deletions tests/test-utils/mockObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { School } from "@/store/types/schools";

export const mockUser: User = {
_id: "",
__v: 0,
firstName: "",
lastName: "",
email: "",
Expand All @@ -20,7 +19,6 @@ export const mockUser: User = {
createdAt: "",
roles: [],
permissions: [],
__v: 2,
displayName: "test-display-name",
id: "",
},
Expand Down Expand Up @@ -67,13 +65,11 @@ export const mockSchool: School = {
systems: [],
updatedAt: "",
createdAt: "",
__v: 0,
currentYear: {
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
purpose: "",
features: {
Expand All @@ -99,36 +95,31 @@ export const mockSchool: School = {
name: "",
startDate: "",
endDate: "",
__v: 0,
},
lastYear: {
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
activeYear: {
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
defaultYear: {
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
schoolYears: [
{
_id: "",
name: "",
startDate: "",
endDate: "",
__v: 0,
},
],
},
Expand Down

0 comments on commit d718801

Please sign in to comment.