Skip to content

Commit

Permalink
Update AltinnDQServiceSpek.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
richos7 committed Aug 6, 2019
1 parent 6820273 commit 65a3d0b
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,28 @@ object AltinnDQServiceSpek : Spek({
req.requestHandled shouldEqual true
req.response.status() shouldEqual HttpStatusCode.BadRequest
}
it("Hent elementer fra DownloadQueue med tomt utgave kode") {
val params = "1234/ "
val req = handleRequest(HttpMethod.Get, "/api/v1/altinn/dq/elementer/$params") {
addHeader(HttpHeaders.Accept, "application/json")
addHeader("Content-Type", "application/json")
addHeader(HttpHeaders.Authorization, "Basic ${encodeBase64("n000001:itest1".toByteArray())}")
}

req.requestHandled shouldEqual true
req.response.status() shouldEqual HttpStatusCode.BadRequest
}
it("Hent elementer fra DownloadQueue med tomt tjeneste kode, men gyldig utgave kode") {
val params = " /1"
val req = handleRequest(HttpMethod.Get, "/api/v1/altinn/dq/elementer/$params") {
addHeader(HttpHeaders.Accept, "application/json")
addHeader("Content-Type", "application/json")
addHeader(HttpHeaders.Authorization, "Basic ${encodeBase64("n000001:itest1".toByteArray())}")
}

req.requestHandled shouldEqual true
req.response.status() shouldEqual HttpStatusCode.BadRequest
}
it("Hent melding fra DownloadQueue med tomt AR nummer") {
val arNummer = " "
val req = handleRequest(HttpMethod.Get, "/api/v1/altinn/dq/hent/$arNummer") {
Expand Down

0 comments on commit 65a3d0b

Please sign in to comment.