1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #11157 -- Stopped removing stop words in admin's prepopulated_fields.

Co-Authored-By: Andy Chosak <andy@chosak.org>
This commit is contained in:
Scott Cranfill
2020-05-20 13:11:30 -04:00
committed by Mariusz Felisiak
parent 922ff51f5a
commit 62f1655a64
6 changed files with 44 additions and 50 deletions

View File

@@ -7,8 +7,8 @@ QUnit.test('empty string', function(assert) {
assert.strictEqual(URLify('', 8, true), '');
});
QUnit.test('strip nonessential words', function(assert) {
assert.strictEqual(URLify('the D is silent', 8, true), 'd-silent');
QUnit.test('preserve nonessential words', function(assert) {
assert.strictEqual(URLify('the D is silent', 15, true), 'the-d-is-silent');
});
QUnit.test('strip non-URL characters', function(assert) {
@@ -23,7 +23,6 @@ QUnit.test('trim trailing hyphens', function(assert) {
assert.strictEqual(URLify('D silent always', 9, true), 'd-silent');
});
QUnit.test('do not remove English words if the string contains non-ASCII', function(assert) {
// If removing English words wasn't skipped, the last 'a' would be removed.
QUnit.test('non-ASCII string', function(assert) {
assert.strictEqual(URLify('Kaupa-miða', 255, true), 'kaupa-miða');
});