From be769a9aeb286230083a1ab5d8f28ea019db161c Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Sun, 2 Jun 2019 18:26:16 +0000 Subject: [PATCH 4/5] Remove trailing whitespaces from test --- test/functional/account_controller_openid_test.rb | 2 +- test/functional/account_controller_test.rb | 12 ++--- test/functional/activities_controller_test.rb | 2 +- test/functional/comments_controller_test.rb | 6 +-- test/functional/context_menus_controller_test.rb | 2 +- .../custom_field_enumerations_controller_test.rb | 10 ++--- test/functional/custom_fields_controller_test.rb | 4 +- test/functional/files_controller_test.rb | 4 +- test/functional/groups_controller_test.rb | 2 +- .../functional/issue_categories_controller_test.rb | 6 +-- test/functional/issue_statuses_controller_test.rb | 4 +- .../issues_controller_transaction_test.rb | 52 +++++++++++----------- .../issues_custom_fields_visibility_test.rb | 16 +++---- test/functional/news_controller_test.rb | 20 ++++----- .../principal_memberships_controller_test.rb | 6 +-- test/functional/repositories_controller_test.rb | 2 +- .../functional/repositories_git_controller_test.rb | 4 +- test/functional/roles_controller_test.rb | 2 +- test/helpers/journals_helper_test.rb | 2 +- test/integration/account_test.rb | 4 +- test/integration/admin_test.rb | 2 +- test/integration/api_test/issue_categories_test.rb | 2 +- test/integration/api_test/search_test.rb | 2 +- test/integration/issues_test.rb | 6 +-- test/integration/sudo_mode_test.rb | 2 +- test/system/issues_test.rb | 6 +-- test/system/sudo_mode_test.rb | 2 +- test/unit/lib/redmine/ciphering_test.rb | 2 +- .../field_format/version_field_format_test.rb | 2 +- test/unit/lib/redmine/i18n_test.rb | 2 +- .../lib/redmine/menu_manager/menu_helper_test.rb | 2 +- .../lib/redmine/scm/adapters/git_adapter_test.rb | 8 ++-- test/unit/lib/redmine/unified_diff_test.rb | 14 +++--- .../lib/redmine/wiki_formatting/macros_test.rb | 6 +-- .../wiki_formatting/textile_formatter_test.rb | 32 ++++++------- 35 files changed, 126 insertions(+), 126 deletions(-) diff --git a/test/functional/account_controller_openid_test.rb b/test/functional/account_controller_openid_test.rb index 9d81daa..f63b803 100644 --- a/test/functional/account_controller_openid_test.rb +++ b/test/functional/account_controller_openid_test.rb @@ -170,7 +170,7 @@ class AccountControllerOpenidTest < Redmine::ControllerTest :lastname => 'User', :mail => 'user@somedomain.com', :identity_url => 'http://openid.example.com/good_blank_user' - + } } assert_response 302 diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 1f5a5f1..0ad5611 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -312,7 +312,7 @@ class AccountControllerTest < Redmine::ControllerTest :firstname => 'John', :lastname => 'Doe', :mail => 'register@example.com' - + } } assert_redirected_to '/my/account' @@ -326,7 +326,7 @@ class AccountControllerTest < Redmine::ControllerTest assert user.active? end end - + def test_post_register_with_registration_off_should_redirect with_settings :self_registration => '0' do assert_no_difference 'User.count' do @@ -338,7 +338,7 @@ class AccountControllerTest < Redmine::ControllerTest :firstname => 'John', :lastname => 'Doe', :mail => 'register@example.com' - + } } assert_redirected_to '/' @@ -357,11 +357,11 @@ class AccountControllerTest < Redmine::ControllerTest :firstname => 'John', :lastname => 'Doe', :mail => 'register@example.com' - - }, + + }, :pref => { :hide_mail => '1' - + } } end diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index fa9a834..c94a9c9 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -143,7 +143,7 @@ class ActivitiesControllerTest < Redmine::ControllerTest :show_issues => '1' } assert_response :success - + assert_select 'title', :text => /Issues/ end end diff --git a/test/functional/comments_controller_test.rb b/test/functional/comments_controller_test.rb index 361bcaf..5050657 100644 --- a/test/functional/comments_controller_test.rb +++ b/test/functional/comments_controller_test.rb @@ -31,7 +31,7 @@ class CommentsControllerTest < Redmine::ControllerTest post :create, :params => { :id => 1, :comment => { - :comments => 'This is a test comment' + :comments => 'This is a test comment' } } assert_redirected_to '/news/1' @@ -48,7 +48,7 @@ class CommentsControllerTest < Redmine::ControllerTest post :create, :params => { :id => 1, :comment => { - :comments => '' + :comments => '' } } assert_response :redirect @@ -63,7 +63,7 @@ class CommentsControllerTest < Redmine::ControllerTest post :create, :params => { :id => 1, :comment => { - :comments => 'This is a test comment' + :comments => 'This is a test comment' } } assert_response 403 diff --git a/test/functional/context_menus_controller_test.rb b/test/functional/context_menus_controller_test.rb index 3bef4a6..746f2f9 100644 --- a/test/functional/context_menus_controller_test.rb +++ b/test/functional/context_menus_controller_test.rb @@ -319,7 +319,7 @@ class ContextMenusControllerTest < Redmine::ControllerTest def test_time_entries_context_menu_without_edit_permission @request.session[:user_id] = 2 Role.find_by_name('Manager').remove_permission! :edit_time_entries - + get :time_entries, :params => { :ids => [1, 2] } diff --git a/test/functional/custom_field_enumerations_controller_test.rb b/test/functional/custom_field_enumerations_controller_test.rb index 54d43ac..9d468dd 100644 --- a/test/functional/custom_field_enumerations_controller_test.rb +++ b/test/functional/custom_field_enumerations_controller_test.rb @@ -47,7 +47,7 @@ class CustomFieldEnumerationsControllerTest < Redmine::ControllerTest post :create, :params => { :custom_field_id => @field.id, :custom_field_enumeration => { - :name => 'Baz' + :name => 'Baz' } } assert_redirected_to "/custom_fields/#{@field.id}/enumerations" @@ -65,7 +65,7 @@ class CustomFieldEnumerationsControllerTest < Redmine::ControllerTest post :create, :params => { :custom_field_id => @field.id, :custom_field_enumeration => { - :name => 'Baz' + :name => 'Baz' } }, :xhr => true @@ -81,13 +81,13 @@ class CustomFieldEnumerationsControllerTest < Redmine::ControllerTest :position => "1", :name => "Baz", :active => "1" - }, + }, @foo.id.to_s => { :position => "2", :name => "Foo", :active => "0" - } - + } + } } assert_response 302 diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb index ff6b330..9745e23 100644 --- a/test/functional/custom_fields_controller_test.rb +++ b/test/functional/custom_fields_controller_test.rb @@ -193,7 +193,7 @@ class CustomFieldsControllerTest < Redmine::ControllerTest :type => 'IssueCustomField', :custom_field => { :field_format => 'list' - }, + }, :format => 'js' }, :xhr => true @@ -247,7 +247,7 @@ class CustomFieldsControllerTest < Redmine::ControllerTest :field_format => "string", :is_for_all => "0", :project_ids => ["1", "3", ""] - + } } assert_response 302 diff --git a/test/functional/files_controller_test.rb b/test/functional/files_controller_test.rb index 3cc46e3..59ea293 100644 --- a/test/functional/files_controller_test.rb +++ b/test/functional/files_controller_test.rb @@ -84,7 +84,7 @@ class FilesControllerTest < Redmine::ControllerTest :version_id => '', :attachments => { '1' => { - 'file' => uploaded_test_file('testfile.txt', 'text/plain')} + 'file' => uploaded_test_file('testfile.txt', 'text/plain')} } } assert_response :redirect @@ -111,7 +111,7 @@ class FilesControllerTest < Redmine::ControllerTest :version_id => '2', :attachments => { '1' => { - 'file' => uploaded_test_file('testfile.txt', 'text/plain')} + 'file' => uploaded_test_file('testfile.txt', 'text/plain')} } } assert_response :redirect diff --git a/test/functional/groups_controller_test.rb b/test/functional/groups_controller_test.rb index 7c4c2d5..33502ed 100644 --- a/test/functional/groups_controller_test.rb +++ b/test/functional/groups_controller_test.rb @@ -102,7 +102,7 @@ class GroupsControllerTest < Redmine::ControllerTest post :create, :params => { :group => { :name => 'New group' - }, + }, :continue => 'Create and continue' } end diff --git a/test/functional/issue_categories_controller_test.rb b/test/functional/issue_categories_controller_test.rb index 50a0809..972d5a1 100644 --- a/test/functional/issue_categories_controller_test.rb +++ b/test/functional/issue_categories_controller_test.rb @@ -125,7 +125,7 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest put :update, :params => { :id => 2, :issue_category => { - :name => 'Testing' + :name => 'Testing' } } end @@ -137,7 +137,7 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest put :update, :params => { :id => 2, :issue_category => { - :name => '' + :name => '' } } assert_response :success @@ -148,7 +148,7 @@ class IssueCategoriesControllerTest < Redmine::ControllerTest put :update, :params => { :id => 97, :issue_category => { - :name => 'Testing' + :name => 'Testing' } } assert_response 404 diff --git a/test/functional/issue_statuses_controller_test.rb b/test/functional/issue_statuses_controller_test.rb index 756d528..e46e807 100644 --- a/test/functional/issue_statuses_controller_test.rb +++ b/test/functional/issue_statuses_controller_test.rb @@ -32,13 +32,13 @@ class IssueStatusesControllerTest < Redmine::ControllerTest assert_response :success assert_select 'table.issue_statuses' end - + def test_index_by_anonymous_should_redirect_to_login_form @request.session[:user_id] = nil get :index assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fissue_statuses' end - + def test_index_by_user_should_respond_with_406 @request.session[:user_id] = 2 get :index diff --git a/test/functional/issues_controller_transaction_test.rb b/test/functional/issues_controller_transaction_test.rb index 8f74982..fc82e96 100644 --- a/test/functional/issues_controller_transaction_test.rb +++ b/test/functional/issues_controller_transaction_test.rb @@ -64,12 +64,12 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :fixed_version_id => 4, :notes => 'My notes', :lock_version => (issue.lock_version - 1) - - }, + + }, :time_entry => { :hours => '2.5', :comments => '', - :activity_id => TimeEntryActivity.first.id + :activity_id => TimeEntryActivity.first.id } } end @@ -100,16 +100,16 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :fixed_version_id => 4, :notes => 'My notes', :lock_version => (issue.lock_version - 1) - - }, + + }, :attachments => { '1' => { - 'file' => uploaded_test_file('testfile.txt', 'text/plain')} - }, + 'file' => uploaded_test_file('testfile.txt', 'text/plain')} + }, :time_entry => { :hours => '2.5', :comments => '', - :activity_id => TimeEntryActivity.first.id + :activity_id => TimeEntryActivity.first.id } } end @@ -133,7 +133,7 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :fixed_version_id => 4, :notes => '', :lock_version => (issue.lock_version - 1) - + } } assert_response :success @@ -153,8 +153,8 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :fixed_version_id => 4, :notes => '', :lock_version => 2 - - }, + + }, :last_journal_id => 1 } assert_response :success @@ -172,8 +172,8 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :fixed_version_id => 4, :notes => '', :lock_version => 2 - - }, + + }, :last_journal_id => '' } assert_response :success @@ -192,7 +192,7 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :issue => { :fixed_version_id => 4, :lock_version => 2 - }, + }, :last_journal_id => '' } assert_response :success @@ -204,7 +204,7 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :issue => { :fixed_version_id => 4, :lock_version => 2 - }, + }, :last_journal_id => '' } assert_response :success @@ -221,8 +221,8 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :fixed_version_id => 4, :notes => 'overwrite_conflict_resolution', :lock_version => 2 - - }, + + }, :conflict_resolution => 'overwrite' } end @@ -245,8 +245,8 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :fixed_version_id => 4, :notes => 'add_notes_conflict_resolution', :lock_version => 2 - - }, + + }, :conflict_resolution => 'add_notes' } end @@ -271,8 +271,8 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :notes => 'add_privates_notes_conflict_resolution', :private_notes => '1', :lock_version => 2 - - }, + + }, :conflict_resolution => 'add_notes' } end @@ -293,8 +293,8 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest :fixed_version_id => 4, :notes => 'add_notes_conflict_resolution', :lock_version => 2 - - }, + + }, :conflict_resolution => 'cancel' } end @@ -311,12 +311,12 @@ class IssuesControllerTransactionTest < Redmine::ControllerTest put :update, :params => { :id => 1, :issue => { - :subject => '' - }, + :subject => '' + }, :time_entry => { :hours => '2.5', :comments => 'should not be added', - :activity_id => TimeEntryActivity.first.id + :activity_id => TimeEntryActivity.first.id } } assert_response :success diff --git a/test/functional/issues_custom_fields_visibility_test.rb b/test/functional/issues_custom_fields_visibility_test.rb index 1289598..145eb2c 100644 --- a/test/functional/issues_custom_fields_visibility_test.rb +++ b/test/functional/issues_custom_fields_visibility_test.rb @@ -174,8 +174,8 @@ class IssuesCustomFieldsVisibilityTest < Redmine::ControllerTest :id => @issue.id, :issue => { :custom_field_values => { - @field1.id.to_s => "User#{user.id}Value0", - @field2.id.to_s => "User#{user.id}Value1", + @field1.id.to_s => "User#{user.id}Value0", + @field2.id.to_s => "User#{user.id}Value1", @field3.id.to_s => "User#{user.id}Value2", } } @@ -281,9 +281,9 @@ class IssuesCustomFieldsVisibilityTest < Redmine::ControllerTest :priority_id => 5, :custom_field_values => { @field1.id.to_s => 'Value0', @field2.id.to_s => 'Value1', @field3.id.to_s => 'Value2' - }, + }, :watcher_user_ids => users_to_test.keys.map(&:id) - + } } assert_response 302 @@ -321,8 +321,8 @@ class IssuesCustomFieldsVisibilityTest < Redmine::ControllerTest :issue => { :custom_field_values => { @field1.id.to_s => 'NewValue0', @field2.id.to_s => 'NewValue1', @field3.id.to_s => 'NewValue2' - } - + } + } } assert_response 302 @@ -358,8 +358,8 @@ class IssuesCustomFieldsVisibilityTest < Redmine::ControllerTest :issue => { :custom_field_values => { @field2.id.to_s => 'NewValue1', @field3.id.to_s => 'NewValue2' - } - + } + } } assert_response 302 diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index 46fc5c8..ebee983 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -118,7 +118,7 @@ class NewsControllerTest < Redmine::ControllerTest :news => { :title => 'NewsControllerTest', :description => 'This is the description', - :summary => '' + :summary => '' } } end @@ -141,11 +141,11 @@ class NewsControllerTest < Redmine::ControllerTest :project_id => 1, :news => { :title => 'Test', - :description => 'This is the description' - }, + :description => 'This is the description' + }, :attachments => { '1' => { - 'file' => uploaded_test_file('testfile.txt', 'text/plain')} + 'file' => uploaded_test_file('testfile.txt', 'text/plain')} } } end @@ -162,7 +162,7 @@ class NewsControllerTest < Redmine::ControllerTest :news => { :title => '', :description => 'This is the description', - :summary => '' + :summary => '' } } assert_response :success @@ -183,7 +183,7 @@ class NewsControllerTest < Redmine::ControllerTest put :update, :params => { :id => 1, :news => { - :description => 'Description changed by test_post_edit' + :description => 'Description changed by test_post_edit' } } assert_redirected_to '/news/1' @@ -199,11 +199,11 @@ class NewsControllerTest < Redmine::ControllerTest put :update, :params => { :id => 1, :news => { - :description => 'This is the description' - }, + :description => 'This is the description' + }, :attachments => { '1' => { - 'file' => uploaded_test_file('testfile.txt', 'text/plain')} + 'file' => uploaded_test_file('testfile.txt', 'text/plain')} } } end @@ -217,7 +217,7 @@ class NewsControllerTest < Redmine::ControllerTest put :update, :params => { :id => 1, :news => { - :description => '' + :description => '' } } assert_response :success diff --git a/test/functional/principal_memberships_controller_test.rb b/test/functional/principal_memberships_controller_test.rb index 8726113..974abc1 100644 --- a/test/functional/principal_memberships_controller_test.rb +++ b/test/functional/principal_memberships_controller_test.rb @@ -116,7 +116,7 @@ class PrincipalMembershipsControllerTest < Redmine::ControllerTest :membership => { :project_ids => [3], :role_ids => [2] - }, + }, :format => 'js' }, :xhr => true @@ -136,7 +136,7 @@ class PrincipalMembershipsControllerTest < Redmine::ControllerTest :user_id => 7, :membership => { :project_ids => [3] - }, + }, :format => 'js' }, :xhr => true @@ -186,7 +186,7 @@ class PrincipalMembershipsControllerTest < Redmine::ControllerTest :id => 1, :membership => { :role_ids => [2] - }, + }, :format => 'js' }, :xhr => true diff --git a/test/functional/repositories_controller_test.rb b/test/functional/repositories_controller_test.rb index aff5c74..3bf0e23 100644 --- a/test/functional/repositories_controller_test.rb +++ b/test/functional/repositories_controller_test.rb @@ -56,7 +56,7 @@ class RepositoriesControllerTest < Redmine::RepositoryControllerTest assert_select 'option[value=Git]:not([selected])' end end - + def test_get_new_with_type @request.session[:user_id] = 1 get :new, :params => { diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb index 3fce18d..a693287 100644 --- a/test/functional/repositories_git_controller_test.rb +++ b/test/functional/repositories_git_controller_test.rb @@ -63,7 +63,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest :is_default => '0', :identifier => 'test-create', :report_last_commit => '1', - + } } end @@ -77,7 +77,7 @@ class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest :id => repository.id, :repository => { :report_last_commit => '0' - + } } assert_response 302 diff --git a/test/functional/roles_controller_test.rb b/test/functional/roles_controller_test.rb index f18b849..e78370a 100644 --- a/test/functional/roles_controller_test.rb +++ b/test/functional/roles_controller_test.rb @@ -222,7 +222,7 @@ class RolesControllerTest < Redmine::ControllerTest def test_destroy_role_in_use delete :destroy, :params => {:id => 1} assert_redirected_to '/roles' - assert_equal 'This role is in use and cannot be deleted.', flash[:error] + assert_equal 'This role is in use and cannot be deleted.', flash[:error] assert_not_nil Role.find_by_id(1) end diff --git a/test/helpers/journals_helper_test.rb b/test/helpers/journals_helper_test.rb index d9f125c..2e54a2a 100644 --- a/test/helpers/journals_helper_test.rb +++ b/test/helpers/journals_helper_test.rb @@ -33,7 +33,7 @@ class JournalsHelperTest < Redmine::HelperTest def test_journal_thumbnail_attachments_should_return_thumbnailable_attachments issue = Issue.generate! - + journal = new_record(Journal) do issue.init_journal(User.find(1)) issue.attachments << Attachment.new(:file => mock_file_with_options(:original_filename => 'image.png'), :author => User.find(1)) diff --git a/test/integration/account_test.rb b/test/integration/account_test.rb index 572a2b9..37f812e 100644 --- a/test/integration/account_test.rb +++ b/test/integration/account_test.rb @@ -60,14 +60,14 @@ class AccountTest < Redmine::IntegrationTest assert_equal 'autologin', token.action assert_equal user.id, session[:user_id] assert_equal token.value, cookies['autologin'] - + # Session is cleared reset! User.current = nil # Clears user's last login timestamp user.update_attribute :last_login_on, nil assert_nil user.reload.last_login_on - + # User comes back with user's autologin cookie cookies[:autologin] = token.value get '/my/page' diff --git a/test/integration/admin_test.rb b/test/integration/admin_test.rb index ffe3198..09cc909 100644 --- a/test/integration/admin_test.rb +++ b/test/integration/admin_test.rb @@ -53,7 +53,7 @@ class AdminTest < Redmine::IntegrationTest put "/users/#{user.id}", :params => { :id => user.id, :user => { - :status => User::STATUS_LOCKED + :status => User::STATUS_LOCKED } } assert_redirected_to "/users/#{ user.id }/edit" diff --git a/test/integration/api_test/issue_categories_test.rb b/test/integration/api_test/issue_categories_test.rb index 2f190c9..da9cd6d 100644 --- a/test/integration/api_test/issue_categories_test.rb +++ b/test/integration/api_test/issue_categories_test.rb @@ -97,7 +97,7 @@ class Redmine::ApiTest::IssueCategoriesTest < Redmine::ApiTest::Base assert_equal '', @response.body assert_nil IssueCategory.find_by_id(1) end - + test "DELETE /issue_categories/:id.xml should reassign issues with :reassign_to_id param" do issue_count = Issue.where(:category_id => 1).count assert issue_count > 0 diff --git a/test/integration/api_test/search_test.rb b/test/integration/api_test/search_test.rb index 95baff5..8910901 100644 --- a/test/integration/api_test/search_test.rb +++ b/test/integration/api_test/search_test.rb @@ -91,7 +91,7 @@ class Redmine::ApiTest::SearchTest < Redmine::ApiTest::Base assert_equal 4, json['limit'] assert_equal issue[8..10], json['results'].map {|r| r['id']} end - + test "GET /search.xml should not quick jump to the issue with given id" do get '/search.xml', :params => {:q => '3'} assert_response :success diff --git a/test/integration/issues_test.rb b/test/integration/issues_test.rb index ecd7af6..2636df9 100644 --- a/test/integration/issues_test.rb +++ b/test/integration/issues_test.rb @@ -130,7 +130,7 @@ class IssuesTest < Redmine::IntegrationTest get '/projects/ecookbook/issues?set_filter=1&group_by=fixed_version&sort=priority:desc,fixed_version,id' assert_response :success assert_select 'td.id', :text => '5' - + get '/issues/5' assert_response :success assert_select '.next-prev-links .position', :text => '5 of 6' @@ -142,7 +142,7 @@ class IssuesTest < Redmine::IntegrationTest get '/projects/ecookbook/issues?set_filter=1&tracker_id=1' assert_response :success assert_select 'td.id', :text => '5' - + get '/issues/5' assert_response :success assert_select '.next-prev-links .position', :text => '3 of 5' @@ -160,7 +160,7 @@ class IssuesTest < Redmine::IntegrationTest get "/projects/ecookbook/issues?set_filter=1&query_id=#{query.id}" assert_response :success assert_select 'td.id', :text => '5' - + get '/issues/5' assert_response :success assert_select '.next-prev-links .position', :text => '6 of 8' diff --git a/test/integration/sudo_mode_test.rb b/test/integration/sudo_mode_test.rb index b461c2f..b7d9cb5 100644 --- a/test/integration/sudo_mode_test.rb +++ b/test/integration/sudo_mode_test.rb @@ -186,7 +186,7 @@ class SudoModeTest < Redmine::IntegrationTest } }, :headers => credentials('admin') - + assert_response :created end end diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb index 5842061..8118277 100644 --- a/test/system/issues_test.rb +++ b/test/system/issues_test.rb @@ -50,7 +50,7 @@ class IssuesTest < ApplicationSystemTestCase # check issue attributes assert_equal 'jsmith', issue.author.login assert_equal 1, issue.project.id - assert_equal IssueStatus.find_by_name('New'), issue.status + assert_equal IssueStatus.find_by_name('New'), issue.status assert_equal Tracker.find_by_name('Bug'), issue.tracker assert_equal IssuePriority.find_by_name('Low'), issue.priority assert_equal 'Value for field 2', issue.custom_field_value(CustomField.find_by_name('Searchable field')) @@ -291,9 +291,9 @@ class IssuesTest < ApplicationSystemTestCase # Check that the page shows the Estimated hours total assert page.has_css?('p.query-totals') assert page.has_css?('span.total-for-estimated-hours') - # Open the Options of the form (necessary for having the totalable columns options clickable) + # Open the Options of the form (necessary for having the totalable columns options clickable) page.all('legend')[1].click - # Deselect the default totalable column (none should be left) + # Deselect the default totalable column (none should be left) page.first('input[name="t[]"][value="estimated_hours"]').click within('#query_form') do click_link 'Apply' diff --git a/test/system/sudo_mode_test.rb b/test/system/sudo_mode_test.rb index 168c7cd..644e7d7 100644 --- a/test/system/sudo_mode_test.rb +++ b/test/system/sudo_mode_test.rb @@ -35,7 +35,7 @@ class SudoModeTest < ApplicationSystemTestCase def test_add_user log_user('admin', 'admin') expire_sudo_mode! - + visit '/users/new' assert_difference 'User.count' do diff --git a/test/unit/lib/redmine/ciphering_test.rb b/test/unit/lib/redmine/ciphering_test.rb index 79ce7ba..95b6fb2 100644 --- a/test/unit/lib/redmine/ciphering_test.rb +++ b/test/unit/lib/redmine/ciphering_test.rb @@ -64,7 +64,7 @@ class Redmine::CipheringTest < ActiveSupport::TestCase assert_equal 'clear', r.password end end - + def test_ciphered_password_with_no_cipher_key_configured_should_be_returned_ciphered Redmine::Configuration.with 'database_cipher_key' => 'secret' do r = Repository::Subversion.create!(:password => 'clear', :url => 'file:///tmp', :identifier => 'svn') diff --git a/test/unit/lib/redmine/field_format/version_field_format_test.rb b/test/unit/lib/redmine/field_format/version_field_format_test.rb index 2ec405b..34eae0a 100644 --- a/test/unit/lib/redmine/field_format/version_field_format_test.rb +++ b/test/unit/lib/redmine/field_format/version_field_format_test.rb @@ -73,7 +73,7 @@ class Redmine::VersionFieldFormatTest < ActionView::TestCase assert_equal expected, field.possible_values_options(project).map(&:first) end - + def test_possible_values_options_should_return_system_shared_versions_without_project field = IssueCustomField.new(:field_format => 'version') version = Version.generate!(:project => Project.find(1), :status => 'open', :sharing => 'system') diff --git a/test/unit/lib/redmine/i18n_test.rb b/test/unit/lib/redmine/i18n_test.rb index 170073f..d795b44 100644 --- a/test/unit/lib/redmine/i18n_test.rb +++ b/test/unit/lib/redmine/i18n_test.rb @@ -70,7 +70,7 @@ class Redmine::I18nTest < ActiveSupport::TestCase end assert l('date.day_names').is_a?(Array) assert_equal 7, l('date.day_names').size - + assert l('date.month_names').is_a?(Array) assert_equal 13, l('date.month_names').size end diff --git a/test/unit/lib/redmine/menu_manager/menu_helper_test.rb b/test/unit/lib/redmine/menu_manager/menu_helper_test.rb index abe7076..1c4799d 100644 --- a/test/unit/lib/redmine/menu_manager/menu_helper_test.rb +++ b/test/unit/lib/redmine/menu_manager/menu_helper_test.rb @@ -211,7 +211,7 @@ class Redmine::MenuManager::MenuHelperTest < Redmine::HelperTest end end end - + def test_render_empty_virtual_menu_node_with_children # only empty item with no click target diff --git a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb index ad301b6..aaa421d 100644 --- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb @@ -77,22 +77,22 @@ class GitAdapterTest < ActiveSupport::TestCase end assert_equal 8, brs.length br_issue_8857 = brs[0] - assert_equal 'issue-8857', br_issue_8857.to_s + assert_equal 'issue-8857', br_issue_8857.to_s assert_equal '2a682156a3b6e77a8bf9cd4590e8db757f3c6c78', br_issue_8857.revision assert_equal br_issue_8857.scmid, br_issue_8857.revision assert_equal false, br_issue_8857.is_default br_latin_1_branch1 = brs[1] - assert_equal "latin-1-branch-#{@char_1}-01", br_latin_1_branch1.to_s + assert_equal "latin-1-branch-#{@char_1}-01", br_latin_1_branch1.to_s assert_equal '4fc55c43bf3d3dc2efb66145365ddc17639ce81e', br_latin_1_branch1.revision assert_equal br_latin_1_branch1.scmid, br_latin_1_branch1.revision assert_equal false, br_latin_1_branch1.is_default br_latin_1_branch2 = brs[2] - assert_equal "latin-1-branch-#{@char_1}-02", br_latin_1_branch2.to_s + assert_equal "latin-1-branch-#{@char_1}-02", br_latin_1_branch2.to_s assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', br_latin_1_branch2.revision assert_equal br_latin_1_branch2.scmid, br_latin_1_branch2.revision assert_equal false, br_latin_1_branch2.is_default br_latin_1_path = brs[3] - assert_equal 'latin-1-path-encoding', br_latin_1_path.to_s + assert_equal 'latin-1-path-encoding', br_latin_1_path.to_s assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', br_latin_1_path.revision assert_equal br_latin_1_path.scmid, br_latin_1_path.revision assert_equal false, br_latin_1_path.is_default diff --git a/test/unit/lib/redmine/unified_diff_test.rb b/test/unit/lib/redmine/unified_diff_test.rb index 55f475d..1879ebf 100644 --- a/test/unit/lib/redmine/unified_diff_test.rb +++ b/test/unit/lib/redmine/unified_diff_test.rb @@ -123,13 +123,13 @@ DIFF --- file.c ------------------------- +A line that starts with dashes: - + and removed. - + @@ -23,4 +19,4 @@ - - - + + + -Another chunk of change +Another chunk of changes @@ -360,7 +360,7 @@ DIFF end def test_offset_range_japanese_4 - # UTF-8 The 2nd byte differs. + # UTF-8 The 2nd byte differs. with_settings :repositories_encodings => '' do diff = Redmine::UnifiedDiff.new( read_diff_fixture('issue-13644-4.diff'), :type => 'sbs') @@ -372,7 +372,7 @@ DIFF end def test_offset_range_japanese_5 - # UTF-8 The 2nd byte differs. + # UTF-8 The 2nd byte differs. with_settings :repositories_encodings => '' do diff = Redmine::UnifiedDiff.new( read_diff_fixture('issue-13644-5.diff'), :type => 'sbs') diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb index d6aaedc..b916382 100644 --- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb @@ -89,7 +89,7 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest def test_multiple_macros_on_the_same_line Redmine::WikiFormatting::Macros.macro :foo do |obj, args| - args.any? ? "args: #{args.join(',')}" : "no args" + args.any? ? "args: #{args.join(',')}" : "no args" end assert_equal '

no args no args

', textilizable("{{foo}} {{foo}}") @@ -212,7 +212,7 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest text = "{{collapse\n*Collapsed* block of text\n}}" with_locale 'en' do result = textilizable(text) - + assert_select_in result, 'div.collapsed-text' assert_select_in result, 'strong', :text => 'Collapsed' assert_select_in result, 'a.collapsible.collapsed', :text => 'Show' @@ -249,7 +249,7 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest h1. Title {{collapse(Show example, Hide example) -h2. Heading +h2. Heading }}" RAW diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb index ee5d1b4..671a5b3 100644 --- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb @@ -281,7 +281,7 @@ EXPECTED This is a table with trailing whitespace in one row: |cell11|cell12| -|cell21|cell22| +|cell21|cell22| |cell31|cell32| RAW @@ -383,8 +383,8 @@ EXPECTED expected = '

' assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '') end - - + + STR_WITHOUT_PRE = [ # 0 "h1. Title @@ -414,36 +414,36 @@ Praesent eget turpis nibh, a lacinia nulla.", Ut rhoncus elementum adipiscing."] TEXT_WITHOUT_PRE = STR_WITHOUT_PRE.join("\n\n").freeze - + def test_get_section_should_return_the_requested_section_and_its_hash assert_section_with_hash STR_WITHOUT_PRE[1], TEXT_WITHOUT_PRE, 2 assert_section_with_hash STR_WITHOUT_PRE[2..3].join("\n\n"), TEXT_WITHOUT_PRE, 3 assert_section_with_hash STR_WITHOUT_PRE[3], TEXT_WITHOUT_PRE, 5 assert_section_with_hash STR_WITHOUT_PRE[4], TEXT_WITHOUT_PRE, 6 - + assert_section_with_hash '', TEXT_WITHOUT_PRE, 0 assert_section_with_hash '', TEXT_WITHOUT_PRE, 10 end - + def test_update_section_should_update_the_requested_section replacement = "New text" - + assert_equal [STR_WITHOUT_PRE[0], replacement, STR_WITHOUT_PRE[2..4]].flatten.join("\n\n"), @formatter.new(TEXT_WITHOUT_PRE).update_section(2, replacement) assert_equal [STR_WITHOUT_PRE[0..1], replacement, STR_WITHOUT_PRE[4]].flatten.join("\n\n"), @formatter.new(TEXT_WITHOUT_PRE).update_section(3, replacement) assert_equal [STR_WITHOUT_PRE[0..2], replacement, STR_WITHOUT_PRE[4]].flatten.join("\n\n"), @formatter.new(TEXT_WITHOUT_PRE).update_section(5, replacement) assert_equal [STR_WITHOUT_PRE[0..3], replacement].flatten.join("\n\n"), @formatter.new(TEXT_WITHOUT_PRE).update_section(6, replacement) - + assert_equal TEXT_WITHOUT_PRE, @formatter.new(TEXT_WITHOUT_PRE).update_section(0, replacement) assert_equal TEXT_WITHOUT_PRE, @formatter.new(TEXT_WITHOUT_PRE).update_section(10, replacement) end - + def test_update_section_with_hash_should_update_the_requested_section replacement = "New text" - + assert_equal [STR_WITHOUT_PRE[0], replacement, STR_WITHOUT_PRE[2..4]].flatten.join("\n\n"), @formatter.new(TEXT_WITHOUT_PRE).update_section(2, replacement, Digest::MD5.hexdigest(STR_WITHOUT_PRE[1])) end - + def test_update_section_with_wrong_hash_should_raise_an_error assert_raise Redmine::WikiFormatting::StaleSectionError do @formatter.new(TEXT_WITHOUT_PRE).update_section(2, "New text", Digest::MD5.hexdigest("Old text")) @@ -494,7 +494,7 @@ Nulla nunc nisi, egestas in ornare vel, posuere ac libero."] def test_update_section_should_not_escape_pre_content_outside_section text = STR_WITH_PRE.join("\n\n") replacement = "New text" - + assert_equal [STR_WITH_PRE[0..1], "New text"].flatten.join("\n\n"), @formatter.new(text).update_section(3, replacement) end @@ -509,13 +509,13 @@ Content 1 h1. Heading 2 Content 2 - + h1. Heading 3 Content 3 h1. Heading 4 - + Content 4 STR @@ -633,10 +633,10 @@ EXPECTED def to_html(text) @formatter.new(text).to_html end - + def assert_section_with_hash(expected, text, index) result = @formatter.new(text).get_section(index) - + assert_kind_of Array, result assert_equal 2, result.size assert_equal expected, result.first, "section content did not match" -- 2.1.4