Skip to content

Commit

Permalink
Fix tests to account for pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
RicePatrick committed Jun 11, 2024
1 parent e40f621 commit baeefe7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions group_hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestListGroupHooks(t *testing.T) {
AlertStatus: "executable",
CreatedAt: &datePointer,
ResourceAccessTokenEvents: true,
CustomHeaders: []HookCustomHeader{
CustomHeaders: []*HookCustomHeader{
{
Key: "Authorization",
},
Expand Down Expand Up @@ -171,7 +171,7 @@ func TestGetGroupHook(t *testing.T) {
AlertStatus: "executable",
CreatedAt: &datePointer,
ResourceAccessTokenEvents: true,
CustomHeaders: []HookCustomHeader{
CustomHeaders: []*HookCustomHeader{
{
Key: "Authorization",
},
Expand Down Expand Up @@ -255,7 +255,7 @@ func TestAddGroupHook(t *testing.T) {
CreatedAt: &datePointer,
CustomWebhookTemplate: "addTestValue",
ResourceAccessTokenEvents: true,
CustomHeaders: []HookCustomHeader{
CustomHeaders: []*HookCustomHeader{
{
Key: "Authorization",
Value: "testMe",
Expand Down Expand Up @@ -341,7 +341,7 @@ func TestEditGroupHook(t *testing.T) {
CreatedAt: &datePointer,
CustomWebhookTemplate: "testValue",
ResourceAccessTokenEvents: true,
CustomHeaders: []HookCustomHeader{
CustomHeaders: []*HookCustomHeader{
{
Key: "Authorization",
Value: "testMe",
Expand Down Expand Up @@ -399,7 +399,7 @@ func TestGetGroupWebhookHeader(t *testing.T) {
want := &GroupHook{
ID: 1,
CustomWebhookTemplate: "{\"event\":\"{{object_kind}}\"}",
CustomHeaders: []HookCustomHeader{
CustomHeaders: []*HookCustomHeader{
{
Key: "Authorization",
},
Expand Down
6 changes: 3 additions & 3 deletions projects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ func TestProjectAddWebhook_CustomTemplateStuff(t *testing.T) {

hook, resp, err := client.Projects.AddProjectHook(1, &AddProjectHookOptions{
CustomWebhookTemplate: Ptr(`{"example":"{{object_kind}}"}`),
CustomHeaders: []*HookCustomHeader{
CustomHeaders: &[]*HookCustomHeader{
{
Key: "Authorization",
Value: "stuff",
Expand Down Expand Up @@ -1556,7 +1556,7 @@ func TestProjectEditWebhook_CustomTemplateStuff(t *testing.T) {

hook, resp, err := client.Projects.EditProjectHook(1, 1, &EditProjectHookOptions{
CustomWebhookTemplate: Ptr(`{"example":"{{object_kind}}"}`),
CustomHeaders: []*HookCustomHeader{
CustomHeaders: &[]*HookCustomHeader{
{
Key: "Authorization",
Value: "stuff",
Expand Down Expand Up @@ -1778,7 +1778,7 @@ func TestGetProjectWebhookHeader(t *testing.T) {
want := &ProjectHook{
ID: 1,
CustomWebhookTemplate: "{\"event\":\"{{object_kind}}\"}",
CustomHeaders: []HookCustomHeader{
CustomHeaders: []*HookCustomHeader{
{
Key: "Authorization",
},
Expand Down

0 comments on commit baeefe7

Please sign in to comment.