|
1 | 1 | defmodule AdoCli.CLI.PullRequestsTest do |
2 | 2 | use AdoCli.CLI.TestHelper |
3 | 3 | import ExUnit.CaptureIO |
4 | | - alias AdoCli.CLI.PullRequests |
5 | 4 |
|
6 | 5 | describe "list_prs" do |
7 | 6 | test "halts 0 on successful get", %{server: server} do |
@@ -171,7 +170,7 @@ defmodule AdoCli.CLI.PullRequestsTest do |
171 | 170 | ) |
172 | 171 | end |
173 | 172 |
|
174 | | - test "halts 1 on API error", %{server: server} do |
| 173 | + test "halts 1 on API error", %{server: _server} do |
175 | 174 | # complete_pr uses PATCH, not GET. The generic expect_api_error |
176 | 175 | # helper mocks GET so this test was incorrectly written. Skipping |
177 | 176 | # for now — the success path above exercises the code. |
@@ -414,7 +413,7 @@ defmodule AdoCli.CLI.PullRequestsTest do |
414 | 413 | assert msg =~ "No change matches --file 'src/does_not_exist.ex'" |
415 | 414 | end |
416 | 415 |
|
417 | | - test "halts 1 with --file and --unified set together", %{server: server} do |
| 416 | + test "halts 1 with --file and --unified set together", %{server: _server} do |
418 | 417 | capture_io(fn -> |
419 | 418 | apply(AdoCli.CLI.PullRequests, :diff_pr, [ |
420 | 419 | %{ |
@@ -686,7 +685,7 @@ defmodule AdoCli.CLI.PullRequestsTest do |
686 | 685 | ) |
687 | 686 | end |
688 | 687 |
|
689 | | - test "halts 1 with a clear error on invalid --status", %{server: server} do |
| 688 | + test "halts 1 with a clear error on invalid --status", %{server: _server} do |
690 | 689 | # No expectation registered: the function must halt BEFORE |
691 | 690 | # the HTTP call. If the function ever hits the network, |
692 | 691 | # the test fails with "no expectation matched". |
@@ -796,7 +795,7 @@ defmodule AdoCli.CLI.PullRequestsTest do |
796 | 795 | end |
797 | 796 |
|
798 | 797 | test "halts 1 with a clear error when --content @<missing-file> cannot be read", |
799 | | - %{server: server} do |
| 798 | + %{server: _server} do |
800 | 799 | missing = "/tmp/ado-missing-#{System.unique_integer([:positive])}.md" |
801 | 800 |
|
802 | 801 | capture_io(fn -> |
@@ -1010,7 +1009,7 @@ defmodule AdoCli.CLI.PullRequestsTest do |
1010 | 1009 | # ── update_comment (prs comments update) ───────────────────────── |
1011 | 1010 |
|
1012 | 1011 | describe "update_comment (prs comments update)" do |
1013 | | - test "halts 1 when neither --content nor --status is given", %{server: server} do |
| 1012 | + test "halts 1 when neither --content nor --status is given", %{server: _server} do |
1014 | 1013 | capture_io(fn -> |
1015 | 1014 | apply(AdoCli.CLI.PullRequests, :update_comment, [ |
1016 | 1015 | %{ |
@@ -1115,7 +1114,7 @@ defmodule AdoCli.CLI.PullRequestsTest do |
1115 | 1114 | assert_receive {:cli_mate_shell, :halt, 0}, 500 |
1116 | 1115 | end |
1117 | 1116 |
|
1118 | | - test "halts 1 with a clear error on invalid --status", %{server: server} do |
| 1117 | + test "halts 1 with a clear error on invalid --status", %{server: _server} do |
1119 | 1118 | capture_io(fn -> |
1120 | 1119 | apply(AdoCli.CLI.PullRequests, :update_comment, [ |
1121 | 1120 | %{ |
@@ -1199,7 +1198,7 @@ defmodule AdoCli.CLI.PullRequestsTest do |
1199 | 1198 | end |
1200 | 1199 |
|
1201 | 1200 | test "--dry-run with --content prints the would-be PATCH and halts 0 (no API call)", |
1202 | | - %{server: server} do |
| 1201 | + %{server: _server} do |
1203 | 1202 | output = |
1204 | 1203 | capture_io(fn -> |
1205 | 1204 | apply(AdoCli.CLI.PullRequests, :update_comment, [ |
@@ -1232,7 +1231,7 @@ defmodule AdoCli.CLI.PullRequestsTest do |
1232 | 1231 | assert action["body"] == %{"content" => "new text"} |
1233 | 1232 | end |
1234 | 1233 |
|
1235 | | - test "--dry-run with --status prints the would-be thread PATCH", %{server: server} do |
| 1234 | + test "--dry-run with --status prints the would-be thread PATCH", %{server: _server} do |
1236 | 1235 | output = |
1237 | 1236 | capture_io(fn -> |
1238 | 1237 | apply(AdoCli.CLI.PullRequests, :update_comment, [ |
|
0 commit comments