@@ -40,10 +40,13 @@ func TestAccountService(t *testing.T) {
40
40
t .Skipf ("Skipping as no json response is provided in testdata" )
41
41
}
42
42
p := client .Account .NewCreateAccountParams ("email" , "firstname" , "lastname" , "password" , "username" )
43
- _ , err := client .Account .CreateAccount (p )
43
+ r , err := client .Account .CreateAccount (p )
44
44
if err != nil {
45
45
t .Errorf (err .Error ())
46
46
}
47
+ if r .Id == "" {
48
+ t .Errorf ("Failed to parse response. ID not found" )
49
+ }
47
50
}
48
51
t .Run ("CreateAccount" , testcreateAccount )
49
52
@@ -64,10 +67,13 @@ func TestAccountService(t *testing.T) {
64
67
t .Skipf ("Skipping as no json response is provided in testdata" )
65
68
}
66
69
p := client .Account .NewDisableAccountParams (true )
67
- _ , err := client .Account .DisableAccount (p )
70
+ r , err := client .Account .DisableAccount (p )
68
71
if err != nil {
69
72
t .Errorf (err .Error ())
70
73
}
74
+ if r .Id == "" {
75
+ t .Errorf ("Failed to parse response. ID not found" )
76
+ }
71
77
}
72
78
t .Run ("DisableAccount" , testdisableAccount )
73
79
@@ -76,10 +82,13 @@ func TestAccountService(t *testing.T) {
76
82
t .Skipf ("Skipping as no json response is provided in testdata" )
77
83
}
78
84
p := client .Account .NewEnableAccountParams ()
79
- _ , err := client .Account .EnableAccount (p )
85
+ r , err := client .Account .EnableAccount (p )
80
86
if err != nil {
81
87
t .Errorf (err .Error ())
82
88
}
89
+ if r .Id == "" {
90
+ t .Errorf ("Failed to parse response. ID not found" )
91
+ }
83
92
}
84
93
t .Run ("EnableAccount" , testenableAccount )
85
94
@@ -124,10 +133,13 @@ func TestAccountService(t *testing.T) {
124
133
t .Skipf ("Skipping as no json response is provided in testdata" )
125
134
}
126
135
p := client .Account .NewLockAccountParams ("account" , "domainid" )
127
- _ , err := client .Account .LockAccount (p )
136
+ r , err := client .Account .LockAccount (p )
128
137
if err != nil {
129
138
t .Errorf (err .Error ())
130
139
}
140
+ if r .Id == "" {
141
+ t .Errorf ("Failed to parse response. ID not found" )
142
+ }
131
143
}
132
144
t .Run ("LockAccount" , testlockAccount )
133
145
@@ -136,10 +148,13 @@ func TestAccountService(t *testing.T) {
136
148
t .Skipf ("Skipping as no json response is provided in testdata" )
137
149
}
138
150
p := client .Account .NewMarkDefaultZoneForAccountParams ("account" , "domainid" , "zoneid" )
139
- _ , err := client .Account .MarkDefaultZoneForAccount (p )
151
+ r , err := client .Account .MarkDefaultZoneForAccount (p )
140
152
if err != nil {
141
153
t .Errorf (err .Error ())
142
154
}
155
+ if r .Id == "" {
156
+ t .Errorf ("Failed to parse response. ID not found" )
157
+ }
143
158
}
144
159
t .Run ("MarkDefaultZoneForAccount" , testmarkDefaultZoneForAccount )
145
160
@@ -148,10 +163,13 @@ func TestAccountService(t *testing.T) {
148
163
t .Skipf ("Skipping as no json response is provided in testdata" )
149
164
}
150
165
p := client .Account .NewUpdateAccountParams ()
151
- _ , err := client .Account .UpdateAccount (p )
166
+ r , err := client .Account .UpdateAccount (p )
152
167
if err != nil {
153
168
t .Errorf (err .Error ())
154
169
}
170
+ if r .Id == "" {
171
+ t .Errorf ("Failed to parse response. ID not found" )
172
+ }
155
173
}
156
174
t .Run ("UpdateAccount" , testupdateAccount )
157
175
0 commit comments