diff --git a/src/test/clj/dda/c4k_common/macros_test.clj b/src/test/clj/dda/c4k_common/macros_test.clj index db1e0c6..f9f58d5 100644 --- a/src/test/clj/dda/c4k_common/macros_test.clj +++ b/src/test/clj/dda/c4k_common/macros_test.clj @@ -3,5 +3,11 @@ [clojure.test :refer [deftest is are testing run-tests]] [dda.c4k-common.macros :refer [inline-resources]])) +(deftest should-count-inline-resources + (is (= 3 (count (inline-resources "ingress"))))) + (deftest should-inline-resources - (is (= 3 (count (inline-resources "ingress"))))) \ No newline at end of file + (let [resource-path (fn [name] (str "dda/c4k_common/inline_resources_test/" name))] + (is (= "1" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_1.yaml")))) + (is (= "2" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_2.yaml")))) + (is (= "3" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_3.yaml")))))) \ No newline at end of file diff --git a/src/test/cljs/dda/c4k_common/macros_test.cljs b/src/test/cljs/dda/c4k_common/macros_test.cljs index 48346f8..1067a3c 100644 --- a/src/test/cljs/dda/c4k_common/macros_test.cljs +++ b/src/test/cljs/dda/c4k_common/macros_test.cljs @@ -3,5 +3,11 @@ [cljs.test :refer-macros [deftest is]] [dda.c4k-common.macros :refer-macros [inline-resources]])) -(deftest should-inline-resources +(deftest should-count-inline-resources (is (= 3 (count (inline-resources "ingress"))))) + +(deftest should-inline-resources + (let [resource-path (fn [name] (str "dda/c4k_common/inline_resources_test/" name))] + (is (= "1" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_1.yaml")))) + (is (= "2" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_2.yaml")))) + (is (= "3" (get (inline-resources "dda/c4k_common/inline_resources_test") (resource-path "inline_resource_3.yaml")))))) diff --git a/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_1.yaml b/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_1.yaml new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_1.yaml @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_2.yaml b/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_2.yaml new file mode 100644 index 0000000..d8263ee --- /dev/null +++ b/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_2.yaml @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_3.yaml b/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_3.yaml new file mode 100644 index 0000000..e440e5c --- /dev/null +++ b/src/test/resources/dda/c4k_common/inline_resources_test/inline_resource_3.yaml @@ -0,0 +1 @@ +3 \ No newline at end of file