File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -488,6 +488,8 @@ type PersonTranslations struct {
488
488
Name string `json:"name"`
489
489
Data struct {
490
490
Biography string `json:"biography"`
491
+ Name string `json:"name"`
492
+ Primary bool `json:"primary"`
491
493
} `json:"data"`
492
494
EnglishName string `json:"english_name"`
493
495
} `json:"translations"`
Original file line number Diff line number Diff line change @@ -24,6 +24,17 @@ func (suite *TMBDTestSuite) TestGetPersonDetailsWithOptions() {
24
24
suite .Equal ("Jason Momoa" , jasonMomoa .Name )
25
25
}
26
26
27
+ func (suite * TMBDTestSuite ) TestGetPersonDetailsWithAppend () {
28
+ options := make (map [string ]string )
29
+ options ["append_to_response" ] = "translations"
30
+ jasonMomoa , err := suite .client .GetPersonDetails (jasonMomoaID , options )
31
+ suite .Nil (err )
32
+ suite .NotNil (jasonMomoa .PersonTranslationsAppend )
33
+ suite .NotNil (jasonMomoa .Translations )
34
+ suite .NotEmpty (jasonMomoa .Translations .Translations )
35
+ suite .Equal ("Jason Momoa" , jasonMomoa .Translations .Translations [0 ].Data .Name )
36
+ }
37
+
27
38
func (suite * TMBDTestSuite ) TestGetPersonChanges () {
28
39
jasonMomoa , err := suite .client .GetPersonChanges (jasonMomoaID , nil )
29
40
suite .Nil (err )
@@ -174,6 +185,8 @@ func (suite *TMBDTestSuite) TestGetPersonTranslationsWithOptions() {
174
185
tomCruise , err := suite .client .GetPersonTranslations (tomCruiseID , options )
175
186
suite .Nil (err )
176
187
suite .NotNil (tomCruise .ID )
188
+ suite .NotEmpty (tomCruise .Translations )
189
+ suite .NotEmpty (tomCruise .Translations [0 ].Data .Name )
177
190
}
178
191
179
192
func (suite * TMBDTestSuite ) TestGetPersonLatest () {
You can’t perform that action at this time.
0 commit comments