"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/functional/projects_controller_test.rb" between
redmine-4.1.0.tar.gz and redmine-4.1.1.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

projects_controller_test.rb  (redmine-4.1.0):projects_controller_test.rb  (redmine-4.1.1)
skipping to change at line 101 skipping to change at line 101
assert_select 'div#projects-index ul' do assert_select 'div#projects-index ul' do
assert_select 'a.project', 3 assert_select 'a.project', 3
assert_select 'a', :text => 'eCookbook Subproject 1' assert_select 'a', :text => 'eCookbook Subproject 1'
assert_select 'a', :text => 'eCookbook Subproject 2' assert_select 'a', :text => 'eCookbook Subproject 2'
assert_select 'a', :text => 'Private child of eCookbook' assert_select 'a', :text => 'Private child of eCookbook'
end end
end end
def test_index_as_list_should_format_column_value def test_index_as_list_should_format_column_value
get :index, :params => { get :index, :params => {
:c => ['name', 'status', 'short_description', 'homepage', 'parent_id', 'id entifier', 'is_public', 'created_on', 'project.cf_3'], :c => ['name', 'status', 'short_description', 'homepage', 'parent_id', 'id entifier', 'is_public', 'created_on', 'cf_3'],
:display_type => 'list' :display_type => 'list'
} }
assert_response :success assert_response :success
project = Project.find(1) project = Project.find(1)
assert_select 'table.projects' do assert_select 'table.projects' do
assert_select 'tr[id=?]', 'project-1' do assert_select 'tr[id=?]', 'project-1' do
assert_select 'td.name a[href=?]', '/projects/ecookbook', :text => 'eCoo kbook' assert_select 'td.name a[href=?]', '/projects/ecookbook', :text => 'eCoo kbook'
assert_select 'td.status', :text => 'active' assert_select 'td.status', :text => 'active'
assert_select 'td.short_description', :text => 'Recipes management appli cation' assert_select 'td.short_description', :text => 'Recipes management appli cation'
assert_select 'td.homepage a.external', :text => 'http://ecookbook.somen et.foo/' assert_select 'td.homepage a.external', :text => 'http://ecookbook.somen et.foo/'
assert_select 'td.identifier', :text => 'ecookbook' assert_select 'td.identifier', :text => 'ecookbook'
assert_select 'td.is_public', :text => 'Yes' assert_select 'td.is_public', :text => 'Yes'
assert_select 'td.created_on', :text => format_time(project.created_on) assert_select 'td.created_on', :text => format_time(project.created_on)
assert_select 'td.project_cf_3.list', :text => 'Stable' assert_select 'td.cf_3.list', :text => 'Stable'
end end
assert_select 'tr[id=?]', 'project-4' do assert_select 'tr[id=?]', 'project-4' do
assert_select 'td.parent_id a[href=?]', '/projects/ecookbook', :text => 'eCookbook' assert_select 'td.parent_id a[href=?]', '/projects/ecookbook', :text => 'eCookbook'
end end
end end
end end
def test_index_as_list_should_show_my_favourite_projects def test_index_as_list_should_show_my_favourite_projects
@request.session[:user_id] = 1 @request.session[:user_id] = 1
get :index, :params => { get :index, :params => {
skipping to change at line 212 skipping to change at line 212
end end
def test_index_csv def test_index_csv
with_settings :date_format => '%m/%d/%Y' do with_settings :date_format => '%m/%d/%Y' do
get :index, :params => {:format => 'csv'} get :index, :params => {:format => 'csv'}
assert_response :success assert_response :success
assert_equal 'text/csv', response.media_type assert_equal 'text/csv', response.media_type
end end
end end
def test_index_sort_by_custom_field
@request.session[:user_id] = 1
cf = ProjectCustomField.find(3)
CustomValue.create!(:custom_field => cf, :customized => Project.find(2), :va
lue => 'Beta')
get(
:index,
:params => {
:display_type => 'list',
:c => ['name', 'identifier', 'cf_3'],
:set_filter => 1,
:sort => "cf_#{cf.id}:asc"
}
)
assert_response :success
assert_equal(
['Beta', 'Stable'],
columns_values_in_list('cf_3').reject {|p| p.empty?}
)
end
def test_index_with_int_custom_field_total
@request.session[:user_id] = 1
field = ProjectCustomField.generate!(:field_format => 'int')
CustomValue.create!(:customized => Project.find(1), :custom_field => field,
:value => '2')
CustomValue.create!(:customized => Project.find(2), :custom_field => field,
:value => '7')
get(
:index,
:params => {
:display_type => 'list',
:t => ["cf_#{field.id}"]
}
)
assert_response :success
assert_select '.query-totals'
assert_select ".total-for-cf-#{field.id} span.value", :text => '9'
end
def test_autocomplete_js def test_autocomplete_js
get :autocomplete, :params => { get :autocomplete, :params => {
:format => 'js', :format => 'js',
:q => 'coo' :q => 'coo'
}, },
:xhr => true :xhr => true
assert_response :success assert_response :success
assert_equal 'text/javascript', response.content_type assert_equal 'text/javascript', response.content_type
end end
 End of changes. 3 change blocks. 
2 lines changed or deleted 46 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)