diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2018-02-18 21:00:55 -0300 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2018-02-18 21:00:55 -0300 |
commit | 9dd6aeb32d21ed8673bdd490341302fd7f37d2fc (patch) | |
tree | 8362688060eaea737f40ddf514648a22f8c2d4fe /test/clj | |
parent | 48bd546122842012a65572fa436fe58cfd965ca7 (diff) | |
download | queue-api-9dd6aeb32d21ed8673bdd490341302fd7f37d2fc.tar.gz queue-api-9dd6aeb32d21ed8673bdd490341302fd7f37d2fc.tar.bz2 queue-api-9dd6aeb32d21ed8673bdd490341302fd7f37d2fc.zip |
Adds functions that were missing
Diffstat (limited to 'test/clj')
-rw-r--r-- | test/clj/queue_api/test/db/core_test.clj | 11 | ||||
-rw-r--r-- | test/clj/queue_api/test/handler.clj | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/test/clj/queue_api/test/db/core_test.clj b/test/clj/queue_api/test/db/core_test.clj index c1ecc6d..a624319 100644 --- a/test/clj/queue_api/test/db/core_test.clj +++ b/test/clj/queue_api/test/db/core_test.clj @@ -42,8 +42,8 @@ ;;Agent that will be linked to jobs {:agent/id "644be0ce-035d-48cb-867e-8e6de2714a8d" :agent/name "Dummy Derp" - :primary-skillset ["rewards-question" "bills-question"] - :secondary-skillset []} + :agent/primary-skillset ["rewards-question" "bills-question"] + :agent/secondary-skillset []} ;;Change job status to :completed and link agent {:job/id "1e0d939d-494b-48d2-9247-b5ae207a519a" :job/status :completed @@ -138,4 +138,9 @@ (testing "Test sum-agent" (is (= [{:type "bills-question", :jobs 2} {:type "purchases-question", :jobs 1}] (sum-agent "644be0ce-035d-48cb-867e-8e6de2714a8d"))) - (is (= [] (sum-agent "00000000-0000-0000-0000-000000000000")))))
\ No newline at end of file + (is (= [] (sum-agent "00000000-0000-0000-0000-000000000000"))))) + +(deftest request-job-test + (testing "test query for skillset" + (is (= (d/entity @conn [:job/id "96cf6f11-591d-4cde-9ab0-56e371acb6d2"]) + (request-job "644be0ce-035d-48cb-867e-8e6de2714a8d")))))
\ No newline at end of file diff --git a/test/clj/queue_api/test/handler.clj b/test/clj/queue_api/test/handler.clj index aa0dfa1..3473ce8 100644 --- a/test/clj/queue_api/test/handler.clj +++ b/test/clj/queue_api/test/handler.clj @@ -38,15 +38,13 @@ (let [response (-> (request :post "/job") (json-body {:agent_id "8ab86c18-3fae-4804-bfd9-c3d6e8f66260"}) app)] - (is (= 200 (:status response)))))) + (is (= 400 (:status response)))))) (deftest queue-test (testing "Queue route" (let [response (app (request :get "/queue"))] (is (= 200 (:status response)))))) -(deftest queue "/queue") - (deftest invalid-test (testing "not-found route" (let [response (app (request :get "/invalid"))] |