@@ -63,10 +63,13 @@ func TestBumpFilter_Apply_Preview(t *testing.T) {
6363 assert .Contains (t , oas .Paths .Map (), "test" )
6464
6565 testPath := oas .Paths .Map ()["test" ]
66- assert .Contains (t , testPath .Extensions , "x-state" )
67- assert .Equal (t , "Preview" , testPath .Extensions ["x-state" ])
68- assert .Contains (t , testPath .Extensions , "x-beta" )
69- assert .Equal (t , true , testPath .Extensions ["x-beta" ])
66+ assert .NotNil (t , testPath .Get )
67+
68+ op := testPath .Get
69+ assert .Contains (t , op .Extensions , "x-state" )
70+ assert .Equal (t , "Preview" , op .Extensions ["x-state" ])
71+ assert .Contains (t , op .Extensions , "x-beta" )
72+ assert .Equal (t , true , op .Extensions ["x-beta" ])
7073}
7174
7275func TestBumpFilter_Apply_Upcoming (t * testing.T ) {
@@ -106,9 +109,12 @@ func TestBumpFilter_Apply_Upcoming(t *testing.T) {
106109 assert .Contains (t , oas .Paths .Map (), "test" )
107110
108111 testPath := oas .Paths .Map ()["test" ]
109- assert .Contains (t , testPath .Extensions , "x-state" )
110- assert .Equal (t , "Upcoming" , testPath .Extensions ["x-state" ])
111- assert .NotContains (t , testPath .Extensions , "x-beta" )
112+ assert .NotNil (t , testPath .Get )
113+ op := testPath .Get
114+
115+ assert .Contains (t , op .Extensions , "x-state" )
116+ assert .Equal (t , "Upcoming" , op .Extensions ["x-state" ])
117+ assert .NotContains (t , op .Extensions , "x-beta" )
112118}
113119
114120func TestBumpFilter_Apply_Stable (t * testing.T ) {
@@ -148,6 +154,9 @@ func TestBumpFilter_Apply_Stable(t *testing.T) {
148154 assert .Contains (t , oas .Paths .Map (), "test" )
149155
150156 testPath := oas .Paths .Map ()["test" ]
151- assert .NotContains (t , testPath .Extensions , "x-state" )
152- assert .NotContains (t , testPath .Extensions , "x-beta" )
157+ assert .NotNil (t , testPath .Get )
158+ op := testPath .Get
159+
160+ assert .NotContains (t , op .Extensions , "x-state" )
161+ assert .NotContains (t , op .Extensions , "x-beta" )
153162}
0 commit comments