From 00651fa3864a1f68c324679888b05df93efc1ec6 Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 9 Jul 2021 17:17:14 +0200 Subject: [PATCH] fix test resource --- src/main/cljs/dda/c4k_common/yaml.cljs | 6 ------ src/test/cljs/dda/c4k_common/yaml_test.cljs | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/cljs/dda/c4k_common/yaml.cljs b/src/main/cljs/dda/c4k_common/yaml.cljs index 64596c6..e768dc3 100644 --- a/src/main/cljs/dda/c4k_common/yaml.cljs +++ b/src/main/cljs/dda/c4k_common/yaml.cljs @@ -1,7 +1,6 @@ (ns dda.c4k-common.yaml (:require ["js-yaml" :as yaml] - [shadow.resource :as rc] [clojure.string :as st])) (defn from-string [input] @@ -16,8 +15,3 @@ (keyword (first (st/split resource #"/")))) (defmulti load-resource dispatch-by-resource-name) - -(defmethod load-resource :test [resource-name] - (case resource-name - "test/ingress_test.yaml" (rc/inline "test/ingress_test.yaml") - (throw (js/Error. "Undefined Resource!")))) \ No newline at end of file diff --git a/src/test/cljs/dda/c4k_common/yaml_test.cljs b/src/test/cljs/dda/c4k_common/yaml_test.cljs index 65c4a1c..e02d234 100644 --- a/src/test/cljs/dda/c4k_common/yaml_test.cljs +++ b/src/test/cljs/dda/c4k_common/yaml_test.cljs @@ -1,8 +1,14 @@ (ns dda.c4k-common.yaml-test (:require [cljs.test :refer-macros [deftest is are testing run-tests]] + [shadow.resource :as rc] [dda.c4k-common.yaml :as cut])) +(defmethod cut/load-resource :test [resource-name] + (case resource-name + "test/ingress_test.yaml" (rc/inline "test/ingress_test.yaml") + (throw (js/Error. "Undefined Resource!")))) + (deftest should-dispatch-by-resource-name (is (= :postgres (cut/dispatch-by-resource-name "postgres/etc"))))