You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ProductExportRepositorySpec.scala 771B

123456789101112131415161718192021222324
  1. package de.codingchallenge.repositories
  2. import akka.http.scaladsl.model.StatusCodes
  3. import akka.stream.scaladsl.{Sink, Source}
  4. import de.codingchallenge.fixtures.ProductExportFixture
  5. import de.codingchallenge.models.Article
  6. import de.codingchallenge.{AkkaSpec, BaseSpec}
  7. import scala.concurrent.Await
  8. import scala.concurrent.duration._
  9. /**
  10. * Honestly this is kind of an integration tests running against the Demo Server
  11. */
  12. class ProductExportRepositorySpec extends BaseSpec with AkkaSpec with ProductExportFixture {
  13. "The ProductExportRepository" must {
  14. "put product reports as expected" in {
  15. val repo = new ProductExportRepository(system)
  16. Await.result(repo.add(Source.single(productExport), 1), 2.second).status mustBe StatusCodes.OK
  17. }
  18. }
  19. }