Skip to content

Commit 551bd2d

Browse files
committed
Add test_not_found
1 parent 62076f8 commit 551bd2d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Tests/AppTests/CustomCollectionControllerTests.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class CustomCollectionControllerTests: AppTestCase {
102102
url: "https://github.com/foo/bar/list.json",
103103
packages: [( id: .id0, url: "https://github.com/foo/1", owner: "foo", name: "1" )]
104104
)
105-
105+
106106
// MUT
107107
try await app.test(.GET, "/collections/list") { req async in
108108
// validate
@@ -111,6 +111,16 @@ class CustomCollectionControllerTests: AppTestCase {
111111
}
112112
}
113113

114+
func test_not_found() throws {
115+
try withDependencies {
116+
$0.environment.dbId = { nil }
117+
} operation: {
118+
try app.test(.GET, "/collections/list") {
119+
XCTAssertEqual($0.status, .notFound)
120+
}
121+
}
122+
}
123+
114124
}
115125

116126

0 commit comments

Comments
 (0)