Skip to content

Commit

Permalink
Cover non-translate case in test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihneadb committed May 24, 2019
1 parent 660e37e commit 214dd8a
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion test/unit/middleware/changeLanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ module.exports.tests.success_conditions = (test, common) => {
// doc with name that will be translated
{
name: {
default: 'original name for 1st result',
default: 'original name for 4th result',
'requested language': 'translated name'
},
// note that this is address!
Expand All @@ -192,6 +192,19 @@ module.exports.tests.success_conditions = (test, common) => {
layer1_id: ['1'],
layer1: ['original name for layer1']
}
},
// doc with name that will be translated
{
name: {
default: 'original name for 5th result',
'random language': 'translated name'
},
// note that this is address!
layer: 'address',
parent: {
layer1_id: ['1'],
layer1: ['original name for layer1']
}
}
]
};
Expand Down Expand Up @@ -247,6 +260,17 @@ module.exports.tests.success_conditions = (test, common) => {
layer1_id: ['1'],
layer1: ['replacement name for layer1']
}
},
{
name: {
default: 'original name for 5th result',
'random language': 'translated name'
},
layer: 'address',
parent: {
layer1_id: ['1'],
layer1: ['replacement name for layer1']
}
}
]
});
Expand Down

0 comments on commit 214dd8a

Please sign in to comment.