Skip to content

Commit

Permalink
[BE] fix: 그룹 순서변경을 위한 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Dltmd202 committed Jan 10, 2024
1 parent 5fbed4f commit fe3d6e4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('GroupCategoryEntity Test', () => {

it('user와 group이 없는 경우에도 변환이 가능하다.', () => {
// given
const groupCategory = new GroupCategory(null, null, '#1');
const groupCategory = new GroupCategory(null, null, '#1',0);

// when
const groupCategoryEntity = GroupCategoryEntity.from(groupCategory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('GroupCategoryRepository test', () => {
// given
const user = await userFixture.getUser('ABC');
const group = await groupFixture.createGroups(user);
const groupCategory = new GroupCategory(user, group, '카테고리1');
const groupCategory = new GroupCategory(user, group, '카테고리1', 0);

// when
const saved =
Expand Down
4 changes: 2 additions & 2 deletions BE/src/group/group/domain/group.domain.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Group Domain Test', () => {
test('유저를 추가할 수 있다.', () => {
//given
//when
const group = new Group('Test Group', 'avatarUrl');
const group = new Group('Test Group', 'avatarUrl', 0, 0);
const user = new User();
group.addMember(user, UserGroupGrade.PARTICIPANT);

Expand All @@ -19,7 +19,7 @@ describe('Group Domain Test', () => {
test('그룹 로고를 설정할 수 있다.', () => {
//given
//when
const group = new Group('Test Group', null);
const group = new Group('Test Group', null, 0, 0);
group.assignAvatarUrl('https://image.site/image/group-1.jpg');

//then
Expand Down
8 changes: 4 additions & 4 deletions BE/src/group/group/entities/group.entity.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('GroupEntity Test', () => {
describe('from으로 Group 대한 GroupEntity를 만들 수 있다.', () => {
it('userGroups를 가지고 있지 않은 경우에 변환이 가능하다.', () => {
// given
const group = new Group('group', 'avatarUrl');
const group = new Group('group', 'avatarUrl', 0, 0);
group.assignGroupCode('ABCDEF1');

// when
Expand All @@ -25,7 +25,7 @@ describe('GroupEntity Test', () => {

it('userGroups를 가지고 있는 경우에 변환이 가능하다.', () => {
// given
const group = new Group('group', 'avatarUrl');
const group = new Group('group', 'avatarUrl', 0, 0);
const user = UsersFixture.user('ABC');

group.userGroups = [];
Expand All @@ -52,7 +52,7 @@ describe('GroupEntity Test', () => {
describe('toModel으로 GroupEntity를 Group 도메인 객체로 변환할 수 있다.', () => {
it('userGroups를 가지고 있지 않은 경우에 변환이 가능하다.', () => {
// given
const group = new Group('group', 'avatarUrl');
const group = new Group('group', 'avatarUrl', 0, 0);
group.assignGroupCode('ABCDEF1');
const groupEntity = GroupEntity.from(group);

Expand All @@ -69,7 +69,7 @@ describe('GroupEntity Test', () => {

it('userGroups를 가지고 있는 경우에 변환이 가능하다.', () => {
// given
const group = new Group('group', 'avatarUrl');
const group = new Group('group', 'avatarUrl', 0, 0);
const user = UsersFixture.user('ABC');
const userGroup = new UserGroup(
user,
Expand Down

0 comments on commit fe3d6e4

Please sign in to comment.