mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
committed by
Rainer Killinger
parent
ff9fb49deb
commit
9488451080
@@ -101,8 +101,16 @@ describe('Elasticsearch', function () {
|
||||
});
|
||||
|
||||
describe('removeAliasChars', function () {
|
||||
it('should remove spaces from both ends', function () {
|
||||
expect(Elasticsearch.removeAliasChars(' foobaralias ', 'bulk-uid')).to.be.equal('foobaralias');
|
||||
});
|
||||
|
||||
it('should replace inner spaces with underscores', function () {
|
||||
expect(Elasticsearch.removeAliasChars('foo bar alias', 'bulk-uid')).to.be.equal('foo_bar_alias');
|
||||
});
|
||||
|
||||
it('should remove invalid characters', function () {
|
||||
expect(Elasticsearch.removeAliasChars('f,o#o\\ b|ar/ <?al\ias>* ', 'bulk-uid')).to.be.equal('foobaralias');
|
||||
expect(Elasticsearch.removeAliasChars('f,o#o\\b|ar/<?al\ias>* ', 'bulk-uid')).to.be.equal('foobaralias');
|
||||
});
|
||||
|
||||
it('should remove invalid starting characters', function () {
|
||||
|
||||
Reference in New Issue
Block a user