Merge "Fix Guest string was not translated in UMS.userWithName()" into tm-dev

This commit is contained in:
Yasin Kilicdere
2022-03-04 00:03:00 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 22 deletions

View File

@@ -662,12 +662,12 @@ public class UserSettingsTest {
public void onPreferenceClick_addGuestClicked_createGuestAndOpenDetails() {
UserInfo createdGuest = getGuest(false);
removeFlag(createdGuest, UserInfo.FLAG_INITIALIZED);
doReturn(createdGuest).when(mUserManager).createGuest(mActivity, "Guest");
doReturn(createdGuest).when(mUserManager).createGuest(mActivity);
doReturn(mActivity).when(mFragment).getContext();
mFragment.onPreferenceClick(mAddGuestPreference);
verify(mUserManager).createGuest(mActivity, "Guest");
verify(mUserManager).createGuest(mActivity);
Intent startedIntent = shadowOf(mActivity).getNextStartedActivity();
ShadowIntent shadowIntent = shadowOf(startedIntent);
assertThat(shadowIntent.getIntentClass()).isEqualTo(SubSettings.class);