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

            Line data    Source code
       1            4 : (ns matchscore.domain.class-template.entity
       2              :   (:require
       3              :    [schemas.domain.class-templates :as class-template-schemas]))
       4              : 
       5              : 
       6           16 : (def updatable-fields [:name :max-players])
       7              : 
       8              : 
       9            4 : (defn make-class-template
      10              :  "Creates a validated ClassTemplate map."
      11              :  [data]
      12           12 :  (class-template-schemas/make-class-template-record data))
      13              : 
      14              : 
      15            4 : (defn has-changes?
      16              :  "Returns true if merging updates into existing would produce a different result."
      17              :  [existing updates]
      18            2 :  (not=
      19            4 :   (select-keys existing updatable-fields)
      20            7 :   (select-keys (merge existing updates) updatable-fields)))
      21              : 
      22              : 
      23            4 : (defn merge-updates
      24              :  "Merges updatable fields from updates into existing class template."
      25              :  [existing updates]
      26            7 :  (merge existing (select-keys updates updatable-fields)))
        

Generated by: LCOV version 2.0-1