Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f046151 authored by Chun-Ku Lin's avatar Chun-Ku Lin
Browse files

Update the FlashNotificationsPreferenceFragmentTest to return correct

metric category

**Root Cause**
The test was written when the metric category is set to 0. After we
update the metric category to FLASH_NOTIFICATION_SETTINGS in the
FlashNotificationsPrefereenceFragment, we forgot to update the test.

Bug: 279082331
Test: atest FlashNotificationsPreferenceFragmentTest
Change-Id: Icd709bd9e571ca264226d0ca860e5c482eae3927
parent aeb630b1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

import android.app.settings.SettingsEnums;
import android.content.Context;

import androidx.test.core.app.ApplicationProvider;
@@ -66,8 +67,9 @@ public class FlashNotificationsPreferenceFragmentTest {
    }

    @Test
    public void getMetricsCategory_isZero() {
        assertThat(mFragment.getMetricsCategory()).isEqualTo(0); // TODO
    public void getMetricsCategory_returnsCorrectCategory() {
        assertThat(mFragment.getMetricsCategory()).isEqualTo(
                SettingsEnums.FLASH_NOTIFICATION_SETTINGS);
    }

    @Test