mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
added coverage for fixed remote unsupported handler
Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -397,3 +397,14 @@ func TestNewRemoteFS_RemoteBaseURL_EmptySpecFailIndex(t *testing.T) {
|
||||
assert.Error(t, y)
|
||||
assert.Equal(t, "there is nothing in the spec, it's empty - so there is nothing to be done", y.Error())
|
||||
}
|
||||
|
||||
func TestNewRemoteFS_Unsupported(t *testing.T) {
|
||||
|
||||
cf := CreateOpenAPIIndexConfig()
|
||||
rfs, _ := NewRemoteFSWithConfig(cf)
|
||||
|
||||
x, y := rfs.Open("/woof.png")
|
||||
assert.Nil(t, x)
|
||||
assert.Error(t, y)
|
||||
assert.Equal(t, "open /woof.png: invalid argument", y.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user