@@ -133,6 +133,7 @@ func TestSegment(t *testing.T) {
133133 // post tests
134134 body := SegmentPatchAndPostBody {
135135 Title : "hello" ,
136+ Timezone : "America/Los_Angeles" ,
136137 StartTime : time .Now ().Format (time .RFC3339 ),
137138 IsRecurring : & tr ,
138139 Duration : "60" ,
@@ -166,6 +167,7 @@ func TestSegment(t *testing.T) {
166167 a .Equal (401 , resp .StatusCode )
167168
168169 body .Title = "testing"
170+ body .Timezone = ""
169171 b , _ = json .Marshal (body )
170172 req , _ = http .NewRequest (http .MethodPost , ts .URL + ScheduleSegment {}.Path (), bytes .NewBuffer (b ))
171173 q .Set ("broadcaster_id" , "1" )
@@ -174,15 +176,7 @@ func TestSegment(t *testing.T) {
174176 a .Nil (err )
175177 a .Equal (400 , resp .StatusCode )
176178
177- b , _ = json .Marshal (body )
178- req , _ = http .NewRequest (http .MethodPost , ts .URL + ScheduleSegment {}.Path (), bytes .NewBuffer (b ))
179- q .Set ("broadcaster_id" , "1" )
180- req .URL .RawQuery = q .Encode ()
181- resp , err = http .DefaultClient .Do (req )
182- a .Nil (err )
183- a .Equal (400 , resp .StatusCode )
184-
185- body .IsRecurring = nil
179+ body .Timezone = "test"
186180 b , _ = json .Marshal (body )
187181 req , _ = http .NewRequest (http .MethodPost , ts .URL + ScheduleSegment {}.Path (), bytes .NewBuffer (b ))
188182 q .Set ("broadcaster_id" , "1" )
0 commit comments