-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuserConverter.spec.ts
More file actions
39 lines (38 loc) · 1.12 KB
/
userConverter.spec.ts
File metadata and controls
39 lines (38 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import KakaoResponse, {
kakaoToPiickleUser
} from '../src/services/dto/KakaoResponse';
import { expect } from 'chai';
describe('kakaoToPiickleUser', () => {
it('should return IUser', () => {
const kakaoUser: KakaoResponse = {
id: '1234',
kakao_account: {
profile_nickname_needs_agreement: true,
profile_image_needs_agreement: true,
profile: {
// nickname: 'nickname',
thumbnail_image_url: 'kakao',
profile_image_url: 'kakao',
is_default_image: true
},
has_email: true,
email_needs_agreement: true,
is_email_valid: true,
is_email_verified: true,
email: 'kakao',
has_age_range: true,
age_range_needs_agreement: true,
age_range: '20~29',
has_birthday: true,
birthday_needs_agreement: true,
birthday: '1103',
birthday_type: 'SOLAR',
has_gender: true,
gender_needs_agreement: true,
gender: 'female'
}
};
const convertedUser = kakaoToPiickleUser(kakaoUser);
expect(convertedUser.nickname).equals('kakao 1234');
});
});