lib/api-tester/definition/fields/boolean_field.rb in api-tester-1.1.1 vs lib/api-tester/definition/fields/boolean_field.rb in api-tester-1.1.2
- old
+ new
@@ -3,12 +3,12 @@
require 'api-tester/definition/fields/field'
module ApiTester
# Class for defining booleans in contract
class BooleanField < Field
- def initialize(name:, default_value: true, required: false)
- super name: name, default_value: default_value, required: required
+ def initialize(name:, default: true, required: false)
+ super name: name, default: default, required: required
end
def negative_boundary_values
super +
[
@@ -16,8 +16,15 @@
123,
0,
1,
{}
]
+ end
+
+ def good_cases
+ [
+ true,
+ false
+ ]
end
end
end