aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/clj/queue_api/test/db/core_test.clj11
-rw-r--r--test/clj/queue_api/test/handler.clj4
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"))]