5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 05:06:22 +00:00

chore: rubocop
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
f 2023-10-06 11:53:11 -03:00
parent 1256258d76
commit 74795069ac
No known key found for this signature in database
2 changed files with 10 additions and 7 deletions

View file

@ -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?

View file

@ -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