diff --git a/suoritusrekisteri/src/main/resources/webapp/suoritusrekisteri-web-oph.json b/suoritusrekisteri/src/main/resources/webapp/suoritusrekisteri-web-oph.json index 83efc2f698..8d2fd1a9b0 100644 --- a/suoritusrekisteri/src/main/resources/webapp/suoritusrekisteri-web-oph.json +++ b/suoritusrekisteri/src/main/resources/webapp/suoritusrekisteri-web-oph.json @@ -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", diff --git a/suoritusrekisteri/src/test/resources/front-mock-files/test/fixtures/tarjontaNimiFixtures.js b/suoritusrekisteri/src/test/resources/front-mock-files/test/fixtures/tarjontaNimiFixtures.js index e65161b94a..fd0318ad0c 100644 --- a/suoritusrekisteri/src/test/resources/front-mock-files/test/fixtures/tarjontaNimiFixtures.js +++ b/suoritusrekisteri/src/test/resources/front-mock-files/test/fixtures/tarjontaNimiFixtures.js @@ -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": { @@ -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( @@ -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") } diff --git a/suoritusrekisteri/src/test/scala/fi/vm/sade/hakurekisteri/mocha/HakureRekisteriMochaTest.scala b/suoritusrekisteri/src/test/scala/fi/vm/sade/hakurekisteri/mocha/HakureRekisteriMochaTest.scala index 9133955d86..ae7a30fe17 100644 --- a/suoritusrekisteri/src/test/scala/fi/vm/sade/hakurekisteri/mocha/HakureRekisteriMochaTest.scala +++ b/suoritusrekisteri/src/test/scala/fi/vm/sade/hakurekisteri/mocha/HakureRekisteriMochaTest.scala @@ -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" )