Skip to content

Commit

Permalink
Added mocking for external data
Browse files Browse the repository at this point in the history
  • Loading branch information
allomanta committed Oct 7, 2024
1 parent 5bba9a0 commit ea81b0a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions IguideME.Web/Frontend/src/mocks/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import {
import { http, HttpResponse } from 'msw';

export const entriesHandlers = [
http.get('/external-assignments', () => {
return HttpResponse.json(MOCK_ASSIGNMENTS.filter((ass) => ass.published === 2));
}),
http.get('/assignments', () => {
const resp: any = {};
MOCK_ASSIGNMENTS.forEach((ass) => {
Expand Down Expand Up @@ -135,7 +138,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 9,
course_id: 17320,
title: 'Perusall assignment 1',
published: 1,
published: 2,
muted: false,
due_date: 1707688872519,
max_grade: 10.0,
Expand All @@ -145,7 +148,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 10,
course_id: 17320,
title: 'Perusall assignment 2',
published: 1,
published: 2,
muted: false,
due_date: 1707688872519,
max_grade: 10.0,
Expand All @@ -155,7 +158,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 11,
course_id: 17320,
title: 'Perusall assignment 3',
published: 1,
published: 2,
muted: false,
due_date: 1707688872519,
max_grade: 10.0,
Expand Down

0 comments on commit ea81b0a

Please sign in to comment.