diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
commit | 2d1866d966d94c688f9cb87c5bf3f096dffac844 (patch) | |
tree | 7a733c1cc51448ab69b3f892285305dbfb0ae15e /test/unit/repository_test.rb | |
parent | a6ec78a4dc658e3517ed682792016b6530458696 (diff) | |
download | redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.tar.gz redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.zip |
Merged rails-4.1 branch (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r-- | test/unit/repository_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
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 |