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