Files
sure/test/lib/uuid_format_test.rb
ghost 0ab3b0b698 feat(exports): add rule operand references (#1726)
* feat(exports): add rule operand references

* fix(exports): preserve rule operand references

* refactor(exports): simplify rule operand branches

* refactor(validation): centralize UUID format checks

* fix(imports): preserve false rule operands
2026-05-12 21:29:29 +02:00

18 lines
453 B
Ruby

require "test_helper"
class UuidFormatTest < ActiveSupport::TestCase
test "valid matches canonical UUID values" do
uuid = SecureRandom.uuid
assert UuidFormat.valid?(uuid)
assert UuidFormat.valid?(uuid.upcase)
end
test "valid rejects non UUID values" do
refute UuidFormat.valid?(nil)
refute UuidFormat.valid?("")
refute UuidFormat.valid?("not-a-uuid")
refute UuidFormat.valid?("#{SecureRandom.uuid}-extra")
end
end