From a435a3522caa7a4e324f6cfbf1b8a5ed97a05e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A4in=C3=B6=20Ala-H=C3=A4rk=C3=B6nen?= Date: Wed, 10 Jul 2024 14:30:23 +0300 Subject: [PATCH] OK-556 naming and test data fixes --- spec/ataru/fixtures/application.clj | 4 ++-- src/clj/ataru/haku/haku_service.clj | 2 +- .../ataru/kk_application_payment/kk_application_payment.clj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/ataru/fixtures/application.clj b/spec/ataru/fixtures/application.clj index a2ff735b16..cf08bbfbe3 100644 --- a/spec/ataru/fixtures/application.clj +++ b/spec/ataru/fixtures/application.clj @@ -13,7 +13,7 @@ {:form 909909, :lang "fi" :haku "payment-info-test-kk-haku" - :id 1 + :id 543210 :person-oid "1.2.3.4.5.303" :answers [{:key "vapautus_hakemusmaksusta" :value "0" :fieldType "dropdown"}]}) @@ -21,7 +21,7 @@ {:form 909909, :lang "fi" :haku "payment-info-test-kk-haku" - :id 1 + :id 543211 :person-oid "1.2.3.4.5.303" :answers [{:key "foo" :value "1" :fieldType "dropdown"}]}) diff --git a/src/clj/ataru/haku/haku_service.clj b/src/clj/ataru/haku/haku_service.clj index b8263f0f99..22ed536228 100644 --- a/src/clj/ataru/haku/haku_service.clj +++ b/src/clj/ataru/haku/haku_service.clj @@ -319,7 +319,7 @@ :hakukohteet hakukohteet-with-kevyt-valinta :hakukohderyhmat hakukohderyhmat})) -(defn get-haut-for-kk-application-payments +(defn get-haut-for-start-term-and-year "Get hakus according to study start term and year. Only for internal use, does not do authorization." [get-haut-cache tarjonta-service start-term start-year] (->> (cache/get-from get-haut-cache :haut) diff --git a/src/clj/ataru/kk_application_payment/kk_application_payment.clj b/src/clj/ataru/kk_application_payment/kk_application_payment.clj index 1b7a12f8c8..16462ac9b5 100644 --- a/src/clj/ataru/kk_application_payment/kk_application_payment.clj +++ b/src/clj/ataru/kk_application_payment/kk_application_payment.clj @@ -122,7 +122,7 @@ "Infers and sets new payment status for person according to their personal data and applications for term. Does not poll payments, never updates status to paid. Returns state id." [person-service tarjonta-service koodisto-cache haku-cache person-oid term year virkailija-oid] - (let [hakus (haku-service/get-haut-for-kk-application-payments haku-cache tarjonta-service term year) + (let [hakus (haku-service/get-haut-for-start-term-and-year haku-cache tarjonta-service term year) valid-hakus (filter (partial haku-valid? tarjonta-service) hakus) valid-haku-oids (map :oid valid-hakus) linked-oids (get (person-service/linked-oids person-service [person-oid]) person-oid)