From 0a78cb463952660f3bb257dd3dd030db725cd4f4 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 7 Sep 2012 21:06:57 +0200 Subject: Fix the test if a subscription already exists FS#2580 This fixes the test for existing subscriptions by not only testing if the subscription for the deepest namespace level is for the current page but by simply testing all levels. Test case is included, it fails without this change. --- _test/tests/inc/subscription_set.test.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 _test/tests/inc/subscription_set.test.php (limited to '_test') diff --git a/_test/tests/inc/subscription_set.test.php b/_test/tests/inc/subscription_set.test.php new file mode 100644 index 000000000..5c0a6c816 --- /dev/null +++ b/_test/tests/inc/subscription_set.test.php @@ -0,0 +1,20 @@ + 'admin')); + $this->assertCount(1, $subscriptions[':'], 'More than one subscription saved for the root namespace even though the old one should have been overwritten.'); + $this->assertCount(1, $subscriptions[':wiki:'], 'More than one subscription saved for the wiki namespace even though the old one should have been overwritten.'); + $this->assertCount(2, $subscriptions, 'Didn\'t find the expected two subscriptions'); + } +} -- cgit v1.2.3