From a7791635aa98f012d35f97c3c5288494bbb28e38 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 13 Mar 2024 18:03:43 +0100 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- test/fixtures/action_text/rich_texts.yml | 4 ++++ test/fixtures/comments.yml | 2 ++ test/fixtures/files/all.uoc.tex | 9 ++++++++ test/fixtures/searches.yml | 4 ++++ test/fixtures/tag_references.yml | 15 ++++++++++++ test/fixtures/tags.yml | 5 ++++ test/fixtures/things.yml | 39 ++++++++++++++++++++++++++++++++ test/fixtures/users.yml | 4 ++++ 8 files changed, 82 insertions(+) create mode 100644 test/fixtures/action_text/rich_texts.yml create mode 100644 test/fixtures/comments.yml create mode 100644 test/fixtures/files/all.uoc.tex create mode 100644 test/fixtures/searches.yml create mode 100644 test/fixtures/tag_references.yml create mode 100644 test/fixtures/tags.yml create mode 100644 test/fixtures/things.yml create mode 100644 test/fixtures/users.yml (limited to 'test/fixtures') diff --git a/test/fixtures/action_text/rich_texts.yml b/test/fixtures/action_text/rich_texts.yml new file mode 100644 index 0000000..8c95217 --- /dev/null +++ b/test/fixtures/action_text/rich_texts.yml @@ -0,0 +1,4 @@ +comment1: + record: comment1 (Comment) + name: content + body:

Such awesome content from Miquel

diff --git a/test/fixtures/comments.yml b/test/fixtures/comments.yml new file mode 100644 index 0000000..f61437d --- /dev/null +++ b/test/fixtures/comments.yml @@ -0,0 +1,2 @@ +comment1: + thing_id: <%= ActiveRecord::FixtureSet.identify(:thing1) %> diff --git a/test/fixtures/files/all.uoc.tex b/test/fixtures/files/all.uoc.tex new file mode 100644 index 0000000..227a2bb --- /dev/null +++ b/test/fixtures/files/all.uoc.tex @@ -0,0 +1,9 @@ +\chapter{Bibliografia} + +{\setlength{\parskip}{-0.3cm} + +\hypertarget{target2}{\textsc{Sabaté}, Miquel; \textsc{Nom} (eds.) (2024). \emph{This is a 2}. Dins de \emph{Some other thing}, 22-24. This is a note 2. Publisher 2, Address 2: 2024.} + +\\~\\\hypertarget{target1}{\textsc{Sabaté}, Miquel; \textsc{Smith}, John; \textsc{cognom2}, Nom cognom1; \textsc{cognom3 cognom4}, Nom (2024). \emph{This is a title 1}. Dins de \emph{Some other thing}, 22-24. This is a note 1. Publisher 1. [\url{http://example.com}]. [Última data de consulta: 24 de febrer de 2024].} + +} diff --git a/test/fixtures/searches.yml b/test/fixtures/searches.yml new file mode 100644 index 0000000..ffc7a28 --- /dev/null +++ b/test/fixtures/searches.yml @@ -0,0 +1,4 @@ +search1: + name: 'search1' + body: "tag:\"tag1\"" + user_id: <%= ActiveRecord::FixtureSet.identify(:user) %> diff --git a/test/fixtures/tag_references.yml b/test/fixtures/tag_references.yml new file mode 100644 index 0000000..d6267d5 --- /dev/null +++ b/test/fixtures/tag_references.yml @@ -0,0 +1,15 @@ +thing1tag1: + tag_id: <%= ActiveRecord::FixtureSet.identify(:tag1) %> + taggable: thing1 (Thing) + +thing1tag2: + tag_id: <%= ActiveRecord::FixtureSet.identify(:tag2) %> + taggable: thing1 (Thing) + +thing2tag1: + tag_id: <%= ActiveRecord::FixtureSet.identify(:tag1) %> + taggable: thing2 (Thing) + +comment1tag1: + tag_id: <%= ActiveRecord::FixtureSet.identify(:tag1) %> + taggable: comment1 (Comment) diff --git a/test/fixtures/tags.yml b/test/fixtures/tags.yml new file mode 100644 index 0000000..1e0ce52 --- /dev/null +++ b/test/fixtures/tags.yml @@ -0,0 +1,5 @@ +tag1: + name: 'tag1' + +tag2: + name: 'tag2' diff --git a/test/fixtures/things.yml b/test/fixtures/things.yml new file mode 100644 index 0000000..069cf85 --- /dev/null +++ b/test/fixtures/things.yml @@ -0,0 +1,39 @@ +thing1: + target: 'target1' + title: 'This is a title 1' + publisher: 'Publisher 1' + authors: 'Miquel Sabaté, John Smith, Nom cognom1 cognom2, Nom _cognom3 cognom4_' + editors: false + address: + year: 2024 + url: 'http://example.com' + location: 'Somewhere' + insideof: 'Some other thing' + pages: '22-24' + note: 'This is a note 1' + rate: 5 + status: <%= Thing.statuses[:read] %> + kind: <%= Thing.kinds[:novel] %> + access: 2024-02-24 17:24:12 + bought_at: 2024-02-24 17:24:12 + user_id: <%= ActiveRecord::FixtureSet.identify(:user) %> + +thing2: + target: 'target2' + title: 'This is a 2' + publisher: 'Publisher 2' + authors: 'Miquel Sabaté, Nom' + editors: true + address: 'Address 2' + year: 2024 + url: 'http://example.com' + location: 'Somewhere' + insideof: 'Some other thing' + pages: '22-24' + note: 'This is a note 2' + rate: 8 + status: <%= Thing.statuses[:read] %> + kind: <%= Thing.kinds[:poetry] %> + access: 2024-02-24 17:24:12 + bought_at: 2024-02-24 17:24:12 + user_id: <%= ActiveRecord::FixtureSet.identify(:user) %> diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml new file mode 100644 index 0000000..66baf92 --- /dev/null +++ b/test/fixtures/users.yml @@ -0,0 +1,4 @@ +user: + username: user + password_digest: <%= BCrypt::Password.create("12341234", cost: 4) %> + last_search_id: null -- cgit v1.2.3