##// END OF EJS Templates
add missing fixture to MembersHelperTest...
Toshi MARUYAMA -
r13367:e52ecb494b00
parent child
Show More
@@ -1,42 +1,43
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2014 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 require File.expand_path('../../../test_helper', __FILE__)
19 19
20 20 class MembersHelperTest < ActionView::TestCase
21 21 include Redmine::I18n
22 22 include ERB::Util
23 23 include MembersHelper
24 24
25 fixtures :projects, :users, :members, :member_roles
25 fixtures :projects, :users, :members, :member_roles,
26 :trackers, :issue_statuses
26 27
27 28 def test_render_principals_for_new_members
28 29 project = Project.generate!
29 30
30 31 result = render_principals_for_new_members(project)
31 32 assert_select_in result, 'input[name=?][value=2]', 'membership[user_ids][]'
32 33 end
33 34
34 35 def test_render_principals_for_new_members_with_limited_results_should_paginate
35 36 project = Project.generate!
36 37
37 38 result = render_principals_for_new_members(project, 3)
38 39 assert_select_in result, 'p.pagination'
39 40 assert_select_in result, 'span.current.page', :text => '1'
40 41 assert_select_in result, 'a[href=?]', "/projects/#{project.identifier}/memberships/autocomplete.js?page=2", :text => '2'
41 42 end
42 43 end
General Comments 0
You need to be logged in to leave comments. Login now