Skip to content

Commit

Permalink
Remove mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
loichenninger committed Dec 12, 2024
1 parent cf51126 commit 8c8a712
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,20 @@
import io.swagger.v3.oas.models.OpenAPI;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.junit.jupiter.SpringExtension;

import static org.junit.jupiter.api.Assertions.*;

@ExtendWith({SpringExtension.class, MockitoExtension.class})
@ExtendWith({SpringExtension.class})
@SpringBootTest(classes = {SpringDocConfiguration.class, Config.class})
class SpringDocConfigurationTest {

@Autowired
private ApplicationContext applicationContext;

@Mock
private Config config; // Config mock to inject custom values

@InjectMocks
private SpringDocConfiguration springDocConfiguration;


@Test
void testNoAuthOpenAPIBeanCreation() {
System.setProperty("fr.insee.genesis.authentication", "NONE");
Expand Down

0 comments on commit 8c8a712

Please sign in to comment.