Skip to content
Snippets Groups Projects
Verified Commit 73f99672 authored by Nico Till Benninger's avatar Nico Till Benninger
Browse files

feat: forgot to update to forbidden exception in unit test

parent d0b17c0d
No related branches found
No related tags found
No related merge requests found
Pipeline #5132 passed
......@@ -4,7 +4,7 @@ import { TodoService } from './todo.service';
import { Repository } from 'typeorm';
import { Todo } from './entities/todo.entity';
import { getRepositoryToken } from '@nestjs/typeorm';
import { NotFoundException, MethodNotAllowedException } from '@nestjs/common';
import { NotFoundException, ForbiddenException } from '@nestjs/common';
import { CreateTodoDto } from './dto/create-todo.dto';
import { ReplaceTodoDto } from './dto/replace-todo.dto';
import { UpdateTodoDto } from './dto/update-todo.dto';
......@@ -220,7 +220,7 @@ describe('TodoService', () => {
roles: ['user'],
});
} catch (e) {
expect(e).toBeInstanceOf(MethodNotAllowedException);
expect(e).toBeInstanceOf(ForbiddenException);
expect(e.message).toEqual('You have to be member of the role admin to call this method!');
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment