summaryrefslogtreecommitdiffstats
path: root/test/unit/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-20 19:38:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-20 19:38:40 +0000
commit2a43f1adbcbe155eb7c3c4a60c5c0c289dec2a0f (patch)
tree908919107cfd6d6095f648dba895e476a512161a /test/unit/lib
parenta7559e669f4f131ccec74b585973492665a21daa (diff)
downloadredmine-2a43f1adbcbe155eb7c3c4a60c5c0c289dec2a0f.tar.gz
redmine-2a43f1adbcbe155eb7c3c4a60c5c0c289dec2a0f.zip
Quote values in DOM selectors for Nokogiri compatibility.
git-svn-id: http://svn.redmine.org/redmine/trunk@13619 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r--test/unit/lib/redmine/field_format/bool_format_test.rb6
-rw-r--r--test/unit/lib/redmine/field_format/list_format_test.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/lib/redmine/field_format/bool_format_test.rb b/test/unit/lib/redmine/field_format/bool_format_test.rb
index e5373a519..90aa70a9c 100644
--- a/test/unit/lib/redmine/field_format/bool_format_test.rb
+++ b/test/unit/lib/redmine/field_format/bool_format_test.rb
@@ -33,8 +33,8 @@ class Redmine::BoolFieldFormatTest < ActionView::TestCase
tag = field.format.edit_tag(self, 'abc', 'xyz', value)
assert_select_in tag, 'input[name=xyz]', 2
assert_select_in tag, 'input[id=abc]', 1
- assert_select_in tag, 'input[type=hidden][value=0]'
- assert_select_in tag, 'input[type=checkbox][value=1]'
+ assert_select_in tag, 'input[type=hidden][value="0"]'
+ assert_select_in tag, 'input[type=checkbox][value="1"]'
end
def test_check_box_should_be_checked_when_value_is_set
@@ -42,7 +42,7 @@ class Redmine::BoolFieldFormatTest < ActionView::TestCase
value = CustomFieldValue.new(:custom_field => field, :customized => Issue.new, :value => '1')
tag = field.format.edit_tag(self, 'abc', 'xyz', value)
- assert_select_in tag, 'input[type=checkbox][value=1][checked=checked]'
+ assert_select_in tag, 'input[type=checkbox][value="1"][checked=checked]'
end
def test_radio_style_should_render_edit_tag_as_radio_buttons
diff --git a/test/unit/lib/redmine/field_format/list_format_test.rb b/test/unit/lib/redmine/field_format/list_format_test.rb
index adc8d8fe8..1881c5866 100644
--- a/test/unit/lib/redmine/field_format/list_format_test.rb
+++ b/test/unit/lib/redmine/field_format/list_format_test.rb
@@ -52,7 +52,7 @@ class Redmine::ListFieldFormatTest < ActionView::TestCase
tag = field.format.edit_tag(self, 'id', 'name', value)
assert_select_in tag, 'select' do
assert_select 'option', 3
- assert_select 'option[value=]'
+ assert_select 'option[value=""]'
assert_select 'option[value=Foo]', :text => 'Foo'
assert_select 'option[value=Bar]', :text => 'Bar'
end
@@ -91,7 +91,7 @@ class Redmine::ListFieldFormatTest < ActionView::TestCase
assert_select_in tag, 'span' do
assert_select 'input[type=radio]', 3
assert_select 'label', :text => '(none)' do
- assert_select 'input[value=]'
+ assert_select 'input[value=""]'
end
assert_select 'label', :text => 'Foo' do
assert_select 'input[value=Foo]'