Skip to content

Commit

Permalink
removed old test
Browse files Browse the repository at this point in the history
  • Loading branch information
al-rosenthal committed Aug 28, 2023
1 parent fca78cb commit e68334d
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions api/src/repositories/project-repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,33 +493,6 @@ describe('ProjectRepository', () => {
});
});

describe('insertType', () => {
it('should return result', async () => {
const mockResponse = ({ rows: [{ id: 1 }], rowCount: 1 } as any) as Promise<QueryResult<any>>;
const dbConnection = getMockDBConnection({ sql: () => mockResponse });

const repository = new ProjectRepository(dbConnection);

const response = await repository.insertType(1, 1);

expect(response).to.eql(1);
});

it('should throw an error', async () => {
const mockResponse = ({ rows: [], rowCount: 0 } as any) as Promise<QueryResult<any>>;
const dbConnection = getMockDBConnection({ sql: () => mockResponse });

const repository = new ProjectRepository(dbConnection);

try {
await repository.insertType(1, 1);
expect.fail();
} catch (error) {
expect((error as Error).message).to.equal('Failed to insert project type data');
}
});
});

describe('deleteIUCNData', () => {
it('should return result', async () => {
const mockResponse = ({ rows: [{ id: 1 }], rowCount: 1 } as any) as Promise<QueryResult<any>>;
Expand Down Expand Up @@ -559,19 +532,6 @@ describe('ProjectRepository', () => {
});
});

describe('deleteActivityData', () => {
it('should return result', async () => {
const mockResponse = ({ rows: [{ id: 1 }], rowCount: 1 } as any) as Promise<QueryResult<any>>;
const dbConnection = getMockDBConnection({ sql: () => mockResponse });

const repository = new ProjectRepository(dbConnection);

const response = await repository.deleteTypeData(1);

expect(response).to.eql(undefined);
});
});

describe('deleteProject', () => {
it('should return result', async () => {
const mockResponse = ({ rows: [{ id: 1 }], rowCount: 1 } as any) as Promise<QueryResult<any>>;
Expand Down

0 comments on commit e68334d

Please sign in to comment.