Skip to content

Commit 8be7874

Browse files
committed
Add tests for non-suffix y->ies plurals ManageIQ#376
1 parent 55b8fe0 commit 8be7874

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test_missing_methods.rb

+12
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ def test_missing
4141
end
4242
end
4343

44+
def test_nonsuffix_plurals
45+
stub_request(:get, %r{/apis/extensions/v1beta1$}).to_return(
46+
body: open_test_file('extensions_v1beta1_api_resource_list.json'),
47+
status: 200
48+
)
49+
client = Kubeclient::Client.new('http://localhost:8080/apis/extensions', 'v1beta1')
50+
assert_equal(true, client.respond_to?(:get_network_policy))
51+
assert_equal(true, client.respond_to?(:get_network_policies))
52+
assert_equal(true, client.respond_to?(:get_pod_security_policy))
53+
assert_equal(true, client.respond_to?(:get_pod_security_policies))
54+
end
55+
4456
def test_irregular_names
4557
stub_core_api_list
4658
client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')

0 commit comments

Comments
 (0)