aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2021-01-05 08:09:08 +0000
committerShpuld Shpludson <shp@cock.li>2021-01-05 08:09:08 +0000
commitef6e2087aeff1cf76cd4e5a3f04685e228c169d4 (patch)
treeb7fdccb39641e42722b29145d797f6198c44bd0f /test
parent9d45db959f5c712a317ba9cfce317d8a55b9feb5 (diff)
fix #1036 convert screen name to unicode with punycode
Diffstat (limited to 'test')
-rw-r--r--test/unit/specs/services/entity_normalizer/entity_normalizer.spec.js6
1 files changed, 6 insertions, 0 deletions
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