LCOV - code coverage report
Current view: top level - matchscore/domain/class_template_participant - entity.clj Coverage Total Hit
Test: lcov.info Lines: 91.7 % 12 11
Test Date: 2026-11-23 18:11:10 Functions: - 0 0

            Line data    Source code
       1            4 : (ns matchscore.domain.class-template-participant.entity
       2              :   (:require
       3              :    [schemas.domain.class-template-participants :as class-template-participant-schemas]))
       4              : 
       5              : 
       6           32 : (def updatable-fields [:seed :status :confirmed-at :extra :roles :source])
       7              : 
       8              : 
       9            4 : (defn make-class-template-participant
      10              :  "Creates a validated ClassTemplateParticipant map."
      11              :  [data & [from-qualified]]
      12            6 :  (if from-qualified
      13            0 :    (class-template-participant-schemas/make-class-template-participant-record-from-qualified data)
      14            9 :    (class-template-participant-schemas/make-class-template-participant-record data)))
      15              : 
      16              : 
      17            4 : (defn has-changes?
      18              :  "Returns true if any updatable field present in updates differs from existing."
      19              :  [existing updates]
      20            4 :  (not=
      21            8 :   (select-keys existing updatable-fields)
      22           14 :   (select-keys (merge existing updates) updatable-fields)))
      23              : 
      24              : 
      25            4 : (defn merge-updates
      26              :  "Merges updatable fields from updates into existing class template participant."
      27              :  [existing updates]
      28           14 :  (merge existing (select-keys updates updatable-fields)))
        

Generated by: LCOV version 2.0-1