Skip to content

Commit 87d718f

Browse files
test: Remove redundant Marshal tests for alert update requests
1 parent ce99aad commit 87d718f

2 files changed

Lines changed: 0 additions & 45 deletions

File tree

‎github/code_scanning_test.go‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -772,27 +772,6 @@ func TestCodeScanningService_UpdateAlert(t *testing.T) {
772772
})
773773
}
774774

775-
func TestUpdateCodeScanningAlertRequest_Marshal(t *testing.T) {
776-
t.Parallel()
777-
778-
dismissInput := UpdateCodeScanningAlertRequest{
779-
State: new("dismissed"),
780-
DismissedReason: new("false positive"),
781-
CreateRequest: new(true),
782-
}
783-
testJSONMarshal(t, dismissInput, `{"state":"dismissed","dismissed_reason":"false positive","create_request":true}`)
784-
785-
assignInput := UpdateCodeScanningAlertRequest{
786-
Assignees: []string{"octocat"},
787-
}
788-
testJSONMarshal(t, assignInput, `{"assignees":["octocat"]}`)
789-
790-
unassignInput := UpdateCodeScanningAlertRequest{
791-
Assignees: []string{},
792-
}
793-
testJSONMarshal(t, unassignInput, `{"assignees":[]}`)
794-
}
795-
796775
func TestCodeScanningService_ListAlertInstances(t *testing.T) {
797776
t.Parallel()
798777
client, mux, _ := setup(t)

‎github/dependabot_alerts_test.go‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -176,27 +176,3 @@ func TestDependabotService_UpdateAlert(t *testing.T) {
176176
return resp, err
177177
})
178178
}
179-
180-
func TestUpdateDependabotAlertRequest_Marshal(t *testing.T) {
181-
t.Parallel()
182-
183-
dismissInput := UpdateDependabotAlertRequest{
184-
State: new("dismissed"),
185-
DismissedReason: new("no_bandwidth"),
186-
}
187-
testJSONMarshal(t, dismissInput, `{"state":"dismissed","dismissed_reason":"no_bandwidth"}`)
188-
189-
assignInput := UpdateDependabotAlertRequest{
190-
Assignees: []string{"copilot-swe-agent[bot]"},
191-
AgentAssignment: &DependabotAlertAgentAssignment{
192-
CustomInstructions: new("Upgrade the dependency"),
193-
Model: new("m"),
194-
},
195-
}
196-
testJSONMarshal(t, assignInput, `{"assignees":["copilot-swe-agent[bot]"],"agent_assignment":{"custom_instructions":"Upgrade the dependency","model":"m"}}`)
197-
198-
unassignInput := UpdateDependabotAlertRequest{
199-
Assignees: []string{},
200-
}
201-
testJSONMarshal(t, unassignInput, `{"assignees":[]}`)
202-
}

0 commit comments

Comments
 (0)