Skip to content

Commit

Permalink
OK-556 naming and test data fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeinoe authored and hajoa committed Aug 16, 2024
1 parent 2cf4777 commit cc5952e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions spec/ataru/fixtures/application.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
{: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"}]})

(def application-without-hakemusmaksu-exemption
{: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"}]})

Expand Down
2 changes: 1 addition & 1 deletion src/clj/ataru/haku/haku_service.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cc5952e

Please sign in to comment.