From 96848d47dcb0bf39f86e4f655e2752fb079ee290 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 18 Oct 2019 18:08:43 -0300 Subject: [PATCH] =?UTF-8?q?usar=20la=20extensi=C3=B3n=20original=20del=20a?= =?UTF-8?q?rchivo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/metadata_path.rb | 2 +- test/controllers/posts_controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/metadata_path.rb b/app/models/metadata_path.rb index 05e3ed4..474ddee 100644 --- a/app/models/metadata_path.rb +++ b/app/models/metadata_path.rb @@ -24,7 +24,7 @@ class MetadataPath < MetadataTemplate private def ext - document.extname.blank? ? '.markdown' : document.extname + document.data['ext'].blank? ? '.markdown' : document.data['ext'] end def lang diff --git a/test/controllers/posts_controller_test.rb b/test/controllers/posts_controller_test.rb index 93b6e8e..684818b 100644 --- a/test/controllers/posts_controller_test.rb +++ b/test/controllers/posts_controller_test.rb @@ -143,7 +143,7 @@ class PostsControllerTest < ActionDispatch::IntegrationTest end test 'se pueden reordenar' do - lang = :es + lang = I18n.available_locales.sample posts = @site.posts(lang: lang) reorder = posts.each_index.to_a.shuffle