Skip to content

Commit

Permalink
code-refactor: updates DefaultRoute object (#29)
Browse files Browse the repository at this point in the history
* code-refactor: updates `DefaultRoute` object

* Renames `RouteBase` to `DefaultRoute`

* Updates example

* Updates readme

* code-refactor: updates DefaultRoute object (#28)

* Renames `RouteBase` to `DefaultRoute`

* Updates example

* Updates readme

* Updates tests
  • Loading branch information
felilo authored Jun 19, 2024
1 parent 389af34 commit 038cf64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tests/SUICoordinatorTests/Models/AnyCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AnyCoordinator: Coordinator<AnyEnumRoute> {
}
}

class OtherCoordinator: Coordinator<RouteBase> {
class OtherCoordinator: Coordinator<DefaultRoute> {
override func start(animated: Bool = true) async {
let page = AnyEnumRoute.pushStep
await startFlow(route: .init(presentationStyle: page.presentationStyle, content: page.view))
Expand Down
4 changes: 2 additions & 2 deletions Tests/SUICoordinatorTests/RouterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ final class RouterTests: XCTestCase {
}

func test_navigationStack_popToView_with_customRoute() async throws {
let sut = Router<RouteBase>()
let sut = Router<DefaultRoute>()
let view = PushStepView.self
sut.mainView = RouteBase(presentationStyle: .push, content: PushStepView())
sut.mainView = DefaultRoute(presentationStyle: .push, content: PushStepView())

await sut.navigate(to: .init(presentationStyle: .push, content: PushStepView()), animated: false)
await sut.navigate(to: .init(presentationStyle: .push, content: PushStep2View()), animated: false)
Expand Down

0 comments on commit 038cf64

Please sign in to comment.