aboutsummaryrefslogtreecommitdiff
path: root/test/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixtures')
-rw-r--r--test/fixtures/action_text/rich_texts.yml4
-rw-r--r--test/fixtures/comments.yml2
-rw-r--r--test/fixtures/files/all.uoc.tex9
-rw-r--r--test/fixtures/searches.yml4
-rw-r--r--test/fixtures/tag_references.yml15
-rw-r--r--test/fixtures/tags.yml5
-rw-r--r--test/fixtures/things.yml39
-rw-r--r--test/fixtures/users.yml4
8 files changed, 82 insertions, 0 deletions
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: <p>Such awesome content from Miquel</p>
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