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.

ArticleRepositorySpec.scala 704B

123456789101112131415161718192021222324
  1. package de.codingchallenge.repositories
  2. import akka.stream.scaladsl.Sink
  3. import de.codingchallenge.models.Article
  4. import de.codingchallenge.{AkkaSpec, BaseSpec}
  5. import org.scalatest.{BeforeAndAfterAll, MustMatchers, WordSpec}
  6. import scala.concurrent.duration._
  7. import scala.concurrent.Await
  8. /**
  9. * Honestly this is kind of an integration tests running against the Demo Server.
  10. * I will leave it here for convenience
  11. */
  12. class ArticleRepositorySpec extends BaseSpec with AkkaSpec {
  13. "The ArticleRepository" must {
  14. "parse articles as expected" in {
  15. val repo = new ArticleRepository(system)
  16. Await.result(repo.getArticles(1).runWith(Sink.head), 1.second) mustBe a[Article]
  17. }
  18. }
  19. }