5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 09:16: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

@ -9,7 +9,8 @@ class MetadataDocumentDateTest < ActiveSupport::TestCase
@name = 'date' @name = 'date'
@layout = build(:layout, site: @site) @layout = build(:layout, site: @site)
@post = build(:post, layout: @layout, site: @site, document: @document) @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 end
# Una fecha al azar en el pasado o en el futuro # Una fecha al azar en el pasado o en el futuro
@ -45,7 +46,8 @@ class MetadataDocumentDateTest < ActiveSupport::TestCase
default = random_value 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 = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'document_date', layout: @layout) @metadata = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'document_date',
layout: @layout)
assert_equal default, @metadata.default_value assert_equal default, @metadata.default_value
end end
@ -60,7 +62,8 @@ class MetadataDocumentDateTest < ActiveSupport::TestCase
test 'se pueden hacer privados' do 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 = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'document_date', layout: @layout) @metadata = MetadataDocumentDate.new(site: @site, document: @document, name: @name, type: 'document_date',
layout: @layout)
assert @metadata.private? assert @metadata.private?
end end