Skip to content

Commit

Permalink
apply review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
SwissGipfel authored and kenchan0130 committed Feb 23, 2023
1 parent cf83add commit 51e65f6
Showing 1 changed file with 2 additions and 48 deletions.
50 changes: 2 additions & 48 deletions msgraph/administrative_units_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package msgraph_test

import (
"fmt"
"net/http"
"strings"
"testing"

Expand All @@ -11,53 +12,6 @@ import (
"github.com/manicminer/hamilton/odata"
)

//func TestCreateGroup(t *testing.T) {
//client := test.NewTest(t)
//defer client.CancelFunc()

//ctx := context.Background()
//auId := "a36b436e-7b28-4e51-a1c1-8553d3e2cd5b"
//var odataId odata.Id = "directoryObjects('3c2e469a-bfdb-4240-ab3c-81c167a05172')"
//var odataType odata.Type = "#microsoft.graph.servicePrincipal"
//ownerString := "3c2e469a-bfdb-4240-ab3c-81c167a05172"
//owner := msgraph.DirectoryObject{
//ODataId: &odataId,
//ODataType: &odataType,
//Id: &ownerString,
//}
//groupName := "hansi-test"
//var groupDescription msgraph.StringNullWhenEmpty = "hansi-test"
//groupTypes := []string{"Unified"}
//behavior := []msgraph.GroupResourceBehaviorOption{
//msgraph.GroupResourceBehaviorOptionWelcomeEmailDisabled,
//msgraph.GroupResourceBehaviorOptionSubscribeNewGroupMembers,
//msgraph.GroupResourceBehaviorOptionSubscribeMembersToCalendarEventsDisabled,
//}
//visibility := msgraph.GroupVisibilityPrivate
//falsePointer := false
//truePointer := true
//group := msgraph.Group{
//Description: &groupDescription,
//DisplayName: &groupName,
//GroupTypes: &groupTypes,
//IsAssignableToRole: &falsePointer,
//MailEnabled: &truePointer,
//MailNickname: &groupName,
//Owners: &msgraph.Owners{
//owner,
//},
//ResourceBehaviorOptions: &behavior,
//SecurityEnabled: &truePointer,
//Visibility: &visibility,
//}
//returnValue, err := client.AdministrativeUnitsClient.CreateGroup(ctx, auId, &group)
//if err != nil {
//t.Fatalf("AdministrativeUnit.CreateGroup():%s", err)
//}
//println(returnValue)

//}

func TestAdministrativeUnitsClient(t *testing.T) {
c := test.NewTest(t)
defer c.CancelFunc()
Expand Down Expand Up @@ -241,7 +195,7 @@ func testAdministrativeUnitsClient_CreateGroup(t *testing.T, c *test.Test, admin
if err != nil {
t.Fatalf("AdministrativeUnitsClient.CreateGroup(): %v", err)
}
if status < 200 || status >= 300 {
if status != http.StatusCreated {
t.Fatalf("AdministrativeUnitsClient.CreateGroup(): invalid status: %d", status)
}
return group
Expand Down

0 comments on commit 51e65f6

Please sign in to comment.