diff options
Diffstat (limited to 'test/clj')
-rw-r--r-- | test/clj/queue_api/test/db/core_test.clj | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/test/clj/queue_api/test/db/core_test.clj b/test/clj/queue_api/test/db/core_test.clj index 371b903..117cc26 100644 --- a/test/clj/queue_api/test/db/core_test.clj +++ b/test/clj/queue_api/test/db/core_test.clj @@ -105,8 +105,7 @@ (d/transact! conn base-schema) (f))) -(defn agent [id] - (d/entity @conn [:agent/id id])) + (defn job [id] (d/entity @conn [:job/id id])) @@ -225,21 +224,28 @@ :processing (-> a :agent/job :job/status) "96cf6f11-591d-4cde-9ab0-56e371acb6d2" (-> a :agent/job :job/id))))) -(deftest request-job-test +(deftest fittest-job-test (testing "test query for skillset" ;;primary-skillset urgent (is (= (job "51ab0771-f1e4-4268-868f-9029a58f6612") - (request-job "644be0ce-035d-48cb-867e-8e6de2714a8d"))) + (fittest-job "644be0ce-035d-48cb-867e-8e6de2714a8d"))) ;;secondary-skillset urgent (is (= (job "6e90db58-7a6d-46e2-a02a-e33dc82e6e33") - (request-job "ff02347a-1b2d-440c-a2a1-7a593dba564e"))) + (fittest-job "ff02347a-1b2d-440c-a2a1-7a593dba564e"))) (d/transact! conn complete-schema) ;;primary-skillset not urgent (is (= (job "96cf6f11-591d-4cde-9ab0-56e371acb6d2") - (request-job "644be0ce-035d-48cb-867e-8e6de2714a8d"))) + (fittest-job "644be0ce-035d-48cb-867e-8e6de2714a8d"))) ;;secondary-skillset not urgent (is (= (job "f90e149e-fa51-4212-a6bf-8cf81c78d28c") - (request-job "ff02347a-1b2d-440c-a2a1-7a593dba564e"))))) + (fittest-job "ff02347a-1b2d-440c-a2a1-7a593dba564e"))))) + +(deftest agent-test + (testing "Test agent" + (are [left right] + (= left right) + (d/entity @conn [:agent/id "644be0ce-035d-48cb-867e-8e6de2714a8d"]) (agent "644be0ce-035d-48cb-867e-8e6de2714a8d") + nil (agent "7b8e17fc-7953-44cf-9249-294c4eb73087")))) (deftest dequeue-job-test (testing "Test Dummy Derp dequeuing process" |