File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 127
127
expect ( action . fetch_version ( ref : ref ) ) . to eq ( "1.2.3" )
128
128
end
129
129
130
+ it 'returns the correct version for a openapi.yaml file' do
131
+ mock_response ( 'my_branch' , mock_open_api_yaml_content ( '1.2.3' ) )
132
+
133
+ expect ( action . fetch_version ( ref : ref ) ) . to eq ( "1.2.3" )
134
+ end
135
+
130
136
it 'returns the correct version for a package.json file' do
131
137
mock_response ( 'my_branch' , mock_package_json_content ( '1.2.3' ) )
132
138
@@ -275,6 +281,17 @@ def mock_gemspec_content(version)
275
281
)
276
282
end
277
283
284
+ def mock_open_api_yaml_content ( version )
285
+ %(
286
+ openapi: 3.0.0
287
+ info:
288
+ title: Sample API
289
+ description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
290
+ version: "#{ version } "
291
+ )
292
+ end
293
+
294
+
278
295
def mock_package_json_content ( version )
279
296
%(
280
297
{
You can’t perform that action at this time.
0 commit comments