Skip to content

Commit 34af230

Browse files
committed
Prefix unused variables with an underscore
``` warning: variable "context" is unused (if the variable is not meant to be used, prefix it with an underscore) │ 140 │ test "user-agent header is forbidden", context do │ ~~~~~~~ │ └─ test/elixir/test/nouveau_test.exs:140:42: NouveauTest."test user-agent header is forbidden"/1 ```
1 parent eeb16fb commit 34af230

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

test/elixir/test/auth_lockout_test.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ defmodule AuthLockoutTest do
5656
end
5757

5858
# warning?
59-
resp = Couch.get("/_all_dbs",
59+
_resp = Couch.get("/_all_dbs",
6060
no_auth: true,
6161
headers: [authorization: "Basic #{:base64.encode("chttpd_auth_lockout:baz")}"]
6262
)
6363
end
64-
6564
end

test/elixir/test/basics_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ defmodule BasicsTest do
383383
end
384384

385385
@tag :with_db
386-
test "request ID can be specified at the client", context do
386+
test "request ID can be specified at the client", _context do
387387
uuid = "E7498DE1-B661-42FA-943D-17F890143068"
388388
resp = Couch.get("/", headers: ["X-Couch-Request-ID": uuid])
389389
assert resp.headers["X-Couch-Request-ID"] == uuid

test/elixir/test/nouveau_test.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ defmodule NouveauTest do
137137
"status code: #{resp.status_code}, resp body: #{:jiffy.encode(resp.body)}"
138138
end
139139

140-
test "user-agent header is forbidden", context do
140+
test "user-agent header is forbidden", _context do
141141
resp = Couch.get("http://127.0.0.1:5987",
142142
headers: ["User-Agent": "couchdb"])
143143
assert_status_code(resp, 403)
144144
end
145145

146-
test "search analyze", context do
146+
test "search analyze", _context do
147147
url = "/_nouveau_analyze"
148148
resp = Couch.post(url,
149149
headers: ["Content-Type": "application/json"],
@@ -585,7 +585,7 @@ defmodule NouveauTest do
585585
@tag :with_db
586586
test "purge with conflicts", context do
587587
db_name = context[:db_name]
588-
create_resp = create_conflicted_search_docs(db_name)
588+
_create_resp = create_conflicted_search_docs(db_name)
589589
create_ddoc(db_name)
590590

591591
search_url = "/#{db_name}/_design/foo/_nouveau/bar"
@@ -621,7 +621,7 @@ defmodule NouveauTest do
621621

622622
resp = Couch.get(search_url, query: %{q: "*:*", include_docs: true})
623623
assert_status_code(resp, 200)
624-
hits = Enum.sort(resp.body["hits"])
624+
_hits = Enum.sort(resp.body["hits"])
625625

626626
assert get_total_hits(resp) == 2
627627
[hit1, hit2] = Enum.sort(resp.body["hits"])

0 commit comments

Comments
 (0)