Skip to content

Commit ce9e49a

Browse files
committed
test
1 parent ee02a65 commit ce9e49a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/codewhisperer/CodeWhispererModelConfiguratorTest.kt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -566,24 +566,19 @@ class CodeWhispererModelConfiguratorTest {
566566
}
567567

568568
@Test
569-
fun `profile switch should keep using existing customization if new list still contains that arn`() {
569+
fun `should switch to default customization on profile changed`() {
570570
val ssoConn = spy(LegacyManagedBearerSsoConnection(region = "us-east-1", startUrl = "url 1", scopes = Q_SCOPES))
571571
ToolkitConnectionManager.getInstance(projectRule.project).switchConnection(ssoConn)
572572
val oldCustomization = CodeWhispererCustomization("oldArn", "oldName", "oldDescription")
573573
sut.switchCustomization(projectRule.project, oldCustomization)
574574

575575
assertThat(sut.activeCustomization(projectRule.project)).isEqualTo(oldCustomization)
576576

577-
val fakeCustomizations = listOf(
578-
CodeWhispererCustomization("oldArn", "oldName", "oldDescription")
579-
)
580-
mockClintAdaptor.stub { on { listAvailableCustomizations() } doReturn fakeCustomizations }
581-
582577
ApplicationManager.getApplication().messageBus
583578
.syncPublisher(QRegionProfileSelectedListener.TOPIC)
584579
.onProfileSelected(projectRule.project, null)
585580

586-
assertThat(sut.activeCustomization(projectRule.project)).isEqualTo(oldCustomization)
581+
assertThat(sut.activeCustomization(projectRule.project)).isEqualTo(null)
587582
}
588583

589584
@Test

0 commit comments

Comments
 (0)