Skip to content

Commit

Permalink
- fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spolnik committed Jul 17, 2018
1 parent 05207d0 commit 055c46a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package com.jalgoarena
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.web.client.TestRestTemplate
import org.springframework.test.context.junit4.SpringRunner
import javax.inject.Inject

@RunWith(SpringRunner::class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class JAlgoArenaAuthServiceIntegrationTest {
@Inject

@Autowired
private lateinit var restTemplate: TestRestTemplate

@Test
Expand Down
4 changes: 2 additions & 2 deletions src/test/kotlin/com/jalgoarena/web/UsersControllerSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.intellij.lang.annotations.Language
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.BDDMockito.given
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment
Expand All @@ -27,14 +28,13 @@ import org.springframework.test.web.servlet.MockMvc
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath
import org.springframework.test.web.servlet.result.MockMvcResultMatchers.status
import javax.inject.Inject

@RunWith(SpringRunner::class)
@SpringBootTest(webEnvironment = WebEnvironment.MOCK)
@AutoConfigureMockMvc
class UsersControllerSpec {

@Inject
@Autowired
private lateinit var mockMvc: MockMvc

@MockBean
Expand Down

0 comments on commit 055c46a

Please sign in to comment.