diff --git a/test/models/metadata_date_test.rb b/test/models/metadata_date_test.rb index 3ffaf87d..a5a1d519 100644 --- a/test/models/metadata_date_test.rb +++ b/test/models/metadata_date_test.rb @@ -43,7 +43,7 @@ class MetadataDateTest < ActiveSupport::TestCase test 'pueden tener un valor por defecto desde el layout' do default = random_value - @layout = build(:layout, site: @site, metadata: { @name => { 'default' => { I18n.locale.to_s => default }}}) + @layout = build(:layout, site: @site, metadata: { @name => { 'default' => { I18n.locale.to_s => default } } }) @metadata = MetadataDate.new(site: @site, document: @document, name: @name, type: 'date', layout: @layout) assert_equal default, @metadata.default_value @@ -58,7 +58,7 @@ class MetadataDateTest < ActiveSupport::TestCase end test 'se pueden hacer privados' do - @layout = build(:layout, site: @site, metadata: { @name => { 'private' => true }}) + @layout = build(:layout, site: @site, metadata: { @name => { 'private' => true } }) @metadata = MetadataDate.new(site: @site, document: @document, name: @name, type: 'date', layout: @layout) assert @metadata.private? diff --git a/test/models/metadata_document_date_test.rb b/test/models/metadata_document_date_test.rb index 8b7d6bff..96dde0c9 100644 --- a/test/models/metadata_document_date_test.rb +++ b/test/models/metadata_document_date_test.rb @@ -9,7 +9,8 @@ class MetadataDocumentDateTest < ActiveSupport::TestCase @name = 'date' @layout = build(:layout, site: @site) @post = build(:post, layout: @layout, site: @site, document: @document) - @metadata = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'date', layout: @layout, post: @post) + @metadata = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'date', layout: @layout, + post: @post) end # Una fecha al azar en el pasado o en el futuro @@ -44,8 +45,9 @@ class MetadataDocumentDateTest < ActiveSupport::TestCase test 'pueden tener un valor por defecto desde el layout' do default = random_value - @layout = build(:layout, site: @site, metadata: { @name => { 'default' => { I18n.locale.to_s => default }}}) - @metadata = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'document_date', layout: @layout) + @layout = build(:layout, site: @site, metadata: { @name => { 'default' => { I18n.locale.to_s => default } } }) + @metadata = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'document_date', + layout: @layout) assert_equal default, @metadata.default_value end @@ -59,8 +61,9 @@ class MetadataDocumentDateTest < ActiveSupport::TestCase end test 'se pueden hacer privados' do - @layout = build(:layout, site: @site, metadata: { @name => { 'private' => true }}) - @metadata = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'document_date', layout: @layout) + @layout = build(:layout, site: @site, metadata: { @name => { 'private' => true } }) + @metadata = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'document_date', + layout: @layout) assert @metadata.private? end