summaryrefslogtreecommitdiffstats
path: root/test/unit/repository_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r--test/unit/repository_test.rb7
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