Update test for smartspace disconnect

The views are no longer removed, only the controller disconnected.

Fixes: 198417199
Test: atest KeyguardClockSwitchControllerTest
Change-Id: I23969115ae33694714e12a05913128b208530a01
This commit is contained in:
Matt Pietal
2021-09-10 16:03:04 -04:00
parent 73ad080072
commit ff2c6554e3

View File

@@ -226,7 +226,7 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase {
}
@Test
public void testDetachRemovesSmartspaceView() {
public void testDetachDisconnectsSmartspace() {
when(mSmartspaceController.isEnabled()).thenReturn(true);
when(mSmartspaceController.buildAndConnectView(any())).thenReturn(mFakeSmartspaceView);
mController.init();
@@ -237,7 +237,7 @@ public class KeyguardClockSwitchControllerTest extends SysuiTestCase {
verify(mView).addOnAttachStateChangeListener(listenerArgumentCaptor.capture());
listenerArgumentCaptor.getValue().onViewDetachedFromWindow(mView);
verify(mView).removeView(mFakeSmartspaceView);
verify(mSmartspaceController).disconnect();
}
@Test