Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
adds test for duplicate name issue
Browse files Browse the repository at this point in the history
  • Loading branch information
czpython committed Jul 8, 2015
1 parent f063ea1 commit c430e98
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions aldryn_people/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ def test_auto_slugify(self):
person.save()
self.assertEquals(person.slug, slug)

def test_auto_slugify_same_name(self):
name_1 = 'Melchior Hoffman'
slug_1 = 'melchior-hoffman'
person_1 = Person.objects.create(name=name_1)
person_1.save()

name_2 = 'Melchior Hoffman'
slug_2 = 'melchior-hoffman-2'
person_2 = Person.objects.create(name=name_2)
person_2.save()

self.assertEquals(person_1.slug, slug_1)
self.assertEquals(person_2.slug, slug_2)


class TestBasicGroupModel(TransactionTestCase):

Expand Down

0 comments on commit c430e98

Please sign in to comment.