(ns clojars.test.unit.middleware
  (:require [clojars.middleware :as middleware]
            [clojure.test :refer :all]))

(def trailing-slash (middleware/wrap-ignore-trailing-slash (fn [x] (get x :uri))))

(deftest trailing-slash-doesnt-modify-root
  (is (= "/" (trailing-slash {:uri "/"}))))

(deftest trailing-slash-doesnt-modify-sub-routes
  (is (= "/artifact/project") (trailing-slash {:uri "/artifact/project"})))

(deftest trailing-slash-removes-trailing-slash
  (is (= "/artifact/project") (trailing-slash {:uri "/artifact/project/"})))

(deftest trailing-slash-doesnt-remove-redundant-trailing-slash
  (is (= "/artifact/project/") (trailing-slash {:uri "/artifact/project//"})))

(ns clojars.test.unit.middleware
  (:require [clojars.middleware :as middleware]
            [clojure.test :refer :all]))

(def trailing-slash (middleware/wrap-ignore-trailing-slash (fn [x] (get x :uri))))

(deftest trailing-slash-doesnt-modify-root
  (is (= "/" (trailing-slash {:uri "/"}))))

(deftest trailing-slash-doesnt-modify-sub-routes
  (is (= "/artifact/project" (trailing-slash {:uri "/artifact/project"}))))

(deftest trailing-slash-removes-trailing-slash
  (is (= "/artifact/project" (trailing-slash {:uri "/artifact/project/"}))))

(deftest trailing-slash-doesnt-remove-redundant-trailing-slash
  (is (= "/artifact/project/" (trailing-slash {:uri "/artifact/project//"}))))

Fix these tests to actually test
Fix these tests to actually test

ato/clojars-web,tobias/clojars-web,ato/clojars-web,clojars/clojars-web,clojars/clojars-web,tobias/clojars-web,tobias/clojars-web,clojars/clojars-web