Skip to content

Commit

Permalink
Fixing expires_at in RejectList
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Zambelli Sessona committed Aug 21, 2014
1 parent 665b72e commit 6f97806
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
22 changes: 11 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ libraryDependencies ++= {
val akkaV = "2.3.4"
val sprayV = "1.3.1"
Seq(
"io.spray" %% "spray-can" % sprayV,
"io.spray" %% "spray-routing" % sprayV,
"io.spray" %% "spray-json" % "1.2.6",
"io.spray" %% "spray-testkit" % sprayV,
"io.spray" %%"spray-client" % sprayV,
"com.typesafe.akka" %% "akka-actor" % akkaV,
"com.typesafe.akka" %% "akka-testkit" % akkaV,
"com.typesafe" % "config" % "1.2.1",
"ch.qos.logback" % "logback-classic" % "1.0.6"
"io.spray" %% "spray-can" % sprayV,
"io.spray" %% "spray-routing" % sprayV,
"io.spray" %% "spray-json" % "1.2.6",
"io.spray" %% "spray-testkit" % sprayV,
"io.spray" %%"spray-client" % sprayV,
"com.typesafe.akka" %% "akka-actor" % akkaV,
"com.typesafe.akka" %% "akka-testkit" % akkaV,
"com.typesafe" % "config" % "1.2.1",
"ch.qos.logback" % "logback-classic" % "1.0.6"
) ++ Seq(
"org.specs2" %% "specs2" % "2.3.13" % "test",
"org.scalatest" %% "scalatest" % "2.1.6" % "test->*"
"org.specs2" %% "specs2" % "2.3.13" % "test",
"org.scalatest" %% "scalatest" % "2.1.6" % "test->*"
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ case class MRejectAddResponse(email: String, added: Boolean) extends MandrillRes
*/
case class MRejectDeleteResponse(email: String, deleted: Boolean, subaccount: Option[String]) extends MandrillResponse

//TODO: expires at = false???
/**
* The information for each rejection blacklist entry
* @param email - the email that is blocked
Expand All @@ -33,7 +32,7 @@ case class MRejectListResponse(email: String,
detail: Option[String],
created_at: String,
last_event_at: String,
expires_at: Boolean,
expires_at: Option[Boolean],
expired: Boolean,
subaccount: Option[String],
sender: Option[MSenderDataResponse]) extends MandrillResponse
2 changes: 1 addition & 1 deletion src/test/resources/application.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Mandrill {
key="oD1lKbj5hPxpXPpMkkdKtw",
timoutInSeconds=5
timoutInSeconds=10
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ class MessageCallsTest extends FlatSpec with Matchers with SimpleLogger {
checkFailedBecauseOfInvalidKey(MandrillBlockingClient.messagesSearch(validSearch.copy(key = "invalid")))
}

"MessageInfo" should "work getting a valid MMessageInfoResponse (async client)" in {
"MessageInfo" should "work getting a valid MMessageInfoResponse (async client)" ignore {
val res = Await.result(MandrillAsyncClient.messagesInfo(MMessageInfo(id = idOfMailForInfoTest)), DefaultConfig.defaultTimeout)
res.getClass shouldBe classOf[MMessageInfoResponse]
res._id shouldBe idOfMailForInfoTest
res.subject shouldBe "subject test"
res.email shouldBe "[email protected]"
}
it should "work getting a valid MMessageInfoResponse (blocking client)" in {
ignore should "work getting a valid MMessageInfoResponse (blocking client)" in {
MandrillBlockingClient.messagesInfo(MMessageInfo(id = idOfMailForInfoTest)) match {
case Success(res) =>
res.getClass shouldBe classOf[MMessageInfoResponse]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ class TemplateCallsTest extends FlatSpec with Matchers with SimpleLogger {
val res = Await.result(MandrillAsyncClient.templateRender(validTemplateRender), DefaultConfig.defaultTimeout)
res.getClass shouldBe classOf[MTemplateRenderResponse]
res.html shouldBe Some("<div>example code</div>")
println(res)
}
it should "work getting a valid MTemplateAddResponses (blocking client)" in {
MandrillBlockingClient.templateRender(validTemplateRender) match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ class DefaultConfigTest extends FlatSpec with Matchers with SimpleLogger {

it should "read the defaut timeout duration from the configuration" in {
DefaultConfig.defaultTimeout.getClass shouldBe classOf[FiniteDuration]
DefaultConfig.defaultTimeout shouldBe 5.seconds
DefaultConfig.defaultTimeout shouldBe 10.seconds
}
}
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "1.0.0"
version in ThisBuild := "1.1.0"

0 comments on commit 6f97806

Please sign in to comment.