"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/functional/users_controller_test.rb" between
redmine-4.0.3.tar.gz and redmine-4.0.4.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.

users_controller_test.rb  (redmine-4.0.3):users_controller_test.rb  (redmine-4.0.4)
skipping to change at line 75 skipping to change at line 75
end end
def test_index_csv def test_index_csv
with_settings :default_language => 'en' do with_settings :default_language => 'en' do
get :index, :params => { :format => 'csv' } get :index, :params => { :format => 'csv' }
assert_response :success assert_response :success
assert_equal User.logged.status(1).count, response.body.chomp.split("\n"). size - 1 assert_equal User.logged.status(1).count, response.body.chomp.split("\n"). size - 1
assert_include 'active', response.body assert_include 'active', response.body
assert_not_include 'locked', response.body assert_not_include 'locked', response.body
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
end end
end end
def test_index_csv_with_status_filter def test_index_csv_with_status_filter
with_settings :default_language => 'en' do with_settings :default_language => 'en' do
get :index, :params => { :status => 3, :format => 'csv' } get :index, :params => { :status => 3, :format => 'csv' }
assert_response :success assert_response :success
assert_equal User.logged.status(3).count, response.body.chomp.split("\n"). size - 1 assert_equal User.logged.status(3).count, response.body.chomp.split("\n"). size - 1
assert_include 'locked', response.body assert_include 'locked', response.body
assert_not_include 'active', response.body assert_not_include 'active', response.body
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
end end
end end
def test_index_csv_with_name_filter def test_index_csv_with_name_filter
get :index, :params => {:name => 'John', :format => 'csv'} get :index, :params => {:name => 'John', :format => 'csv'}
assert_response :success assert_response :success
assert_equal User.logged.like('John').count, response.body.chomp.split("\n") .size - 1 assert_equal User.logged.like('John').count, response.body.chomp.split("\n") .size - 1
assert_include 'John', response.body assert_include 'John', response.body
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
end end
def test_index_csv_with_group_filter def test_index_csv_with_group_filter
get :index, :params => {:group_id => '10', :format => 'csv'} get :index, :params => {:group_id => '10', :format => 'csv'}
assert_response :success assert_response :success
assert_equal Group.find(10).users.count, response.body.chomp.split("\n").siz e - 1 assert_equal Group.find(10).users.count, response.body.chomp.split("\n").siz e - 1
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
end end
def test_show def test_show
@request.session[:user_id] = nil @request.session[:user_id] = nil
get :show, :params => {:id => 2} get :show, :params => {:id => 2}
assert_response :success assert_response :success
assert_select 'h2', :text => /John Smith/ assert_select 'h2', :text => /John Smith/
end end
def test_show_should_display_visible_custom_fields def test_show_should_display_visible_custom_fields
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

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