From 2d1866d966d94c688f9cb87c5bf3f096dffac844 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 22 Oct 2014 17:37:16 +0000 Subject: Merged rails-4.1 branch (#14534). git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_test.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/unit/repository_test.rb') diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 2de4972dc..9537e50a6 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -54,8 +54,7 @@ class RepositoryTest < ActiveSupport::TestCase def test_blank_log_encoding_error_message_fr set_language_if_valid 'fr' - str = "Encodage des messages de commit doit \xc3\xaatre renseign\xc3\xa9(e)" - str.force_encoding('UTF-8') if str.respond_to?(:force_encoding) + str = "Encodage des messages de commit doit \xc3\xaatre renseign\xc3\xa9(e)".force_encoding('UTF-8') repo = Repository::Bazaar.new( :project => Project.find(3), :url => "/test" @@ -175,7 +174,7 @@ class RepositoryTest < ActiveSupport::TestCase def test_destroy_should_delete_parents_associations changeset = Changeset.find(102) - changeset.parents = Changeset.where(:id => [100, 101]).all + changeset.parents = Changeset.where(:id => [100, 101]).to_a assert_difference 'Changeset.connection.select_all("select * from changeset_parents").count', -2 do Repository.find(10).destroy end @@ -183,7 +182,7 @@ class RepositoryTest < ActiveSupport::TestCase def test_destroy_should_delete_issues_associations changeset = Changeset.find(102) - changeset.issues = Issue.where(:id => [1, 2]).all + changeset.issues = Issue.where(:id => [1, 2]).to_a assert_difference 'Changeset.connection.select_all("select * from changesets_issues").count', -2 do Repository.find(10).destroy end -- cgit v1.2.3