summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/parser/functions/is_valid_mac_address_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/unit/parser/functions/is_valid_mac_address_spec.rb b/spec/unit/parser/functions/is_valid_mac_address_spec.rb
index c4eb468..62e6fee 100644
--- a/spec/unit/parser/functions/is_valid_mac_address_spec.rb
+++ b/spec/unit/parser/functions/is_valid_mac_address_spec.rb
@@ -19,12 +19,17 @@ describe "the is_valid_mac_address function" do
end
it "should return true if a valid mac address" do
- result = @scope.function_is_valid_mac_address("00:a0:1f:12:7f:a0")
+ result = @scope.function_is_valid_mac_address(["00:a0:1f:12:7f:a0"])
result.should(eq(true))
end
+ it "should return false if octets are out of range" do
+ result = @scope.function_is_valid_mac_address(["00:a0:1f:12:7f:g0"])
+ result.should(eq(false))
+ end
+
it "should return false if not valid" do
- result = @scope.function_is_valid_mac_address("not valid")
+ result = @scope.function_is_valid_mac_address(["not valid"])
result.should(eq(false))
end