bigbuffet-rw/app/soapbox/normalizers/__tests__/account-test.js

20 lines
605 B
JavaScript
Raw Normal View History

2022-02-27 12:42:42 -08:00
import { fromJS } from 'immutable';
import { normalizeAccount } from '../account';
describe('normalizeAccount()', () => {
it('normalizes Fedibird birthday', () => {
const account = fromJS(require('soapbox/__fixtures__/fedibird-account.json'));
const result = normalizeAccount(account);
expect(result.get('birthday')).toEqual('1993-07-03');
});
it('normalizes Pleroma birthday', () => {
const account = fromJS(require('soapbox/__fixtures__/pleroma-account.json'));
const result = normalizeAccount(account);
expect(result.get('birthday')).toEqual('1993-07-03');
});
});