Skip to content

Commit e4a61c2

Browse files
Update Hindi - India locale tests to include fallback locale updates
1 parent 585a18c commit e4a61c2

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

test/sanity-check/api/locale-test.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ describe('Locale api Test', () => {
9494
.catch(done)
9595
})
9696

97-
it('should get and update a language Hindi - India', done => {
97+
it('should get and update a language Hindi - India with fallback locale en-at', done => {
9898
makeLocale('hi-in')
9999
.fetch()
100100
.then((locale) => {
101-
locale.fallback_locale = 'en-at'
102-
return locale.update()
101+
// locale.fallback_locale = 'en-at'
102+
return locale.update({locale:{ fallback_locale: 'en-at' }})
103103
})
104104
.then((locale) => {
105105
expect(locale.code).to.be.equal('hi-in')
@@ -111,6 +111,23 @@ describe('Locale api Test', () => {
111111
.catch(done)
112112
})
113113

114+
it('should get and update a language Hindi - India with fallback locale en-us', done => {
115+
makeLocale('hi-in')
116+
.fetch()
117+
.then((locale) => {
118+
locale.fallback_locale = 'en-us'
119+
return locale.update()
120+
})
121+
.then((locale) => {
122+
expect(locale.code).to.be.equal('hi-in')
123+
expect(locale.name).to.be.equal('Hindi - India')
124+
expect(locale.fallback_locale).to.be.equal('en-us')
125+
expect(locale.uid).to.be.not.equal(null)
126+
done()
127+
})
128+
.catch(done)
129+
})
130+
114131
it('should delete language: Hindi - India', done => {
115132
makeLocale('mr-in')
116133
.delete()

0 commit comments

Comments
 (0)