This repository was archived by the owner on May 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/test/kotlin/com/stackspot/intellij/services Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ internal class CreateProjectServiceTest {
4848
4949 @Nested
5050 inner class FailureCases {
51+
5152 @Test
5253 fun `service state should be STACKFILES_EMPTY` () {
5354 every { importedStacks.hasStackFiles() } returns false
@@ -95,6 +96,7 @@ internal class CreateProjectServiceTest {
9596
9697 @Nested
9798 inner class SuccessCases {
99+
98100 @Test
99101 fun `should clear service attributes` () {
100102 val service = CreateProjectService ().saveInfo(createStack(), createStackfile())
@@ -109,9 +111,11 @@ internal class CreateProjectServiceTest {
109111 @Test
110112 fun `service state should be OK` () {
111113 every { importedStacks.hasStackFiles() } returns true
112- val service = CreateProjectService (importedStacks, isInstalled = true )
114+ every { (gitConfigCmd.runner as BackgroundCommandRunner ).stdout } returns " ok"
115+ val service = CreateProjectService (importedStacks, isInstalled = true , gitConfigCmd = gitConfigCmd)
113116 service.state shouldBe ProjectWizardState .OK
114117 verify { importedStacks.hasStackFiles() }
118+ verify(exactly = 2 ) { gitConfigCmd.run () }
115119 confirmVerified(importedStacks)
116120 }
117121
You can’t perform that action at this time.
0 commit comments