Skip to content

Commit 99b9ae4

Browse files
author
Roman Rudakov
authored
Merge pull request #24 from rrudakov/rework-unit-tests
Increase test coverage
2 parents fc046c4 + 8b3a2d0 commit 99b9ae4

File tree

5 files changed

+245
-219
lines changed

5 files changed

+245
-219
lines changed

project.clj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
:url "http://educationapp-api.herokuapp.com/swagger"
44
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
55
:url "https://www.eclipse.org/legal/epl-2.0/"}
6-
:dependencies [[org.clojure/clojure "1.10.0"]
6+
:dependencies [[org.clojure/clojure "1.10.1"]
77
;; Configuration file parsing
88
[aero "1.1.6"]
99
;; Ring and compojure
@@ -17,25 +17,26 @@
1717
;; Database stuff
1818
[ragtime "0.8.0"]
1919
[seancorfield/next.jdbc "1.0.445"]
20-
[org.postgresql/postgresql "42.2.10"]
21-
[com.mchange/c3p0 "0.9.5.2"]
20+
[org.postgresql/postgresql "42.2.14"]
21+
[com.mchange/c3p0 "0.9.5.5"]
2222
[honeysql "0.9.10"]
2323
;; Component framework
24-
[com.stuartsierra/dependency "0.2.0"]
25-
[com.stuartsierra/component "0.4.0"]
24+
[com.stuartsierra/dependency "1.0.0"]
25+
[com.stuartsierra/component "1.0.0"]
2626
;; Security
2727
[buddy/buddy-hashers "1.4.0"]
2828
[buddy/buddy-sign "3.1.0"]
2929
[buddy/buddy-auth "2.2.0"]
3030
;; JSON parsing
31-
[com.fasterxml.jackson.core/jackson-core "2.10.3"]]
31+
[com.fasterxml.jackson.core/jackson-core "2.11.1"]]
3232
:repl-options {:init-ns education.core}
3333
:aliases {"migrate" ["run" "-m" "education.database.component/migrate" "--"]
3434
"rollback" ["run" "-m" "education.database.component/rollback" "--"]}
3535
:uberjar-name "education-api-standalone.jar"
3636
:min-lein-version "2.0.0"
3737
:profiles {:dev {:dependencies [[tortue/spy "2.0.0"]
38-
[ring/ring-mock "0.4.0"]]}
38+
[ring/ring-mock "0.4.0"]
39+
[org.clojure/test.check "1.0.0"]]}
3940
:uberjar {:aot :all}}
4041
:plugins [[lein-cloverage "1.1.2"]]
4142
:main education.core)

src/education/database/articles.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
(defn delete-article
120120
"Delete article from database by `article-id`."
121121
[conn article-id]
122-
(sql/delete! conn :articles {:id article-id}))
122+
(:next.jdbc/update-count (sql/delete! conn :articles {:id article-id})))
123123

124124
(defn can-update?
125125
"Check whether `user` allowed to update article by `arcicle-id`."

0 commit comments

Comments
 (0)