Skip to content

Commit

Permalink
Add more plural tests, including LatinDatum / latindata
Browse files Browse the repository at this point in the history
  • Loading branch information
cben committed Dec 16, 2018
1 parent bfe132b commit f2a8a81
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,17 @@ def test_format_datetime_with_time
formatted = client.send(:format_datetime, value)
assert_equal(formatted, '2018-04-30T19:20:33.000000000+00:00')
end

def test_parse_definition_with_unconventional_names
%w[
PluralPolicy pluralpolicies plural_policy plural_policies
LatinDatum latindata latin_datum latin_data
Noseparator noseparators noseparator noseparators
lowercase lowercases lowercase lowercases
].each_slice(4) do |kind, plural, expected_single, expected_plural|
method_names = Kubeclient::ClientMixin.parse_definition(kind, plural).method_names
assert_equal(method_names[0], expected_single)
assert_equal(method_names[1], expected_plural)
end
end
end

0 comments on commit f2a8a81

Please sign in to comment.