summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/patchwork/tests/bundles.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/patchwork/tests/bundles.py b/apps/patchwork/tests/bundles.py
index 2f2f122..4e8fe2b 100644
--- a/apps/patchwork/tests/bundles.py
+++ b/apps/patchwork/tests/bundles.py
@@ -194,6 +194,20 @@ class BundleCreateFromPatchTest(BundleTestBase):
self.failUnlessEqual(bundle.patches.count(), 1)
self.failUnlessEqual(bundle.patches.all()[0], patch)
+ def testCreateWithExistingName(self):
+ newbundlename = self.bundle.name
+ patch = self.patches[0]
+
+ params = {'name': newbundlename,
+ 'action': 'createbundle'}
+
+ response = self.client.post('/patch/%d/' % patch.id, params)
+
+ self.assertContains(response,
+ 'A bundle called %s already exists' % newbundlename)
+
+ count = Bundle.objects.count()
+ self.failUnlessEqual(Bundle.objects.count(), 1)
class BundleAddFromListTest(BundleTestBase):
def testAddToEmptyBundle(self):