Mercurial > hg > soundsoftware-site
comparison .svn/pristine/17/17bbb18f9332f2fb1c968be77b1ba5e516d1b601.svn-base @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
1 # Redmine - project management software | |
2 # Copyright (C) 2006-2014 Jean-Philippe Lang | |
3 # | |
4 # This program is free software; you can redistribute it and/or | |
5 # modify it under the terms of the GNU General Public License | |
6 # as published by the Free Software Foundation; either version 2 | |
7 # of the License, or (at your option) any later version. | |
8 # | |
9 # This program is distributed in the hope that it will be useful, | |
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 # GNU General Public License for more details. | |
13 # | |
14 # You should have received a copy of the GNU General Public License | |
15 # along with this program; if not, write to the Free Software | |
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
17 | |
18 require File.expand_path('../../../test_helper', __FILE__) | |
19 | |
20 class Redmine::ApiTest::CustomFieldsTest < Redmine::ApiTest::Base | |
21 fixtures :users, :custom_fields | |
22 | |
23 def setup | |
24 Setting.rest_api_enabled = '1' | |
25 end | |
26 | |
27 test "GET /custom_fields.xml should return custom fields" do | |
28 get '/custom_fields.xml', {}, credentials('admin') | |
29 assert_response :success | |
30 assert_equal 'application/xml', response.content_type | |
31 | |
32 assert_select 'custom_fields' do | |
33 assert_select 'custom_field' do | |
34 assert_select 'name', :text => 'Database' | |
35 assert_select 'id', :text => '2' | |
36 assert_select 'customized_type', :text => 'issue' | |
37 assert_select 'possible_values[type=array]' do | |
38 assert_select 'possible_value>value', :text => 'PostgreSQL' | |
39 end | |
40 assert_select 'trackers[type=array]' | |
41 assert_select 'roles[type=array]' | |
42 end | |
43 end | |
44 end | |
45 end |