diff --git a/Tests/AppTests/CustomCollectionControllerTests.swift b/Tests/AppTests/CustomCollectionControllerTests.swift index 77dee0984..dc5c1b02f 100644 --- a/Tests/AppTests/CustomCollectionControllerTests.swift +++ b/Tests/AppTests/CustomCollectionControllerTests.swift @@ -102,7 +102,7 @@ class CustomCollectionControllerTests: AppTestCase { url: "https://github.com/foo/bar/list.json", packages: [( id: .id0, url: "https://github.com/foo/1", owner: "foo", name: "1" )] ) - + // MUT try await app.test(.GET, "/collections/list") { req async in // validate @@ -111,6 +111,16 @@ class CustomCollectionControllerTests: AppTestCase { } } + func test_not_found() throws { + try withDependencies { + $0.environment.dbId = { nil } + } operation: { + try app.test(.GET, "/collections/list") { + XCTAssertEqual($0.status, .notFound) + } + } + } + }