Skip to content

Commit 6e527a7

Browse files
committed
Add test_PackageShowView_customCollection
1 parent 1517006 commit 6e527a7

File tree

2 files changed

+457
-0
lines changed

2 files changed

+457
-0
lines changed

Tests/AppTests/WebpageSnapshotTests.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,15 @@ class WebpageSnapshotTests: SnapshotTestCase {
282282
assertSnapshot(of: page, as: .html)
283283
}
284284

285+
func test_PackageShowView_customCollection() throws {
286+
var model = API.PackageController.GetRoute.Model.mock
287+
model.homepageUrl = "https://swiftpackageindex.com/"
288+
model.customCollections = [.init(name: "Custom Collection", url: "https://github.com/foo/bar/list.json")]
289+
let page = { PackageShow.View(path: "", model: model, packageSchema: .mock).document() }
290+
291+
assertSnapshot(of: page, as: .html)
292+
}
293+
285294
func test_PackageReleasesView() throws {
286295
let model = PackageReleases.Model.mock
287296
let page = { PackageReleases.View(model: model).document() }

0 commit comments

Comments
 (0)