From 265baa1b2c5d0bcf37e12f1df0b3339c793b46e7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 2 Sep 2012 10:08:51 +0000 Subject: [PATCH] Upgrade to Rails 3.2.8 (#11758). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10275 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- Gemfile | 2 +- app/helpers/application_helper.rb | 2 +- app/views/groups/edit_membership.js.erb | 2 +- app/views/members/create.js.erb | 2 +- .../repositories/add_related_issue.js.erb | 2 +- app/views/users/edit_membership.js.erb | 2 +- ...js => jquery-1.7.2-ui-1.8.21-ujs-2.0.3.js} | 4 ++-- test/functional/activities_controller_test.rb | 6 ++--- .../auth_sources_controller_test.rb | 4 ++-- .../issue_statuses_controller_test.rb | 4 ++-- test/functional/issues_controller_test.rb | 24 +++++++++---------- test/functional/my_controller_test.rb | 2 +- test/functional/news_controller_test.rb | 4 ++-- test/functional/projects_controller_test.rb | 2 +- test/functional/trackers_controller_test.rb | 4 ++-- test/functional/wikis_controller_test.rb | 2 +- test/unit/helpers/application_helper_test.rb | 2 +- test/unit/mailer_test.rb | 6 ++--- 18 files changed, 38 insertions(+), 38 deletions(-) rename public/javascripts/{jquery-1.7.2-ui-1.8.21-ujs-2.0.2.js => jquery-1.7.2-ui-1.8.21-ujs-2.0.3.js} (97%) diff --git a/Gemfile b/Gemfile index 3b923987d..228c4d017 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'http://rubygems.org' -gem 'rails', '3.2.6' +gem 'rails', '3.2.8' gem "jquery-rails", "~> 2.0.2" gem "i18n", "~> 0.6.0" gem "coderay", "~> 1.0.6" diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2706cef78..a0e9cac92 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1206,7 +1206,7 @@ module ApplicationHelper # Returns the javascript tags that are included in the html layout head def javascript_heads - tags = javascript_include_tag('jquery-1.7.2-ui-1.8.21-ujs-2.0.2', 'application') + tags = javascript_include_tag('jquery-1.7.2-ui-1.8.21-ujs-2.0.3', 'application') unless User.current.pref.warn_on_leaving_unsaved == '0' tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });") end diff --git a/app/views/groups/edit_membership.js.erb b/app/views/groups/edit_membership.js.erb index 6df0fbba9..679c99869 100644 --- a/app/views/groups/edit_membership.js.erb +++ b/app/views/groups/edit_membership.js.erb @@ -2,5 +2,5 @@ $('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>'); $('#member-<%= @membership.id %>').effect("highlight"); <% else %> - alert('<%= escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', '))) %>'); + alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')))) %>'); <% end %> diff --git a/app/views/members/create.js.erb b/app/views/members/create.js.erb index 7ca4930b5..11c468a76 100644 --- a/app/views/members/create.js.erb +++ b/app/views/members/create.js.erb @@ -7,5 +7,5 @@ hideOnLoad(); <% end %> <% else %> <% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') %> - alert('<%= escape_javascript l(:notice_failed_to_save_members, :errors => errors) %>'); + alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => errors))) %>'); <% end %> diff --git a/app/views/repositories/add_related_issue.js.erb b/app/views/repositories/add_related_issue.js.erb index bc156ebc2..f3864d3be 100644 --- a/app/views/repositories/add_related_issue.js.erb +++ b/app/views/repositories/add_related_issue.js.erb @@ -3,5 +3,5 @@ $('#related-issue-<%= @issue.id %>').effect("highlight"); $('#issue_id').focus(); <% else %> - alert("<%= escape_javascript(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid')) %>"); + alert("<%= raw(escape_javascript(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid'))) %>"); <% end %> diff --git a/app/views/users/edit_membership.js.erb b/app/views/users/edit_membership.js.erb index 94507567f..d9ad2f355 100644 --- a/app/views/users/edit_membership.js.erb +++ b/app/views/users/edit_membership.js.erb @@ -2,5 +2,5 @@ $('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'users/memberships') %>'); $("#member-<%= @membership.id %>").effect("highlight"); <% else %> - alert('<%= escape_javascript l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')) %>'); + alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')))) %>'); <% end %> diff --git a/public/javascripts/jquery-1.7.2-ui-1.8.21-ujs-2.0.2.js b/public/javascripts/jquery-1.7.2-ui-1.8.21-ujs-2.0.3.js similarity index 97% rename from public/javascripts/jquery-1.7.2-ui-1.8.21-ujs-2.0.2.js rename to public/javascripts/jquery-1.7.2-ui-1.8.21-ujs-2.0.3.js index e41846b21..7bc9c1e4a 100644 --- a/public/javascripts/jquery-1.7.2-ui-1.8.21-ujs-2.0.2.js +++ b/public/javascripts/jquery-1.7.2-ui-1.8.21-ujs-2.0.3.js @@ -129,5 +129,5 @@ jQuery.effects||function(a,b){function c(b){var c;return b&&b.constructor==Array * Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */ (function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('
').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&&b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);; -/* JQuery UJS 2.0.2 */ -(function(a,b){var c;a.rails=c={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");if(c)b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);b.trigger(e,d);return e.result!==false},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},href:function(a){return a.attr("href")},handleRemote:function(d){var e,f,g,h,i,j;if(c.fire(d,"ajax:before")){h=d.data("cross-domain")||null;i=d.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType;if(d.is("form")){e=d.attr("method");f=d.attr("action");g=d.serializeArray();var k=d.data("ujs:submit-button");if(k){g.push(k);d.data("ujs:submit-button",null)}}else if(d.is(c.inputChangeSelector)){e=d.data("method");f=d.data("url");g=d.serialize();if(d.data("params"))g=g+"&"+d.data("params")}else{e=d.data("method");f=c.href(d);g=d.data("params")||null}j={type:e||"GET",data:g,dataType:i,crossDomain:h,beforeSend:function(a,e){if(e.dataType===b){a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script)}return c.fire(d,"ajax:beforeSend",[a,e])},success:function(a,b,c){d.trigger("ajax:success",[a,b,c])},complete:function(a,b){d.trigger("ajax:complete",[a,b])},error:function(a,b,c){d.trigger("ajax:error",[a,b,c])}};if(f){j.url=f}return c.ajax(j)}else{return false}},handleMethod:function(d){var e=c.href(d),f=d.data("method"),g=d.attr("target"),h=a("meta[name=csrf-token]").attr("content"),i=a("meta[name=csrf-param]").attr("content"),j=a('
'),k='';if(i!==b&&h!==b){k+=''}if(g){j.attr("target",g)}j.hide().append(k).appendTo("body");j.submit()},disableFormElements:function(b){b.find(c.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]());b[c](b.data("disable-with"));b.prop("disabled",true)})},enableFormElements:function(b){b.find(c.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";if(b.data("ujs:enable-with"))b[c](b.data("ujs:enable-with"));b.prop("disabled",false)})},allowAction:function(a){var b=a.data("confirm"),d=false,e;if(!b){return true}if(c.fire(a,"confirm")){d=c.confirm(b);e=c.fire(a,"confirm:complete",[d])}return d&&e},blankInputs:function(b,c,d){var e=a(),f,g=c||"input,textarea";b.find(g).each(function(){f=a(this);if(d?f.val():!f.val()){e=e.add(f)}});return e.length?e:false},nonBlankInputs:function(a,b){return c.blankInputs(a,b,true)},stopEverything:function(b){a(b.target).trigger("ujs:everythingStopped");b.stopImmediatePropagation();return false},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=true;if(e!==b&&e["submit"]!==b){a.each(e["submit"],function(a,b){if(typeof b.handler==="function")return f=b.handler(d)})}return f},disableElement:function(a){a.data("ujs:enable-with",a.html());a.html(a.data("disable-with"));a.bind("click.railsDisable",function(a){return c.stopEverything(a)})},enableElement:function(a){if(a.data("ujs:enable-with")!==b){a.html(a.data("ujs:enable-with"));a.data("ujs:enable-with",false)}a.unbind("click.railsDisable")}};a.ajaxPrefilter(function(a,b,d){if(!a.crossDomain){c.CSRFProtection(d)}});a(document).delegate(c.linkDisableSelector,"ajax:complete",function(){c.enableElement(a(this))});a(document).delegate(c.linkClickSelector,"click.rails",function(d){var e=a(this),f=e.data("method"),g=e.data("params");if(!c.allowAction(e))return c.stopEverything(d);if(e.is(c.linkDisableSelector))c.disableElement(e);if(e.data("remote")!==b){if((d.metaKey||d.ctrlKey)&&(!f||f==="GET")&&!g){return true}if(c.handleRemote(e)===false){c.enableElement(e)}return false}else if(e.data("method")){c.handleMethod(e);return false}});a(document).delegate(c.inputChangeSelector,"change.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);c.handleRemote(d);return false});a(document).delegate(c.formSubmitSelector,"submit.rails",function(d){var e=a(this),f=e.data("remote")!==b,g=c.blankInputs(e,c.requiredInputSelector),h=c.nonBlankInputs(e,c.fileInputSelector);if(!c.allowAction(e))return c.stopEverything(d);if(g&&e.attr("novalidate")==b&&c.fire(e,"ajax:aborted:required",[g])){return c.stopEverything(d)}if(f){if(h){return c.fire(e,"ajax:aborted:file",[h])}if(!a.support.submitBubbles&&a().jquery<"1.7"&&c.callFormSubmitBindings(e,d)===false)return c.stopEverything(d);c.handleRemote(e);return false}else{setTimeout(function(){c.disableFormElements(e)},13)}});a(document).delegate(c.formInputClickSelector,"click.rails",function(b){var d=a(this);if(!c.allowAction(d))return c.stopEverything(b);var e=d.attr("name"),f=e?{name:e,value:d.val()}:null;d.closest("form").data("ujs:submit-button",f)});a(document).delegate(c.formSubmitSelector,"ajax:beforeSend.rails",function(b){if(this==b.target)c.disableFormElements(a(this))});a(document).delegate(c.formSubmitSelector,"ajax:complete.rails",function(b){if(this==b.target)c.enableFormElements(a(this))})})(jQuery); +/* JQuery UJS 2.0.3 */ +(function(a,b){var c=function(){var b=a(document).data("events");return b&&b.click&&a.grep(b.click,function(a){return a.namespace==="rails"}).length};if(c()){a.error("jquery-ujs has already been loaded!")}var d;a.rails=d={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input:file",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(b){var c=a('meta[name="csrf-token"]').attr("content");if(c)b.setRequestHeader("X-CSRF-Token",c)},fire:function(b,c,d){var e=a.Event(c);b.trigger(e,d);return e.result!==false},confirm:function(a){return confirm(a)},ajax:function(b){return a.ajax(b)},href:function(a){return a.attr("href")},handleRemote:function(c){var e,f,g,h,i,j,k,l;if(d.fire(c,"ajax:before")){h=c.data("cross-domain");i=h===b?null:h;j=c.data("with-credentials")||null;k=c.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType;if(c.is("form")){e=c.attr("method");f=c.attr("action");g=c.serializeArray();var m=c.data("ujs:submit-button");if(m){g.push(m);c.data("ujs:submit-button",null)}}else if(c.is(d.inputChangeSelector)){e=c.data("method");f=c.data("url");g=c.serialize();if(c.data("params"))g=g+"&"+c.data("params")}else{e=c.data("method");f=d.href(c);g=c.data("params")||null}l={type:e||"GET",data:g,dataType:k,beforeSend:function(a,e){if(e.dataType===b){a.setRequestHeader("accept","*/*;q=0.5, "+e.accepts.script)}return d.fire(c,"ajax:beforeSend",[a,e])},success:function(a,b,d){c.trigger("ajax:success",[a,b,d])},complete:function(a,b){c.trigger("ajax:complete",[a,b])},error:function(a,b,d){c.trigger("ajax:error",[a,b,d])},xhrFields:{withCredentials:j},crossDomain:i};if(f){l.url=f}var n=d.ajax(l);c.trigger("ajax:send",n);return n}else{return false}},handleMethod:function(c){var e=d.href(c),f=c.data("method"),g=c.attr("target"),h=a("meta[name=csrf-token]").attr("content"),i=a("meta[name=csrf-param]").attr("content"),j=a('
'),k='';if(i!==b&&h!==b){k+=''}if(g){j.attr("target",g)}j.hide().append(k).appendTo("body");j.submit()},disableFormElements:function(b){b.find(d.disableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";b.data("ujs:enable-with",b[c]());b[c](b.data("disable-with"));b.prop("disabled",true)})},enableFormElements:function(b){b.find(d.enableSelector).each(function(){var b=a(this),c=b.is("button")?"html":"val";if(b.data("ujs:enable-with"))b[c](b.data("ujs:enable-with"));b.prop("disabled",false)})},allowAction:function(a){var b=a.data("confirm"),c=false,e;if(!b){return true}if(d.fire(a,"confirm")){c=d.confirm(b);e=d.fire(a,"confirm:complete",[c])}return c&&e},blankInputs:function(b,c,d){var e=a(),f,g,h=c||"input,textarea";b.find(h).each(function(){f=a(this);g=f.is(":checkbox,:radio")?f.is(":checked"):f.val();if(g==!!d){e=e.add(f)}});return e.length?e:false},nonBlankInputs:function(a,b){return d.blankInputs(a,b,true)},stopEverything:function(b){a(b.target).trigger("ujs:everythingStopped");b.stopImmediatePropagation();return false},callFormSubmitBindings:function(c,d){var e=c.data("events"),f=true;if(e!==b&&e["submit"]!==b){a.each(e["submit"],function(a,b){if(typeof b.handler==="function")return f=b.handler(d)})}return f},disableElement:function(a){a.data("ujs:enable-with",a.html());a.html(a.data("disable-with"));a.bind("click.railsDisable",function(a){return d.stopEverything(a)})},enableElement:function(a){if(a.data("ujs:enable-with")!==b){a.html(a.data("ujs:enable-with"));a.data("ujs:enable-with",false)}a.unbind("click.railsDisable")}};if(d.fire(a(document),"rails:attachBindings")){a.ajaxPrefilter(function(a,b,c){if(!a.crossDomain){d.CSRFProtection(c)}});a(document).delegate(d.linkDisableSelector,"ajax:complete",function(){d.enableElement(a(this))});a(document).delegate(d.linkClickSelector,"click.rails",function(c){var e=a(this),f=e.data("method"),g=e.data("params");if(!d.allowAction(e))return d.stopEverything(c);if(e.is(d.linkDisableSelector))d.disableElement(e);if(e.data("remote")!==b){if((c.metaKey||c.ctrlKey)&&(!f||f==="GET")&&!g){return true}if(d.handleRemote(e)===false){d.enableElement(e)}return false}else if(e.data("method")){d.handleMethod(e);return false}});a(document).delegate(d.inputChangeSelector,"change.rails",function(b){var c=a(this);if(!d.allowAction(c))return d.stopEverything(b);d.handleRemote(c);return false});a(document).delegate(d.formSubmitSelector,"submit.rails",function(c){var e=a(this),f=e.data("remote")!==b,g=d.blankInputs(e,d.requiredInputSelector),h=d.nonBlankInputs(e,d.fileInputSelector);if(!d.allowAction(e))return d.stopEverything(c);if(g&&e.attr("novalidate")==b&&d.fire(e,"ajax:aborted:required",[g])){return d.stopEverything(c)}if(f){if(h){setTimeout(function(){d.disableFormElements(e)},13);return d.fire(e,"ajax:aborted:file",[h])}if(!a.support.submitBubbles&&a().jquery<"1.7"&&d.callFormSubmitBindings(e,c)===false)return d.stopEverything(c);d.handleRemote(e);return false}else{setTimeout(function(){d.disableFormElements(e)},13)}});a(document).delegate(d.formInputClickSelector,"click.rails",function(b){var c=a(this);if(!d.allowAction(c))return d.stopEverything(b);var e=c.attr("name"),f=e?{name:e,value:c.val()}:null;c.closest("form").data("ujs:submit-button",f)});a(document).delegate(d.formSubmitSelector,"ajax:beforeSend.rails",function(b){if(this==b.target)d.disableFormElements(a(this))});a(document).delegate(d.formSubmitSelector,"ajax:complete.rails",function(b){if(this==b.target)d.enableFormElements(a(this))});a(function(){csrf_token=a("meta[name=csrf-token]").attr("content");csrf_param=a("meta[name=csrf-param]").attr("content");a('form input[name="'+csrf_param+'"]').val(csrf_token)})}})(jQuery) diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index eb2770982..13f44a108 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -48,7 +48,7 @@ class ActivitiesControllerTest < ActionController::TestCase :child => { :tag => "dt", :attributes => { :class => /issue/ }, :child => { :tag => "a", - :content => /#{Issue.find(1).subject}/, + :content => /Can't print recipes/, } } } @@ -69,7 +69,7 @@ class ActivitiesControllerTest < ActionController::TestCase :child => { :tag => "dt", :attributes => { :class => /issue/ }, :child => { :tag => "a", - :content => /#{Issue.find(5).subject}/, + :content => /Subproject issue/, } } } @@ -93,7 +93,7 @@ class ActivitiesControllerTest < ActionController::TestCase :child => { :tag => "dt", :attributes => { :class => /issue/ }, :child => { :tag => "a", - :content => /#{Issue.find(1).subject}/, + :content => /Can't print recipes/, } } } diff --git a/test/functional/auth_sources_controller_test.rb b/test/functional/auth_sources_controller_test.rb index 4abf4f428..ff3c5047c 100644 --- a/test/functional/auth_sources_controller_test.rb +++ b/test/functional/auth_sources_controller_test.rb @@ -65,7 +65,7 @@ class AuthSourcesControllerTest < ActionController::TestCase assert_response :success assert_template 'new' end - assert_error_tag :content => /host can't be blank/i + assert_error_tag :content => /host can't be blank/i end def test_edit @@ -90,7 +90,7 @@ class AuthSourcesControllerTest < ActionController::TestCase put :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '', :port => '389', :attr_login => 'uid'} assert_response :success assert_template 'edit' - assert_error_tag :content => /host can't be blank/i + assert_error_tag :content => /host can't be blank/i end def test_destroy diff --git a/test/functional/issue_statuses_controller_test.rb b/test/functional/issue_statuses_controller_test.rb index c32999f80..761f1992e 100644 --- a/test/functional/issue_statuses_controller_test.rb +++ b/test/functional/issue_statuses_controller_test.rb @@ -53,7 +53,7 @@ class IssueStatusesControllerTest < ActionController::TestCase post :create, :issue_status => {:name => ''} assert_response :success assert_template 'new' - assert_error_tag :content => /name can't be blank/i + assert_error_tag :content => /name can't be blank/i end def test_edit @@ -73,7 +73,7 @@ class IssueStatusesControllerTest < ActionController::TestCase put :update, :id => '3', :issue_status => {:name => ''} assert_response :success assert_template 'edit' - assert_error_tag :content => /name can't be blank/i + assert_error_tag :content => /name can't be blank/i end def test_destroy diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index e1cbab072..f17402ec4 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -61,7 +61,7 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'index' assert_not_nil assigns(:issues) assert_nil assigns(:project) - assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ # private projects hidden assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ @@ -78,7 +78,7 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'index' assert_not_nil assigns(:issues) assert_nil assigns(:project) - assert_no_tag :tag => 'a', :content => /Can't print recipes/ + assert_no_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ end @@ -95,7 +95,7 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'index' assert_not_nil assigns(:issues) - assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Can't print recipes/ assert_no_tag :tag => 'a', :content => /Subproject issue/ end @@ -105,7 +105,7 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'index' assert_not_nil assigns(:issues) - assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ end @@ -117,7 +117,7 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'index' assert_not_nil assigns(:issues) - assert_tag :tag => 'a', :content => /Can't print recipes/ + assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Subproject issue/ assert_tag :tag => 'a', :content => /Issue of a private subproject/ end @@ -823,7 +823,7 @@ class IssuesControllerTest < ActionController::TestCase :child => { :tag => 'legend', :content => /Notes/ } } assert_tag :tag => 'title', - :content => "Bug #1: Can't print recipes - eCookbook - Redmine" + :content => "Bug #1: Can't print recipes - eCookbook - Redmine" end def test_show_by_manager @@ -1807,7 +1807,7 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'new' issue = assigns(:issue) assert_not_nil issue - assert_error_tag :content => /Database can't be blank/ + assert_error_tag :content => /Database can't be blank/ end def test_create_should_validate_required_fields @@ -1831,8 +1831,8 @@ class IssuesControllerTest < ActionController::TestCase assert_template 'new' end - assert_error_tag :content => /Due date can't be blank/i - assert_error_tag :content => /Bar can't be blank/i + assert_error_tag :content => /Due date can't be blank/i + assert_error_tag :content => /Bar can't be blank/i end def test_create_should_ignore_readonly_fields @@ -2869,7 +2869,7 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'edit' - assert_error_tag :descendant => {:content => /Activity can't be blank/} + assert_error_tag :descendant => {:content => /Activity can't be blank/} assert_tag :textarea, :attributes => { :name => 'notes' }, :content => "\n"+notes assert_tag :input, :attributes => { :name => 'time_entry[hours]', :value => "2z" } end @@ -2887,8 +2887,8 @@ class IssuesControllerTest < ActionController::TestCase assert_response :success assert_template 'edit' - assert_error_tag :descendant => {:content => /Activity can't be blank/} - assert_error_tag :descendant => {:content => /Hours can't be blank/} + assert_error_tag :descendant => {:content => /Activity can't be blank/} + assert_error_tag :descendant => {:content => /Hours can't be blank/} assert_tag :textarea, :attributes => { :name => 'notes' }, :content => "\n"+notes assert_tag :input, :attributes => { :name => 'time_entry[comments]', :value => "this is my comment" } end diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index fab6c553e..e5ed9ed2b 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -149,7 +149,7 @@ class MyControllerTest < ActionController::TestCase :new_password_confirmation => 'hello2' assert_response :success assert_template 'password' - assert_error_tag :content => /Password doesn't match confirmation/ + assert_error_tag :content => /Password doesn't match confirmation/ # wrong password post :password, :password => 'wrongpassword', diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index dcc6410ed..4bc1a2a37 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -123,7 +123,7 @@ class NewsControllerTest < ActionController::TestCase assert_template 'new' assert_not_nil assigns(:news) assert assigns(:news).new_record? - assert_error_tag :content => /title can't be blank/i + assert_error_tag :content => /title can't be blank/i end def test_get_edit @@ -160,7 +160,7 @@ class NewsControllerTest < ActionController::TestCase put :update, :id => 1, :news => { :description => '' } assert_response :success assert_template 'edit' - assert_error_tag :content => /description can't be blank/i + assert_error_tag :content => /description can't be blank/i end def test_destroy diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index a73bd079a..8d5be729f 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -409,7 +409,7 @@ class ProjectsControllerTest < ActionController::TestCase post :update, :id => 1, :project => {:name => ''} assert_response :success assert_template 'settings' - assert_error_tag :content => /name can't be blank/i + assert_error_tag :content => /name can't be blank/i end def test_update_should_be_denied_for_member_on_closed_project diff --git a/test/functional/trackers_controller_test.rb b/test/functional/trackers_controller_test.rb index 4c4dd0d3a..caa1ec9eb 100644 --- a/test/functional/trackers_controller_test.rb +++ b/test/functional/trackers_controller_test.rb @@ -95,7 +95,7 @@ class TrackersControllerTest < ActionController::TestCase end assert_response :success assert_template 'new' - assert_error_tag :content => /name can't be blank/i + assert_error_tag :content => /name can't be blank/i end def test_edit @@ -160,7 +160,7 @@ class TrackersControllerTest < ActionController::TestCase put :update, :id => 1, :tracker => { :name => '' } assert_response :success assert_template 'edit' - assert_error_tag :content => /name can't be blank/i + assert_error_tag :content => /name can't be blank/i end def test_move_lower diff --git a/test/functional/wikis_controller_test.rb b/test/functional/wikis_controller_test.rb index fefaea1dc..d795ef1c0 100644 --- a/test/functional/wikis_controller_test.rb +++ b/test/functional/wikis_controller_test.rb @@ -58,7 +58,7 @@ class WikisControllerTest < ActionController::TestCase end assert_include 'errorExplanation', response.body - assert_include 'Start page can\\\'t be blank', response.body + assert_include 'Start page can't be blank', response.body end def test_update diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index f4e116c89..c431e2612 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -690,7 +690,7 @@ RAW expected = <<-EXPECTED

CookBook documentation

-

#1

+

#1

 [[CookBook documentation]]
 
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb
index ae755a51a..e95aa449a 100644
--- a/test/unit/mailer_test.rb
+++ b/test/unit/mailer_test.rb
@@ -55,7 +55,7 @@ class MailerTest < ActiveSupport::TestCase
       # link to a referenced ticket
       assert_select 'a[href=?][title=?]',
                     'https://mydomain.foo/issues/1',
-                    'Can\'t print recipes (New)',
+                    'Can't print recipes (New)',
                     :text => '#1'
       # link to a changeset
       assert_select 'a[href=?][title=?]',
@@ -94,7 +94,7 @@ class MailerTest < ActiveSupport::TestCase
       # link to a referenced ticket
       assert_select 'a[href=?][title=?]',
                     'http://mydomain.foo/rdm/issues/1',
-                    'Can\'t print recipes (New)',
+                    'Can't print recipes (New)',
                     :text => '#1'
       # link to a changeset
       assert_select 'a[href=?][title=?]',
@@ -134,7 +134,7 @@ class MailerTest < ActiveSupport::TestCase
       # link to a referenced ticket
       assert_select 'a[href=?][title=?]',
                     'http://mydomain.foo/rdm/issues/1',
-                    'Can\'t print recipes (New)',
+                    'Can't print recipes (New)',
                     :text => '#1'
       # link to a changeset
       assert_select 'a[href=?][title=?]',
-- 
2.39.5