Skip to content

Commit

Permalink
Update locale-related tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbuchar committed Jun 11, 2020
1 parent fc807dd commit c9ce102
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/embedded.test.js
Expand Up @@ -315,16 +315,6 @@ describe('HelloSign', () => {
}).toThrow(/"locale" must be a string/);
});

test('throws if "locale" is not supported', () => {
client = new HelloSign({ clientId: mockClientId });

expect(() => {
client.open(mockSignURL, {
locale: 'Mars',
});
}).toThrow(/"Mars" is not a supported locale/);
});

test('appends default value for "user_culture" to the iFrame URL if "locale" is not specified', (done) => {
client = new HelloSign({ clientId: mockClientId });

Expand All @@ -346,12 +336,12 @@ describe('HelloSign', () => {
const url = new URL(data.url);

expect(url.searchParams.has('user_culture')).toBe(true);
expect(url.searchParams.get('user_culture')).toBe('zh_CN');
expect(url.searchParams.get('user_culture')).toBe('zh-CN');
done();
});

client.open(mockSignURL, {
locale: 'zh_CN',
locale: 'zh-CN',
});
});

Expand Down

0 comments on commit c9ce102

Please sign in to comment.