Skip to content

Commit

Permalink
Add test_not_found
Browse files Browse the repository at this point in the history
  • Loading branch information
finestructure committed Jan 20, 2025
1 parent 62076f8 commit 551bd2d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Tests/AppTests/CustomCollectionControllerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
}
}

}


Expand Down

0 comments on commit 551bd2d

Please sign in to comment.