Skip to content

Commit 1c75407

Browse files
committed
Update mapper test
1 parent fcb07a8 commit 1c75407

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

Networking/NetworkingTests/Mapper/SiteListMapperTests.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ final class SiteListMapperTests: XCTestCase {
2424
XCTAssertFalse(site.wasEcommerceTrial)
2525
XCTAssertEqual(site.plan, "business-bundle")
2626
}
27+
28+
func test_site_hasSSOEnabled_is_parsed_successfully() throws {
29+
// Given
30+
let sites = mapLoadSiteListResponse()
31+
32+
// Then
33+
let first = try XCTUnwrap(sites[safe: 0])
34+
XCTAssertTrue(first.hasSSOEnabled)
35+
36+
let second = try XCTUnwrap(sites[safe: 1])
37+
XCTAssertFalse(second.hasSSOEnabled)
38+
}
2739
}
2840

2941
private extension SiteListMapperTests {

Networking/NetworkingTests/Responses/sites.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,43 @@
4343
]
4444
}
4545
},
46+
"jetpack_modules": [
47+
"carousel",
48+
"comment-likes",
49+
"comments",
50+
"contact-form",
51+
"copy-post",
52+
"custom-content-types",
53+
"gravatar-hovercards",
54+
"infinite-scroll",
55+
"json-api",
56+
"latex",
57+
"likes",
58+
"notes",
59+
"photon",
60+
"photon-cdn",
61+
"post-by-email",
62+
"protect",
63+
"publicize",
64+
"search",
65+
"seo-tools",
66+
"sharedaddy",
67+
"shortcodes",
68+
"shortlinks",
69+
"sitemaps",
70+
"sso",
71+
"stats",
72+
"subscriptions",
73+
"tiled-gallery",
74+
"verification-tools",
75+
"videopress",
76+
"widget-visibility",
77+
"widgets",
78+
"google-fonts",
79+
"blaze",
80+
"woocommerce-analytics",
81+
"blocks"
82+
],
4683
"options": {
4784
"timezone": "",
4885
"gmt_offset": 3.5,
@@ -212,6 +249,7 @@
212249
"product_id": 1008,
213250
"product_slug": "business-bundle"
214251
},
252+
"jetpack_modules": [],
215253
"options": {
216254
"timezone": "",
217255
"gmt_offset": -4,

0 commit comments

Comments
 (0)