Skip to content

Commit 263a753

Browse files
committed
Fix formatting issues
1 parent 59c3c0d commit 263a753

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

src/clojars/routes/verify.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@
3333
(handle-request db :verify-group-via-TXT
3434
verification/verify-group-by-TXT
3535
(merge {:username username}
36-
(select-keys params [:domain :group]))))
36+
(select-keys params [:domain :group]))))
3737

3838
(defn verify-via-vcs
3939
[db username params]
4040
(handle-request db :verify-group-via-vcs
4141
verification/verify-vcs-groups
4242
(merge {:username username}
43-
(select-keys params [:url]))))
43+
(select-keys params [:url]))))
4444

4545
(defn routes [db]
4646
(compojure/routes
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
(ns clojars.integration.group-verification-test
22
(:require
3+
[clj-http.client :as http]
34
[clojars.integration.steps :refer [register-as]]
45
[clojars.test-helper :as help]
56
[clojure.test :refer [deftest use-fixtures]]
67
[kerodon.core :refer [fill-in follow-redirect
78
press session visit within]]
8-
[kerodon.test :refer [has some-text?]]
9-
[clj-http.client :as http]))
9+
[kerodon.test :refer [has some-text?]]))
1010

1111
(use-fixtures :each
1212
help/default-fixture
@@ -19,12 +19,12 @@
1919
(follow-redirect)
2020
(visit "/verify/group")
2121
(within [:div.via-txt]
22-
(fill-in "Group name" "com.example")
23-
(fill-in "Domain with TXT record" "example.com")
24-
(press "Verify Group"))
22+
(fill-in "Group name" "com.example")
23+
(fill-in "Domain with TXT record" "example.com")
24+
(press "Verify Group"))
2525
(follow-redirect)
2626
(within [:div.info]
27-
(has (some-text? "The group 'com.example' has been verified"))))))
27+
(has (some-text? "The group 'com.example' has been verified"))))))
2828

2929
(deftest user-cannot-verify-non-corresponding-group
3030
(help/with-TXT ["clojars dantheman"]
@@ -33,12 +33,12 @@
3333
(follow-redirect)
3434
(visit "/verify/group")
3535
(within [:div.via-txt]
36-
(fill-in "Group name" "com.example")
37-
(fill-in "Domain with TXT record" "example.org")
38-
(press "Verify Group"))
36+
(fill-in "Group name" "com.example")
37+
(fill-in "Domain with TXT record" "example.org")
38+
(press "Verify Group"))
3939
(follow-redirect)
4040
(within [:div.error]
41-
(has (some-text? "Group and domain do not correspond with each other"))))))
41+
(has (some-text? "Group and domain do not correspond with each other"))))))
4242

4343
(deftest user-can-verify-sub-group
4444
(help/with-TXT ["clojars dantheman"]
@@ -47,31 +47,31 @@
4747
(follow-redirect)
4848
(visit "/verify/group")
4949
(within [:div.via-txt]
50-
(fill-in "Group name" "com.example")
51-
(fill-in "Domain with TXT record" "example.com")
52-
(press "Verify Group"))
50+
(fill-in "Group name" "com.example")
51+
(fill-in "Domain with TXT record" "example.com")
52+
(press "Verify Group"))
5353
(follow-redirect)
5454
(within [:div.info]
55-
(has (some-text? "The group 'com.example' has been verified")))
55+
(has (some-text? "The group 'com.example' has been verified")))
5656

5757
(within [:div.via-parent]
58-
(fill-in "Group name" "com.example.ham")
59-
(press "Verify Group"))
58+
(fill-in "Group name" "com.example.ham")
59+
(press "Verify Group"))
6060
(follow-redirect)
6161
(within [:div.info]
62-
(has (some-text? "The group 'com.example.ham' has been verified"))))))
62+
(has (some-text? "The group 'com.example.ham' has been verified"))))))
6363

6464
(deftest user-cannot-verify-subgroup-with-non-verified-parent
6565
(-> (session (help/app))
6666
(register-as "dantheman" "test@example.org" "password")
6767
(follow-redirect)
6868
(visit "/verify/group")
6969
(within [:div.via-parent]
70-
(fill-in "Group name" "com.example")
71-
(press "Verify Group"))
70+
(fill-in "Group name" "com.example")
71+
(press "Verify Group"))
7272
(follow-redirect)
7373
(within [:div.error]
74-
(has (some-text? "The group is not a subgroup of a verified group")))))
74+
(has (some-text? "The group is not a subgroup of a verified group")))))
7575

7676
(deftest user-can-verify-vcs-groups
7777
(with-redefs [http/head (constantly {:status 200})]
@@ -80,12 +80,12 @@
8080
(follow-redirect)
8181
(visit "/verify/group")
8282
(within [:div.via-vcs]
83-
(fill-in "Verification Repository URL"
84-
"https://github.com/example/clojars-dantheman")
85-
(press "Verify Groups"))
83+
(fill-in "Verification Repository URL"
84+
"https://github.com/example/clojars-dantheman")
85+
(press "Verify Groups"))
8686
(follow-redirect)
8787
(within [:div.info]
88-
(has (some-text? "The groups 'com.github.example' & 'net.github.example' have been verified"))))))
88+
(has (some-text? "The groups 'com.github.example' & 'net.github.example' have been verified"))))))
8989

9090
(deftest user-cannot-verify-vcs-groups-with-missing-repo
9191
(with-redefs [http/head (constantly {:status 404})]
@@ -94,9 +94,9 @@
9494
(follow-redirect)
9595
(visit "/verify/group")
9696
(within [:div.via-vcs]
97-
(fill-in "Verification Repository URL"
98-
"https://github.com/example/clojars-dantheman")
99-
(press "Verify Groups"))
97+
(fill-in "Verification Repository URL"
98+
"https://github.com/example/clojars-dantheman")
99+
(press "Verify Groups"))
100100
(follow-redirect)
101101
(within [:div.error]
102-
(has (some-text? "The verification repo does not exist"))))))
102+
(has (some-text? "The verification repo does not exist"))))))

test/clojars/test_helper.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,6 @@
220220

221221
(defmacro with-TXT
222222
[txt-records & body]
223-
`(with-redefs [shell/sh (constantly {:out (TXT-vec->str ~txt-records)
224-
:exit 0})]
223+
`(with-redefs [shell/sh (constantly {:out (TXT-vec->str ~txt-records)
224+
:exit 0})]
225225
~@body))

0 commit comments

Comments
 (0)