@@ -36,7 +36,7 @@ defmodule Zexbox.JiraClientTest do
3636 describe "search_latest_issues/2" do
3737 test_with_mock "returns issues with url keys added on success" , Req ,
3838 new: fn _opts -> :mock_client end ,
39- post : fn :mock_client , _opts ->
39+ get : fn :mock_client , _opts ->
4040 { :ok ,
4141 % {
4242 status: 200 ,
@@ -58,15 +58,15 @@ defmodule Zexbox.JiraClientTest do
5858
5959 test_with_mock "returns empty list when no issues found" , Req ,
6060 new: fn _opts -> :mock_client end ,
61- post : fn :mock_client , _opts ->
61+ get : fn :mock_client , _opts ->
6262 { :ok , % { status: 200 , body: % { "issues" => [ ] } } }
6363 end do
6464 assert { :ok , [ ] } = JiraClient . search_latest_issues ( "status = Open" )
6565 end
6666
6767 test_with_mock "returns error on non-2xx response" , Req ,
6868 new: fn _opts -> :mock_client end ,
69- post : fn :mock_client , _opts ->
69+ get : fn :mock_client , _opts ->
7070 { :ok , % { status: 401 , body: % { "message" => "Unauthorized" } } }
7171 end do
7272 assert { :error , reason } = JiraClient . search_latest_issues ( "status = Open" )
@@ -75,7 +75,7 @@ defmodule Zexbox.JiraClientTest do
7575
7676 test_with_mock "returns error on request failure" , Req ,
7777 new: fn _opts -> :mock_client end ,
78- post : fn :mock_client , _opts ->
78+ get : fn :mock_client , _opts ->
7979 { :error , % { reason: :econnrefused } }
8080 end do
8181 assert { :error , _reason } = JiraClient . search_latest_issues ( "status = Open" )
0 commit comments