Left: | ||
Right: |
OLD | NEW |
---|---|
1 (function() | 1 (function() |
2 { | 2 { |
3 module("Subscription classes", {setup: prepareFilterComponents, teardown: rest oreFilterComponents}); | 3 module("Subscription classes", {setup: prepareFilterComponents, teardown: rest oreFilterComponents}); |
4 | 4 |
5 function compareSubscription(url, expected, postInit) | 5 function compareSubscription(url, expected, postInit) |
6 { | 6 { |
7 expected.push("[Subscription]") | 7 expected.push("[Subscription]") |
8 let subscription = Subscription.fromURL(url); | 8 let subscription = Subscription.fromURL(url); |
9 if (postInit) | 9 if (postInit) |
10 postInit(subscription) | 10 postInit(subscription) |
(...skipping 15 matching lines...) Expand all Loading... | |
26 { | 26 { |
27 equal(typeof Subscription, "function", "typeof Subscription"); | 27 equal(typeof Subscription, "function", "typeof Subscription"); |
28 equal(typeof SpecialSubscription, "function", "typeof SpecialSubscription"); | 28 equal(typeof SpecialSubscription, "function", "typeof SpecialSubscription"); |
29 equal(typeof RegularSubscription, "function", "typeof RegularSubscription"); | 29 equal(typeof RegularSubscription, "function", "typeof RegularSubscription"); |
30 equal(typeof ExternalSubscription, "function", "typeof ExternalSubscription" ); | 30 equal(typeof ExternalSubscription, "function", "typeof ExternalSubscription" ); |
31 equal(typeof DownloadableSubscription, "function", "typeof DownloadableSubsc ription"); | 31 equal(typeof DownloadableSubscription, "function", "typeof DownloadableSubsc ription"); |
32 }); | 32 }); |
33 | 33 |
34 test("Subscriptions with state", function() | 34 test("Subscriptions with state", function() |
35 { | 35 { |
36 compareSubscription("~fl~", ["url=~fl~", "title=" + Utils.getString("newGrou p_title")]); | 36 compareSubscription("~fl~", ["url=~fl~"]); |
Sebastian Noack
2016/05/31 10:28:34
Didn't we completely removed that syntax?
Wladimir Palant
2016/05/31 10:32:58
We removed special treatment for these subscriptio
| |
37 compareSubscription("http://test/default", ["url=http://test/default", "titl e=http://test/default"]); | 37 compareSubscription("http://test/default", ["url=http://test/default", "titl e=http://test/default"]); |
38 compareSubscription("http://test/default_titled", ["url=http://test/default_ titled", "title=test"], function(subscription) | 38 compareSubscription("http://test/default_titled", ["url=http://test/default_ titled", "title=test"], function(subscription) |
39 { | 39 { |
40 subscription.title = "test"; | 40 subscription.title = "test"; |
41 }); | 41 }); |
42 compareSubscription("http://test/non_default", ["url=http://test/non_default ", "title=test", | 42 compareSubscription("http://test/non_default", ["url=http://test/non_default ", "title=test", |
43 "disabled=true", "lastSucces s=8", "lastDownload=12", "lastCheck=16", "softExpiration=18", "expires=20", "dow nloadStatus=foo", | 43 "disabled=true", "lastSucces s=8", "lastDownload=12", "lastCheck=16", "softExpiration=18", "expires=20", "dow nloadStatus=foo", |
44 "errors=3", "version=24", "r equiredVersion=0.6"], function(subscription) | 44 "errors=3", "version=24", "r equiredVersion=0.6"], function(subscription) |
45 { | 45 { |
46 subscription.title = "test"; | 46 subscription.title = "test"; |
47 subscription.disabled = true; | 47 subscription.disabled = true; |
48 subscription.lastSuccess = 8; | 48 subscription.lastSuccess = 8; |
49 subscription.lastDownload = 12; | 49 subscription.lastDownload = 12; |
50 subscription.lastCheck = 16; | 50 subscription.lastCheck = 16; |
51 subscription.softExpiration = 18; | 51 subscription.softExpiration = 18; |
52 subscription.expires = 20; | 52 subscription.expires = 20; |
53 subscription.downloadStatus = "foo"; | 53 subscription.downloadStatus = "foo"; |
54 subscription.errors = 3; | 54 subscription.errors = 3; |
55 subscription.version = 24 | 55 subscription.version = 24 |
56 subscription.requiredVersion = "0.6"; | 56 subscription.requiredVersion = "0.6"; |
57 }); | 57 }); |
58 compareSubscription("~wl~", ["url=~wl~", "disabled=true", "title=Test group" ], function(subscription) | 58 compareSubscription("~wl~", ["url=~wl~", "disabled=true", "title=Test group" ], function(subscription) |
59 { | 59 { |
60 subscription.title = "Test group"; | 60 subscription.title = "Test group"; |
61 subscription.disabled = true; | 61 subscription.disabled = true; |
62 }); | 62 }); |
63 }); | 63 }); |
64 })(); | 64 })(); |
OLD | NEW |