Skip to content

Commit

Permalink
Add tests for non-suffix y->ies plurals ManageIQ#376
Browse files Browse the repository at this point in the history
  • Loading branch information
cben committed Dec 15, 2018
1 parent 55b8fe0 commit 8be7874
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_missing_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ def test_missing
end
end

def test_nonsuffix_plurals
stub_request(:get, %r{/apis/extensions/v1beta1$}).to_return(
body: open_test_file('extensions_v1beta1_api_resource_list.json'),
status: 200
)
client = Kubeclient::Client.new('http://localhost:8080/apis/extensions', 'v1beta1')
assert_equal(true, client.respond_to?(:get_network_policy))
assert_equal(true, client.respond_to?(:get_network_policies))
assert_equal(true, client.respond_to?(:get_pod_security_policy))
assert_equal(true, client.respond_to?(:get_pod_security_policies))
end

def test_irregular_names
stub_core_api_list
client = Kubeclient::Client.new('http://localhost:8080/api/', 'v1')
Expand Down

0 comments on commit 8be7874

Please sign in to comment.