Skip to content

Commit

Permalink
Modify test case
Browse files Browse the repository at this point in the history
  • Loading branch information
upgle committed Sep 27, 2019
1 parent 93caede commit 6812de1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,16 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi {
implicit val tid = transid()

val action = WhiskAction(namespace, aname(), jsDefault(""))
val dummyUpdated = 1569400000000L;
val dummyUpdated = WhiskEntity.currentMillis().toEpochMilli

val content = JsObject(
"exec" -> JsObject("code" -> "".toJson, "kind" -> action.exec.kind.toJson),
"updated" -> dummyUpdated.toJson)

Put(s"$collectionPath/${action.name}", content) ~> Route.seal(routes(creds)) ~> check {
status should be(OK)
val response = responseAs[WhiskAction]
response.updated.toEpochMilli should not be (dummyUpdated)
response.updated.toEpochMilli should be > dummyUpdated
}
}

Expand Down

0 comments on commit 6812de1

Please sign in to comment.