diff --git a/hmda-analytics/src/test/scala/hmda/analytics/query/LarComponentSpec.scala b/hmda-analytics/src/test/scala/hmda/analytics/query/LarComponentSpec.scala index 42ba81998c..3619ae3445 100644 --- a/hmda-analytics/src/test/scala/hmda/analytics/query/LarComponentSpec.scala +++ b/hmda-analytics/src/test/scala/hmda/analytics/query/LarComponentSpec.scala @@ -1,34 +1,36 @@ -//package hmda.analytics.query -// -//import hmda.model.filing.lar.LarGenerators._ -//import hmda.utils.EmbeddedPostgres -//import org.scalatest.{AsyncWordSpec, BeforeAndAfter, MustMatchers} -// -//class LarComponentSpec extends AsyncWordSpec with LarComponent with EmbeddedPostgres with MustMatchers with BeforeAndAfter { -// -// "LarComponent" must { -// "be able to persist and delete a 2019 LAR" in { -// val repo = new LarRepository(dbConfig, "loanapplicationregister2019") // as per hmda.sql -// val sampleLar = larGen.map(LarConverter(_, year = 2019)).sample.get -// -// repo -// .insert(sampleLar) -// .map(_ mustBe 1) -// .flatMap(_ => repo.deleteByLei(sampleLar.lei)) -// .map(_ mustBe 1) -// } -// -// "be able to persist and delete a quarterly 2019 LAR" in { -// val repo = new LarRepository(dbConfig, "loanapplicationregister2019") // as per hmda.sql -// val sampleLar = larGen.map(LarConverter(_, year = 2019)).sample.get.copy(isQuarterly = true) -// -// repo -// .insert(sampleLar) -// .map(_ mustBe 1) -// .flatMap(_ => repo.deletebyLeiAndQuarter(sampleLar.lei)) -// .map(_ mustBe 1) -// } -// } -// -// override def bootstrapSqlFile: String = "hmda.sql" -//} \ No newline at end of file +package hmda.analytics.query + +import hmda.model.filing.lar.LarGenerators._ +import hmda.utils.EmbeddedPostgres +import org.scalatest.{AsyncWordSpec, BeforeAndAfter, MustMatchers, Tag} + +object CustomTag extends Tag("actions-ignore") + +class LarComponentSpec extends AsyncWordSpec with LarComponent with EmbeddedPostgres with MustMatchers with BeforeAndAfter { + + "LarComponent" must { + "be able to persist and delete a 2019 LAR" taggedAs CustomTag in { + val repo = new LarRepository(dbConfig, "loanapplicationregister2019") // as per hmda.sql + val sampleLar = larGen.map(LarConverter(_, year = 2019)).sample.get + + repo + .insert(sampleLar) + .map(_ mustBe 1) + .flatMap(_ => repo.deleteByLei(sampleLar.lei)) + .map(_ mustBe 1) + } + + "be able to persist and delete a quarterly 2019 LAR" taggedAs CustomTag in { + val repo = new LarRepository(dbConfig, "loanapplicationregister2019") // as per hmda.sql + val sampleLar = larGen.map(LarConverter(_, year = 2019)).sample.get.copy(isQuarterly = true) + + repo + .insert(sampleLar) + .map(_ mustBe 1) + .flatMap(_ => repo.deletebyLeiAndQuarter(sampleLar.lei)) + .map(_ mustBe 1) + } + } + + override def bootstrapSqlFile: String = "hmda.sql" +} \ No newline at end of file