### ----------------------------------------------------
### -- Hyperscript
### -- Licenses: MIT
### -- Authors: Jack Miles
### -- File: t/05-boolean-attributes.rakutest
### ----------------------------------------------------
use v6.d;

use Test;
use Hyperscript;
constant &h = &hyperscript;

plan 2;

subtest 'True attribute', {
  constant $expected = '<input required="required" type="text" />';
  my $result = h('input', :required:type<text>);
  is $result, $expected, 'produces expected HTML';
}

subtest 'False attribute', {
  constant $expected = '<input type="text" />';
  my $result = h('input', :!required:type<text>);
  is $result, $expected, 'produces expected HTML';
}

done-testing;


