From ef6e2087aeff1cf76cd4e5a3f04685e228c169d4 Mon Sep 17 00:00:00 2001 From: Shpuld Shpludson Date: Tue, 5 Jan 2021 08:09:08 +0000 Subject: fix #1036 convert screen name to unicode with punycode --- .../unit/specs/services/entity_normalizer/entity_normalizer.spec.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js index e1f7a958..a3f49b2c 100644 --- a/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js +++ b/test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js @@ -311,6 +311,12 @@ describe('API Entities normalizer', () => { expect(parseUser(user)).to.have.property('hide_followers_count', false) expect(parseUser(user)).to.have.property('hide_follows_count', true) }) + + it('converts IDN to unicode and marks it as internatonal', () => { + const user = makeMockUserMasto({ acct: 'lain@xn--lin-6cd.com' }) + + expect(parseUser(user)).to.have.property('screen_name').that.equal('lain@🌏lаin.com') + }) }) // We currently use QvitterAPI notifications only, and especially due to MastoAPI lacking is_seen, support for MastoAPI -- cgit v1.2.3-70-g09d2