Skip to content

Commit

Permalink
better value tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 23, 2014
1 parent d602e07 commit 47e8e5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.17 2014-07-23
5.17 2014-07-24
- Welcome to the Mojolicious core team Jan Henning Thorsen.
- Added val method to Mojo::DOM. (batman, sri)

Expand Down
4 changes: 2 additions & 2 deletions t/mojo/dom.t
Expand Up @@ -2306,7 +2306,7 @@ is $dom->find('div > ul ul')->[1], undef, 'no result';
# Form values
$dom = Mojo::DOM->new(<<EOF);
<form action="/foo">
<p>Test</p>
<progress value="70" max="100">70 %</progress>
<input type="text" name="a" value="A" />
<input type="checkbox" checked name="b" value="B">
<input type="radio" checked name="c" value="C">
Expand All @@ -2325,7 +2325,7 @@ $dom = Mojo::DOM->new(<<EOF);
<input type="submit" name="p" value="P" />
</form>
EOF
is $dom->at('p')->val, undef, 'no value';
is $dom->at('progress')->val, undef, 'no value';
is $dom->at('input')->val, 'A', 'right value';
is $dom->at('input:checked')->val, 'B', 'right value';
is $dom->at('input:checked[type=radio]')->val, 'C', 'right value';
Expand Down

0 comments on commit 47e8e5b

Please sign in to comment.