Skip to content

Commit

Permalink
Muutettu käyttämään valintalaskentakoostepalvelun tarjonta-rajapintoja
Browse files Browse the repository at this point in the history
  • Loading branch information
augustk committed Dec 10, 2024
1 parent 1768fac commit 08575b9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"lokalisointi.update": "/lokalisointi/cxf/rest/v1/localisation/$1",
"haku-app.listshort": "/haku-app/applications/listshort",
"haku-app.virkailija.hakemus": "/haku-app/virkailija/hakemus/$1",
"tarjonta-service.hakuById": "/tarjonta-service/rest/v1/haku/$1",
"tarjonta-service.hakukohde": "/tarjonta-service/rest/v1/hakukohde/search",
"tarjonta-service.hakukohdeById": "/tarjonta-service/rest/v1/hakukohde/$1",
"tarjonta-service.hakuById": "/valintalaskentakoostepalvelu/resources/tarjonta-service/rest/v1/haku/$1",
"tarjonta-service.hakukohde": "/valintalaskentakoostepalvelu/resources/tarjonta-service/rest/v1/hakukohde/search",
"tarjonta-service.hakukohdeById": "/valintalaskentakoostepalvelu/resources/tarjonta-service/rest/v1/hakukohde/$1",
"kouta-internal.hakukohde.search": "/kouta-internal/hakukohde/search",
"kouta-internal.hakuByOid": "/kouta-internal/haku/$1",
"kouta-internal.hakukohdeByOid": "/kouta-internal/hakukohde/$1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function tarjontaNimiFixtures() {
var httpBackend = testFrame().httpBackend

httpBackend.when('GET', /.*tarjonta-service\/rest\/v1\/haku\/1.2.246.561.29.00000000001/).respond(
{
"result": {
Expand All @@ -10,7 +11,7 @@ function tarjontaNimiFixtures() {
)
httpBackend.when('GET', /.*tarjonta-service\/rest\/v1\/haku\/1.2.246.561.29.00000000002/).respond(
{
"status": "NOT_FOUND"
"status": "NOT_FOUND"
}
)
httpBackend.when('GET', /.*tarjonta-service\/rest\/v1\/hakukohde\/1.2.246.561.20.00000000001/).respond(
Expand All @@ -21,5 +22,28 @@ function tarjontaNimiFixtures() {
"status":"OK"
}
)
httpBackend.when('GET', /.*tarjonta-service\/rest\/v1\/hakukohde\/1.2.246.561.20.00000000002/).respond(500, "test error")
httpBackend.when('GET', /.*vtarjonta-service\/rest\/v1\/hakukohde\/1.2.246.561.20.00000000002/).respond(500, "test error")

httpBackend.when('GET', /.*valintalaskentakoostepalvelu\/resources\/tarjonta-service\/rest\/v1\/haku\/1.2.246.561.29.00000000001/).respond(
{
"result": {
"nimi": {"kieli_sv": "Testihaku"}
},
"status": "OK"
}
)
httpBackend.when('GET', /.*valintalaskentakoostepalvelu\/resources\/tarjonta-service\/rest\/v1\/haku\/1.2.246.561.29.00000000002/).respond(
{
"status": "NOT_FOUND"
}
)
httpBackend.when('GET', /.*valintalaskentakoostepalvelu\/resources\/tarjonta-service\/rest\/v1\/hakukohde\/1.2.246.561.20.00000000001/).respond(
{
"result":{
"hakukohteenNimet":{"kieli_en":"Testi hakukohde"}
},
"status":"OK"
}
)
httpBackend.when('GET', /.*valintalaskentakoostepalvelu\/resources\/tarjonta-service\/rest\/v1\/hakukohde\/1.2.246.561.20.00000000002/).respond(500, "test error")
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class HakureRekisteriMochaTest extends FlatSpec with CleanSharedTestJettyBeforeE
"node_modules/mocha-headless-chrome/bin/start",
"-t",
totalMochaTestsMaxDuration.toMillis.toString,
//"-v",
"-f",
"http://localhost:" + port + "/test/runner.html"
)
Expand Down

0 comments on commit 08575b9

Please sign in to comment.