<commit_before>(ns robot-kata.server-test
  (:require [clojure.test :refer :all]
            [robot-kata.server :refer :all]))

(deftest robot-kata-routes-test
         (testing "Routes work as expected"
                  (testing "Default route"
                           (let [resp (robot-kata-routes {:request-method :get :uri "/"})]
                             (is (= 302 (:status resp)) "Default route redirects")
                             (is (= "/robot-kata.html" ((:headers resp) "Location")) "Default route redirects to '/robot-kata.html'") ) )
                  (testing "Resource route"
                           (let [resp (robot-kata-routes {:request-method :get :uri "/robot-kata.html" :headers {"if-modified-since" "Sat, 29 Oct 1994 19:43:31 GMT"}})]
                             (is (= 200 (:status resp)) "GET of '/robot-kata.html' returns 200 status")
                             (is (= "text/html" ((:headers resp) "Content-Type")) "GET of '/robot-kata.html' returns content type 'text/html'")
                             (is (> ((:headers resp) "Content-Length") 0) "GET of '/robot-kata.html' returns content of length > 0") ) )
                  (testing "Page not found"
                           (is (= 0 1) "Implement page not found tests!") ) ) )<commit_msg>Fix bug in robot-kata-routes test<commit_after>(ns robot-kata.server-test
  (:require [clojure.test :refer :all]
            [robot-kata.server :refer :all]))

(deftest robot-kata-routes-test
         (testing "Routes work as expected"
                  (testing "Default route"
                           (let [resp (robot-kata-routes {:request-method :get :uri "/"})]
                             (is (= 302 (:status resp)) "Default route redirects")
                             (is (= "/robot-kata.html" ((:headers resp) "Location")) "Default route redirects to '/robot-kata.html'") ) )
                  (testing "Resource route"
                           (let [resp (robot-kata-routes {:request-method :get :uri "/robot-kata.html" :headers {"if-modified-since" "Sat, 29 Oct 1994 19:43:31 GMT"}})]
                             (is (= 200 (:status resp)) "GET of '/robot-kata.html' returns 200 status")
                             (is (= "text/html" ((:headers resp) "Content-Type")) "GET of '/robot-kata.html' returns content type 'text/html'")
                             (is (> (Integer. ((:headers resp) "Content-Length")) 0) "GET of '/robot-kata.html' returns content of length > 0") ) )
                  (testing "Page not found"
                           (is (= 0 1) "Implement page not found tests!") ) ) )
{'fraction_non_alphanumeric': 0.15105162523900573, 'fraction_numerical': 0.019120458891013385, 'mean_word_length': 1.7859424920127795, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2538466', 'n_tokens_mistral': 823, 'n_tokens_neox': 755, 'n_words': 219}