##// END OF EJS Templates
remove trailing white-spaces from test/unit/helpers/application_helper_test.rb....
Toshi MARUYAMA -
r6777:5367658323a9
parent child
Show More
@@ -675,26 +675,26 RAW
675 assert_equal %(<a href="/projects/ecookbook/settings" class="project">eCookbook</a>),
675 assert_equal %(<a href="/projects/ecookbook/settings" class="project">eCookbook</a>),
676 link_to_project(project, {:action => 'settings'}, :class => "project")
676 link_to_project(project, {:action => 'settings'}, :class => "project")
677 end
677 end
678
678
679 def test_principals_options_for_select_with_users
679 def test_principals_options_for_select_with_users
680 users = [User.find(2), User.find(4)]
680 users = [User.find(2), User.find(4)]
681 assert_equal %(<option value="2">John Smith</option><option value="4">Robert Hill</option>),
681 assert_equal %(<option value="2">John Smith</option><option value="4">Robert Hill</option>),
682 principals_options_for_select(users)
682 principals_options_for_select(users)
683 end
683 end
684
684
685 def test_principals_options_for_select_with_selected
685 def test_principals_options_for_select_with_selected
686 users = [User.find(2), User.find(4)]
686 users = [User.find(2), User.find(4)]
687 assert_equal %(<option value="2">John Smith</option><option value="4" selected="selected">Robert Hill</option>),
687 assert_equal %(<option value="2">John Smith</option><option value="4" selected="selected">Robert Hill</option>),
688 principals_options_for_select(users, User.find(4))
688 principals_options_for_select(users, User.find(4))
689 end
689 end
690
690
691 def test_principals_options_for_select_with_users_and_groups
691 def test_principals_options_for_select_with_users_and_groups
692 users = [User.find(2), Group.find(11), User.find(4), Group.find(10)]
692 users = [User.find(2), Group.find(11), User.find(4), Group.find(10)]
693 assert_equal %(<option value="2">John Smith</option><option value="4">Robert Hill</option>) +
693 assert_equal %(<option value="2">John Smith</option><option value="4">Robert Hill</option>) +
694 %(<optgroup label="Groups"><option value="10">A Team</option><option value="11">B Team</option></optgroup>),
694 %(<optgroup label="Groups"><option value="10">A Team</option><option value="11">B Team</option></optgroup>),
695 principals_options_for_select(users)
695 principals_options_for_select(users)
696 end
696 end
697
697
698 def test_principals_options_for_select_with_empty_collection
698 def test_principals_options_for_select_with_empty_collection
699 assert_equal '', principals_options_for_select([])
699 assert_equal '', principals_options_for_select([])
700 end
700 end
General Comments 0
You need to be logged in to leave comments. Login now