Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
valure committed Jan 14, 2025
1 parent cbc6e1a commit 5cf439e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { getModelToken } from '@nestjs/sequelize'
import addYears from 'date-fns/addYears'
import kennitala from 'kennitala'
import request from 'supertest'

import { DelegationIndex } from '@island.is/auth-api-lib'
Expand All @@ -15,8 +17,6 @@ import {
import { TestApp } from '@island.is/testing/nest'

import { setupWithAuth } from '../../../../../test/setup'
import kennitala from 'kennitala'
import addYears from 'date-fns/addYears'

const path = '/v1/delegation-index/.id'
const testNationalId = createNationalId('person')
Expand Down Expand Up @@ -423,6 +423,7 @@ describe('DelegationIndexController', () => {
describe('PUT for Legal guardians', () => {
let app: TestApp
let server: request.SuperTest<request.Test>
let factory: FixtureFactory

let delegationIndexModel: typeof DelegationIndex
const delegationProvider = AuthDelegationProvider.NationalRegistry
Expand All @@ -439,6 +440,8 @@ describe('DelegationIndexController', () => {
server = request(app.getHttpServer())

delegationIndexModel = app.get(getModelToken(DelegationIndex))
factory = new FixtureFactory(app)
await factory.createAllDelegationTypes()
})

afterAll(async () => {
Expand Down

0 comments on commit 5cf439e

Please sign in to comment.