Index: test/filterStorage.js |
=================================================================== |
--- a/test/filterStorage.js |
+++ b/test/filterStorage.js |
@@ -74,28 +74,28 @@ exports.testAddingSubscriptions = functi |
} |
FilterNotifier.addListener(listener); |
compareSubscriptionList(test, "Initial state", []); |
test.deepEqual(changes, [], "Received changes"); |
changes = []; |
FilterStorage.addSubscription(subscription1); |
- compareSubscriptionList(test, "Regular add", [subscription1]); |
+ compareSubscriptionList(test, "Adding first subscription", [subscription1]); |
test.deepEqual(changes, ["subscription.added http://test1/"], "Received changes"); |
changes = []; |
FilterStorage.addSubscription(subscription1); |
compareSubscriptionList(test, "Adding already added subscription", [subscription1]); |
test.deepEqual(changes, [], "Received changes"); |
changes = []; |
- FilterStorage.addSubscription(subscription2, true); |
- compareSubscriptionList(test, "Silent add", [subscription1, subscription2]); |
- test.deepEqual(changes, [], "Received changes"); |
+ FilterStorage.addSubscription(subscription2); |
+ compareSubscriptionList(test, "Adding second", [subscription1, subscription2]); |
+ test.deepEqual(changes, ["subscription.added http://test2/"], "Received changes"); |
FilterStorage.removeSubscription(subscription1); |
compareSubscriptionList(test, "Remove", [subscription2]); |
changes = []; |
FilterStorage.addSubscription(subscription1); |
compareSubscriptionList(test, "Re-adding previously removed subscription", [subscription2, subscription1]); |
test.deepEqual(changes, ["subscription.added http://test1/"], "Received changes"); |
@@ -118,28 +118,28 @@ exports.testRemovingSubscriptions = func |
} |
FilterNotifier.addListener(listener); |
compareSubscriptionList(test, "Initial state", [subscription1, subscription2]); |
test.deepEqual(changes, [], "Received changes"); |
changes = []; |
FilterStorage.removeSubscription(subscription1); |
- compareSubscriptionList(test, "Regular remove", [subscription2]); |
+ compareSubscriptionList(test, "Removing first subscription", [subscription2]); |
test.deepEqual(changes, ["subscription.removed http://test1/"], "Received changes"); |
changes = []; |
FilterStorage.removeSubscription(subscription1); |
compareSubscriptionList(test, "Removing already removed subscription", [subscription2]); |
test.deepEqual(changes, [], "Received changes"); |
changes = []; |
- FilterStorage.removeSubscription(subscription2, true); |
- compareSubscriptionList(test, "Silent remove", []); |
- test.deepEqual(changes, [], "Received changes"); |
+ FilterStorage.removeSubscription(subscription2); |
+ compareSubscriptionList(test, "Removing remaining subscription", []); |
+ test.deepEqual(changes, ["subscription.removed http://test2/"], "Received changes"); |
FilterStorage.addSubscription(subscription1); |
compareSubscriptionList(test, "Add", [subscription1]); |
changes = []; |
FilterStorage.removeSubscription(subscription1); |
compareSubscriptionList(test, "Re-removing previously added subscription", []); |
test.deepEqual(changes, ["subscription.removed http://test1/"], "Received changes"); |
@@ -245,19 +245,19 @@ exports.testAddingFilters = function(tes |
test.deepEqual(changes, ["filter.added foo#bar"], "Received changes"); |
changes = []; |
FilterStorage.addFilter(Filter.fromText("foo#@#bar")); |
compareFiltersList(test, "Adding hiding exception", [["foo"], ["@@bar", "foo#bar", "foo#@#bar"], []]); |
test.deepEqual(changes, ["filter.added foo#@#bar"], "Received changes"); |
changes = []; |
- FilterStorage.addFilter(Filter.fromText("!foobar"), undefined, undefined, true); |
- compareFiltersList(test, "Adding comment silent", [["foo"], ["@@bar", "foo#bar", "foo#@#bar"], ["!foobar"]]); |
- test.deepEqual(changes, [], "Received changes"); |
+ FilterStorage.addFilter(Filter.fromText("!foobar")); |
+ compareFiltersList(test, "Adding comment", [["foo"], ["@@bar", "foo#bar", "foo#@#bar"], ["!foobar"]]); |
+ test.deepEqual(changes, ["filter.added !foobar"], "Received changes"); |
changes = []; |
FilterStorage.addFilter(Filter.fromText("foo")); |
compareFiltersList(test, "Adding already added filter", [["foo"], ["@@bar", "foo#bar", "foo#@#bar"], ["!foobar"]]); |
test.deepEqual(changes, [], "Received changes"); |
subscription1.disabled = true; |