Skip to content

Commit

Permalink
PE-3136 Fix it-test.
Browse files Browse the repository at this point in the history
  • Loading branch information
fenallen committed Jul 14, 2017
1 parent d39e5e0 commit 92fac1c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion test/it/UserInfoServiceSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@
package it

import org.joda.time.LocalDate
import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach}
import play.api.libs.json.Json
import uk.gov.hmrc.domain.Nino
import uk.gov.hmrc.openidconnect.userinfo.config.{FeatureSwitch, UserInfoFeatureSwitches}
import uk.gov.hmrc.openidconnect.userinfo.domain._
import uk.gov.hmrc.play.auth.microservice.connectors.ConfidenceLevel
import uk.gov.hmrc.play.http.Token

import scalaj.http.Http

class UserInfoServiceSpec extends BaseFeatureSpec {
class UserInfoServiceSpec extends BaseFeatureSpec with BeforeAndAfterAll {

override protected def beforeAll() = {FeatureSwitch.enable(UserInfoFeatureSwitches.countryCode)}
override protected def afterAll() = {FeatureSwitch.disable(UserInfoFeatureSwitches.countryCode)}

val authBearerToken = "AUTH_BEARER_TOKEN"
val nino = "AB123456A"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class UserInfoGeneratorSpec extends UnitSpec with PropertyChecks with BeforeAndA
}

override protected def afterEach(): Unit = {
FeatureSwitch.enable(UserInfoFeatureSwitches.countryCode)
FeatureSwitch.disable(UserInfoFeatureSwitches.countryCode)
}

"userInfo" should {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class UserInfoTransformerSpec extends UnitSpec with MockitoSugar with BeforeAndA
}

override protected def afterEach() = {
FeatureSwitch.enable(UserInfoFeatureSwitches.countryCode)
FeatureSwitch.disable(UserInfoFeatureSwitches.countryCode)
}

trait Setup {
Expand Down

0 comments on commit 92fac1c

Please sign in to comment.