Skip to content

Commit 62076f8

Browse files
committed
Add test_show_collection (fails without fix from #3619)
1 parent 09feefb commit 62076f8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Tests/AppTests/CustomCollectionControllerTests.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,26 @@ class CustomCollectionControllerTests: AppTestCase {
9191
}
9292
}
9393

94+
func test_show_collection() async throws {
95+
try await withDependencies {
96+
$0.environment.dbId = { nil }
97+
} operation: {
98+
try await CustomCollection.save(
99+
on: app.db,
100+
key: "list",
101+
name: "List",
102+
url: "https://github.com/foo/bar/list.json",
103+
packages: [( id: .id0, url: "https://github.com/foo/1", owner: "foo", name: "1" )]
104+
)
105+
106+
// MUT
107+
try await app.test(.GET, "/collections/list") { req async in
108+
// validate
109+
XCTAssertEqual(req.status, .ok)
110+
}
111+
}
112+
}
113+
94114
}
95115

96116

0 commit comments

Comments
 (0)