Skip to content

Commit f5b5fd2

Browse files
fix(jira_test.go): issueSearchResult struct doesnt contain total anymore adapt unit test accordingly
Signed-off-by: Holger Waschke <[email protected]>
1 parent 474810a commit f5b5fd2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

notify/jira/jira_test.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func TestSearchExistingIssue(t *testing.T) {
8181
return
8282
}
8383
require.Equal(t, expectedJQL, data.JQL)
84-
w.Write([]byte(`{"total": 0, "issues": []}`))
84+
w.Write([]byte(`{"issues": []}`))
8585
return
8686
default:
8787
dec := json.NewDecoder(r.Body)
@@ -321,7 +321,7 @@ func TestJiraTemplating(t *testing.T) {
321321
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
322322
switch r.URL.Path {
323323
case "/search":
324-
w.Write([]byte(`{"total": 0, "issues": []}`))
324+
w.Write([]byte(`{"issues": []}`))
325325
return
326326
default:
327327
dec := json.NewDecoder(r.Body)
@@ -464,7 +464,6 @@ func TestJiraNotify(t *testing.T) {
464464
},
465465
},
466466
searchResponse: issueSearchResult{
467-
Total: 0,
468467
Issues: []issue{},
469468
},
470469
issue: issue{
@@ -509,7 +508,6 @@ func TestJiraNotify(t *testing.T) {
509508
},
510509
},
511510
searchResponse: issueSearchResult{
512-
Total: 0,
513511
Issues: []issue{},
514512
},
515513
issue: issue{
@@ -562,7 +560,6 @@ func TestJiraNotify(t *testing.T) {
562560
},
563561
},
564562
searchResponse: issueSearchResult{
565-
Total: 0,
566563
Issues: []issue{},
567564
},
568565
issue: issue{
@@ -612,7 +609,6 @@ func TestJiraNotify(t *testing.T) {
612609
},
613610
},
614611
searchResponse: issueSearchResult{
615-
Total: 1,
616612
Issues: []issue{
617613
{
618614
Key: "OPS-1",
@@ -668,7 +664,6 @@ func TestJiraNotify(t *testing.T) {
668664
},
669665
},
670666
searchResponse: issueSearchResult{
671-
Total: 1,
672667
Issues: []issue{
673668
{
674669
Key: "OPS-3",
@@ -723,7 +718,6 @@ func TestJiraNotify(t *testing.T) {
723718
},
724719
},
725720
searchResponse: issueSearchResult{
726-
Total: 1,
727721
Issues: []issue{
728722
{
729723
Key: "OPS-3",

0 commit comments

Comments
 (0)