sitios de testeo

This commit is contained in:
f 2021-05-13 19:41:39 -03:00
parent a421a79840
commit 42923c4e04
7 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,2 @@
This is site where posts can have many authors and viceversa and posts
can be replies to others.

View file

@ -0,0 +1,2 @@
locales:
- en

View file

@ -0,0 +1,9 @@
---
title:
type: 'string'
required: true
posts:
type: 'has_and_belongs_to_many'
inverse: 'authors'
filter:
layout: 'post'

View file

@ -0,0 +1,23 @@
---
title:
type: 'string'
required: true
authors:
type: 'has_and_belongs_to_many'
inverse: 'posts'
filter:
layout: 'author'
posts:
type: 'has_many'
inverse: 'in_reply_to'
filter:
layout: 'post'
in_reply_to:
type: 'belongs_to'
inverse: 'posts'
filter:
layout: 'post'
recommended_posts:
type: 'related_posts'
filter:
layout: 'post'

View file

View file

@ -0,0 +1 @@
_en

View file

@ -0,0 +1,19 @@
# frozen_string_literal: true
module MetadataTest
extend ActiveSupport::Concern
included do
setup do
name = SecureRandom.hex
# TODO: Poder cambiar el nombre
FileUtils.cp_r(Rails.root.join('test', 'fixtures', 'site_with_relationships'), Rails.root.join('_sites', name))
@site = create :site, name: name
end
teardown do
@site&.destroy
end
end
end