@@ -40,10 +40,13 @@ func TestAccountService(t *testing.T) {
4040 t .Skipf ("Skipping as no json response is provided in testdata" )
4141 }
4242 p := client .Account .NewCreateAccountParams ("email" , "firstname" , "lastname" , "password" , "username" )
43- _ , err := client .Account .CreateAccount (p )
43+ r , err := client .Account .CreateAccount (p )
4444 if err != nil {
4545 t .Errorf (err .Error ())
4646 }
47+ if r .Id == "" {
48+ t .Errorf ("Failed to parse response. ID not found" )
49+ }
4750 }
4851 t .Run ("CreateAccount" , testcreateAccount )
4952
@@ -64,10 +67,13 @@ func TestAccountService(t *testing.T) {
6467 t .Skipf ("Skipping as no json response is provided in testdata" )
6568 }
6669 p := client .Account .NewDisableAccountParams (true )
67- _ , err := client .Account .DisableAccount (p )
70+ r , err := client .Account .DisableAccount (p )
6871 if err != nil {
6972 t .Errorf (err .Error ())
7073 }
74+ if r .Id == "" {
75+ t .Errorf ("Failed to parse response. ID not found" )
76+ }
7177 }
7278 t .Run ("DisableAccount" , testdisableAccount )
7379
@@ -76,10 +82,13 @@ func TestAccountService(t *testing.T) {
7682 t .Skipf ("Skipping as no json response is provided in testdata" )
7783 }
7884 p := client .Account .NewEnableAccountParams ()
79- _ , err := client .Account .EnableAccount (p )
85+ r , err := client .Account .EnableAccount (p )
8086 if err != nil {
8187 t .Errorf (err .Error ())
8288 }
89+ if r .Id == "" {
90+ t .Errorf ("Failed to parse response. ID not found" )
91+ }
8392 }
8493 t .Run ("EnableAccount" , testenableAccount )
8594
@@ -124,10 +133,13 @@ func TestAccountService(t *testing.T) {
124133 t .Skipf ("Skipping as no json response is provided in testdata" )
125134 }
126135 p := client .Account .NewLockAccountParams ("account" , "domainid" )
127- _ , err := client .Account .LockAccount (p )
136+ r , err := client .Account .LockAccount (p )
128137 if err != nil {
129138 t .Errorf (err .Error ())
130139 }
140+ if r .Id == "" {
141+ t .Errorf ("Failed to parse response. ID not found" )
142+ }
131143 }
132144 t .Run ("LockAccount" , testlockAccount )
133145
@@ -136,10 +148,13 @@ func TestAccountService(t *testing.T) {
136148 t .Skipf ("Skipping as no json response is provided in testdata" )
137149 }
138150 p := client .Account .NewMarkDefaultZoneForAccountParams ("account" , "domainid" , "zoneid" )
139- _ , err := client .Account .MarkDefaultZoneForAccount (p )
151+ r , err := client .Account .MarkDefaultZoneForAccount (p )
140152 if err != nil {
141153 t .Errorf (err .Error ())
142154 }
155+ if r .Id == "" {
156+ t .Errorf ("Failed to parse response. ID not found" )
157+ }
143158 }
144159 t .Run ("MarkDefaultZoneForAccount" , testmarkDefaultZoneForAccount )
145160
@@ -148,10 +163,13 @@ func TestAccountService(t *testing.T) {
148163 t .Skipf ("Skipping as no json response is provided in testdata" )
149164 }
150165 p := client .Account .NewUpdateAccountParams ()
151- _ , err := client .Account .UpdateAccount (p )
166+ r , err := client .Account .UpdateAccount (p )
152167 if err != nil {
153168 t .Errorf (err .Error ())
154169 }
170+ if r .Id == "" {
171+ t .Errorf ("Failed to parse response. ID not found" )
172+ }
155173 }
156174 t .Run ("UpdateAccount" , testupdateAccount )
157175
0 commit comments