Fix broken settings tests

Bug: 214907472
Bug: 214907514
Test: make -j64 RunSettingsRoboTests
Change-Id: If87b1041f2e6357241963240efb5337ab31610bc
This commit is contained in:
Hugh Chen
2022-01-18 03:48:58 +00:00
parent 1002473fc2
commit 99000589be
3 changed files with 15 additions and 12 deletions

View File

@@ -26,7 +26,6 @@ import android.content.Context;
import android.content.Intent;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -75,13 +74,13 @@ public class AlwaysDiscoverableTest {
}
@Test
@Ignore
public void startSetsModeAndRegistersReceiver() {
mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_NONE);
mAlwaysDiscoverable.start();
assertThat(mBluetoothAdapter.getScanMode())
.isEqualTo(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
verify(mContext).registerReceiver(eq(mAlwaysDiscoverable), any());
verify(mContext).registerReceiver(eq(mAlwaysDiscoverable), any(),
eq(Context.RECEIVER_EXPORTED_UNAUDITED));
}
@Test