Skip to content

test(session): fix SessionController unit test compilation (tippingDelegate) - #1129

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/test-failures-code-cash
Jul 23, 2026
Merged

test(session): fix SessionController unit test compilation (tippingDelegate)#1129
bmc08gt merged 1 commit into
code/cashfrom
fix/test-failures-code-cash

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What

Adds the required tippingDelegate argument to the two RealSessionController construction sites in the session module's unit tests.

Why

RealSessionController gained a required constructor parameter tippingDelegate: TipCardDelegate (tip card resolution/presentation), but SessionControllerEventRoutingTest and SessionControllerGiftCardErrorTest still constructed it without that argument. This broke :apps:flipcash:shared:session:compileDebugUnitTestKotlin, which failed the whole ./gradlew test build:

e: SessionControllerEventRoutingTest.kt:124:13 No value passed for parameter 'tippingDelegate'.
e: SessionControllerGiftCardErrorTest.kt:147:13 No value passed for parameter 'tippingDelegate'.

Fix

Pass tippingDelegate = mockk(relaxed = true), matching how the other delegates (depositDelegate, etc.) are supplied in these tests.

Testing

  • ./gradlew :apps:flipcash:shared:session:testDebugUnitTest — passes
  • ./gradlew test --continue — BUILD SUCCESSFUL (no remaining failures)

RealSessionController gained a required tippingDelegate: TipCardDelegate
constructor parameter (tip card resolution/presentation), but the two
SessionController unit tests still constructed it without that argument,
breaking :apps:flipcash:shared:session:compileDebugUnitTestKotlin and the
overall test build. Pass a relaxed mock, matching the other delegates.
@github-actions github-actions Bot added area: session type: test Test additions or improvements labels Jul 23, 2026
@bmc08gt bmc08gt self-assigned this Jul 23, 2026
@bmc08gt
bmc08gt merged commit 4fc8269 into code/cash Jul 23, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/test-failures-code-cash branch July 23, 2026 22:19
bmc08gt added a commit that referenced this pull request Jul 24, 2026
…1129)

RealSessionController gained a required tippingDelegate: TipCardDelegate
constructor parameter (tip card resolution/presentation), but the two
SessionController unit tests still constructed it without that argument,
breaking :apps:flipcash:shared:session:compileDebugUnitTestKotlin and the
overall test build. Pass a relaxed mock, matching the other delegates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: session type: test Test additions or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant