diff --git a/src/monger/core.clj b/src/monger/core.clj index 0db791b..6016149 100644 --- a/src/monger/core.clj +++ b/src/monger/core.clj @@ -52,14 +52,14 @@ ([{ :keys [host port] :or { host *mongodb-host*, port *mongodb-port* }}] (Mongo. ^String host ^Long port))) - + (defn ^DB get-db-names "Gets a list of all database names present on the server" ([] - (list (.getDatabaseNames *mongodb-connection*))) + (get-db-names *mongodb-connection*)) ([^Mongo connection] - (list (.getDatabaseNames connection)))) + (set (.getDatabaseNames connection)))) (defn ^DB get-db diff --git a/test/monger/test/core.clj b/test/monger/test/core.clj index d50c768..82e083d 100644 --- a/test/monger/test/core.clj +++ b/test/monger/test/core.clj @@ -31,9 +31,7 @@ (deftest test-get-db-names (let [dbs (monger.core/get-db-names)] (is (not (empty? dbs))) - (is (some #{"monger-test"} dbs)) - ) -) + (is (dbs "monger-test")))) ;; (deftest get-database-with-valid-credentials ;; (let [connection (monger.core/connect)