Skip to content

Commit 757cfa2

Browse files
committed
Update system status json to include inactive plugins; update mapper test to wit
1 parent 8ee7222 commit 757cfa2

File tree

2 files changed

+62
-29
lines changed

2 files changed

+62
-29
lines changed

Networking/NetworkingTests/Mapper/SystemStatusMapperTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class SystemStatusMapperTests: XCTestCase {
1717
let expectedPlugin = "woocommerce/woocommerce.php"
1818
let expectedName = "WooCommerce"
1919
let expectedUrl = "https://woocommerce.com/"
20-
let expectedVersion = "3.0.0-rc.1"
21-
let expectedVersionLatest = "2.6.14"
20+
let expectedVersion = "5.8.0"
21+
let expectedVersionLatest = "5.8.0"
2222
let expectedAuthorName = "Automattic"
2323
let expectedAuthorUrl = "https://woocommerce.com"
2424
let expectedNetworkActivated = false
@@ -27,7 +27,7 @@ class SystemStatusMapperTests: XCTestCase {
2727
let systemPlugins = try mapLoadSystemStatusResponse()
2828

2929
// Then
30-
XCTAssertEqual(systemPlugins.count, 3)
30+
XCTAssertEqual(systemPlugins.count, 4)
3131

3232
let systemPlugin = systemPlugins[0]
3333
XCTAssertNotNil(systemPlugin)

Networking/NetworkingTests/Responses/systemStatus.json

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,67 @@
1-
{ "data": {
2-
"active_plugins": [
1+
{
2+
"data":{
3+
"active_plugins":[
34
{
4-
"plugin": "woocommerce/woocommerce.php",
5-
"name": "WooCommerce",
6-
"version": "3.0.0-rc.1",
7-
"version_latest": "2.6.14",
8-
"url": "https://woocommerce.com/",
9-
"author_name": "Automattic",
10-
"author_url": "https://woocommerce.com",
11-
"network_activated": false
5+
"plugin":"woocommerce\/woocommerce.php",
6+
"name":"WooCommerce",
7+
"version":"5.8.0",
8+
"version_latest":"5.8.0",
9+
"url":"https:\/\/woocommerce.com\/",
10+
"author_name":"Automattic",
11+
"author_url":"https:\/\/woocommerce.com",
12+
"network_activated":false
1213
},
1314
{
14-
"plugin": "woocommerce-payments/woocommerce-payments",
15-
"name": "WooCommerce Payments",
16-
"version": "3.0.0-rc.1",
17-
"version_latest": "2.6.14",
18-
"url": "https://woocommerce.com/payments/",
19-
"author_name": "Automattic",
20-
"author_url": "https://woocommerce.com",
21-
"network_activated": true
15+
"plugin":"woocommerce-payments\/woocommerce-payments.php",
16+
"name":"WooCommerce Payments",
17+
"version":"3.1.0",
18+
"version_latest":"3.1.0",
19+
"url":"https:\/\/woocommerce.com\/payments\/",
20+
"author_name":"Automattic",
21+
"author_url":"https:\/\/woocommerce.com\/",
22+
"network_activated":false
2223
},
2324
{
24-
"plugin": "woocommerce-subscriptions/woocommerce-subscriptions",
25-
"name": "WooCommerce Subscriptions",
26-
"version": "3.0.0-rc.1",
27-
"version_latest": "2.6.14",
28-
"url": "https://www.woocommerce.com/products/woocommerce-subscriptions/",
29-
"author_name": "Automattic",
30-
"author_url": "https://woocommerce.com",
31-
"network_activated": false
25+
"plugin":"woocommerce-subscriptions\/woocommerce-subscriptions",
26+
"name":"WooCommerce Subscriptions",
27+
"version":"3.1.6",
28+
"version_latest":"3.1.6",
29+
"url":"https:\/\/www.woocommerce.com\/products\/woocommerce-subscriptions\/",
30+
"author_name":"Automattic",
31+
"author_url":"https:\/\/woocommerce.com\/",
32+
"network_activated":false
33+
},
34+
{
35+
"plugin":"jetpack\/jetpack.php",
36+
"name":"Jetpack",
37+
"version":"10.2",
38+
"version_latest":"10.2.1",
39+
"url":"https:\/\/jetpack.com",
40+
"author_name":"Automattic",
41+
"author_url":"https:\/\/jetpack.com",
42+
"network_activated":false
43+
}
44+
],
45+
"inactive_plugins":[
46+
{
47+
"plugin":"akismet\/akismet.php",
48+
"name":"Akismet Anti-Spam",
49+
"version":"4.2.1",
50+
"version_latest":"4.2.1",
51+
"url":"https:\/\/akismet.com\/",
52+
"author_name":"Automattic",
53+
"author_url":"https:\/\/automattic.com\/wordpress-plugins\/",
54+
"network_activated":false
55+
},
56+
{
57+
"plugin":"hello.php",
58+
"name":"Hello Dolly",
59+
"version":"1.7.2",
60+
"version_latest":"1.7.2",
61+
"url":"http:\/\/wordpress.org\/plugins\/hello-dolly\/",
62+
"author_name":"Matt Mullenweg",
63+
"author_url":"http:\/\/ma.tt\/",
64+
"network_activated":false
3265
}
3366
]
3467
}

0 commit comments

Comments
 (0)