Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jayohms committed Nov 27, 2024
1 parent 6773fb2 commit 87280b4
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class NavigatorRuleTest {
private val webModalUri = Uri.parse("hotwire://fragment/web/modal")
private val webHomeUri = Uri.parse("hotwire://fragment/web/home")

private val navigatorName = "test"
private val extras = null
private val navOptions = navOptions {
anim {
Expand Down Expand Up @@ -387,12 +388,19 @@ class NavigatorRuleTest {
bundle: Bundle? = null
): NavigatorRule {
return NavigatorRule(
location, visitOptions, bundle, navOptions, extras, pathConfiguration, controller
location = location,
visitOptions = visitOptions,
bundle = bundle,
navOptions = navOptions,
extras = extras,
pathConfiguration = pathConfiguration,
navigatorName = navigatorName,
controller = controller
)
}

private fun locationArgs(location: String): Bundle {
return bundleOf("location" to location)
return bundleOf(ARG_LOCATION to location)
}

private fun buildControllerWithGraph(): TestNavHostController {
Expand Down Expand Up @@ -421,7 +429,8 @@ class NavigatorRuleTest {
navigator = provider.getNavigator<NavGraphNavigator>("test"),
id = webHomeDestinationId
).apply {
argument("location") { defaultValue = homeUrl }
argument(ARG_LOCATION) { defaultValue = homeUrl }
argument(ARG_NAVIGATOR_NAME) { defaultValue = navigatorName }
deepLink(webHomeUri.toString())
}
)
Expand Down

0 comments on commit 87280b4

Please sign in to comment.