large_text_field 1.0.1 → 1.0.2.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/large_text_field/owner.rb +2 -2
- data/lib/large_text_field/version.rb +1 -1
- data/test/dummy/config/database.yml +12 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +10 -9
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +39 -0
- data/test/dummy/log/test.log +2893 -0
- data/test/reports/TEST-LargeTextField-LibraryTest.xml +9 -0
- data/test/reports/TEST-LargeTextField-NamedTextValueTest.xml +15 -0
- data/test/reports/TEST-LargeTextField-OwnerTest.xml +53 -0
- data/test/reports/TEST-LargeTextFieldTest.xml +7 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/large_text_field/owner_test.rb +4 -0
- metadata +19 -7
data/test/dummy/log/test.log
CHANGED
@@ -0,0 +1,2893 @@
|
|
1
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
+
Migrating to AddLargeTextFields (20110217210640)
|
6
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)
|
8
|
+
[1m[36m (0.1ms)[0m [1mCREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")[0m
|
9
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110217210640"]]
|
10
|
+
[1m[36m (2.7ms)[0m [1mcommit transaction[0m
|
11
|
+
Migrating to CreateLibraries (20160217033529)
|
12
|
+
[1m[35m (0.0ms)[0m begin transaction
|
13
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL) [0m
|
14
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160217033529"]]
|
15
|
+
[1m[36m (1.5ms)[0m [1mcommit transaction[0m
|
16
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
17
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
18
|
+
FROM sqlite_master
|
19
|
+
WHERE name='large_text_field_by_owner_field' AND type='index'
|
20
|
+
UNION ALL
|
21
|
+
SELECT sql
|
22
|
+
FROM sqlite_temp_master
|
23
|
+
WHERE name='large_text_field_by_owner_field' AND type='index'
|
24
|
+
[0m
|
25
|
+
[1m[36m (1.4ms)[0m [1mDROP TABLE "large_text_fields"[0m
|
26
|
+
[1m[35m (1.4ms)[0m CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)
|
27
|
+
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
28
|
+
[1m[35m (1.2ms)[0m CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
|
29
|
+
[1m[36m (1.2ms)[0m [1mDROP TABLE "libraries"[0m
|
30
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
|
31
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
32
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
33
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
34
|
+
[1m[35m (0.1ms)[0m begin transaction
|
35
|
+
--------------------------------------------------------------------------------------------------
|
36
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
37
|
+
--------------------------------------------------------------------------------------------------
|
38
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
39
|
+
[1m[35m (0.0ms)[0m begin transaction
|
40
|
+
-----------------------------------------------------------------------------------------------------------------------
|
41
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
42
|
+
-----------------------------------------------------------------------------------------------------------------------
|
43
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
44
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
45
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
46
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
47
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
48
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
49
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 1]]
|
50
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
51
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
52
|
+
[1m[35m (0.1ms)[0m begin transaction
|
53
|
+
--------------------------------------------------------------------------------------------------------------------------
|
54
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
55
|
+
--------------------------------------------------------------------------------------------------------------------------
|
56
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
57
|
+
[1m[35m (0.0ms)[0m begin transaction
|
58
|
+
-------------------------------------------------------------------------------------------------------
|
59
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
60
|
+
-------------------------------------------------------------------------------------------------------
|
61
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
62
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
63
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
64
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
65
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
66
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
67
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
68
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
69
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
70
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
71
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
72
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
73
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
74
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
75
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
76
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
77
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
78
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
79
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
80
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
81
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
82
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
83
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
84
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
85
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
86
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
87
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
88
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
89
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
90
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
91
|
+
[1m[35m (0.0ms)[0m begin transaction
|
92
|
+
---------------------------------------------------------------------------------------------------
|
93
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
94
|
+
---------------------------------------------------------------------------------------------------
|
95
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
96
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
|
97
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
98
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
99
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
|
100
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
101
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
102
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
103
|
+
[1m[36m (1.1ms)[0m [1mrollback transaction[0m
|
104
|
+
[1m[35m (0.0ms)[0m begin transaction
|
105
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
106
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
107
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
108
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
109
|
+
[1m[35m (0.0ms)[0m begin transaction
|
110
|
+
----------------------------------------------------------------------------------------------------------
|
111
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
112
|
+
----------------------------------------------------------------------------------------------------------
|
113
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
114
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
115
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
116
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
117
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
118
|
+
---------------------------------------------------------------------------------------------------
|
119
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
120
|
+
---------------------------------------------------------------------------------------------------
|
121
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
122
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
123
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
124
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
125
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
126
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
127
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
128
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
129
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
130
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
131
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
132
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
133
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
134
|
+
[1m[36m (1.1ms)[0m [1mrollback transaction[0m
|
135
|
+
[1m[35m (0.0ms)[0m begin transaction
|
136
|
+
------------------------------------------------------------------------------------------------------
|
137
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
138
|
+
------------------------------------------------------------------------------------------------------
|
139
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
140
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
141
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
142
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
143
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
144
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
145
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
146
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
147
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
148
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
149
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
150
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
151
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
152
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
153
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
154
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
155
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
156
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
157
|
+
[1m[36m (1.2ms)[0m [1mrollback transaction[0m
|
158
|
+
[1m[35m (0.1ms)[0m begin transaction
|
159
|
+
----------------------------------------------------------------------------------------
|
160
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
161
|
+
----------------------------------------------------------------------------------------
|
162
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
163
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
164
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
165
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
166
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
167
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
168
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
169
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
170
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
171
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
172
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
173
|
+
----------------------------------------------------------------------------------------------
|
174
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
175
|
+
----------------------------------------------------------------------------------------------
|
176
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
177
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
178
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
179
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
180
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
181
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
182
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
183
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
184
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
185
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
186
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
187
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
188
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
189
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
190
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
191
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
192
|
+
[1m[35m (0.1ms)[0m begin transaction
|
193
|
+
---------------------------------------------------------------------------------------------------
|
194
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
195
|
+
---------------------------------------------------------------------------------------------------
|
196
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
197
|
+
[1m[35mSQL (7.5ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
198
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
199
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
200
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
201
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
202
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
203
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
204
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
205
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
206
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
207
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
208
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
209
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
210
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
211
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
212
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
213
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
214
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
215
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
216
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
217
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
218
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
219
|
+
[1m[35m (33.4ms)[0m rollback transaction
|
220
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
221
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
222
|
+
LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
|
223
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
224
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
225
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
226
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
227
|
+
[1m[36m (8.8ms)[0m [1mrollback transaction[0m
|
228
|
+
[1m[35m (0.1ms)[0m begin transaction
|
229
|
+
------------------------------------------------------------------------------------------------------
|
230
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
231
|
+
------------------------------------------------------------------------------------------------------
|
232
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
233
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
234
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
235
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
236
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
237
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
238
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
239
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
240
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
241
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
242
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
243
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
244
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
245
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
246
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
247
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
248
|
+
[1m[36m (1.2ms)[0m [1mrollback transaction[0m
|
249
|
+
[1m[35m (0.1ms)[0m begin transaction
|
250
|
+
------------------------------------------------------------------------------------------------------------------
|
251
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
252
|
+
------------------------------------------------------------------------------------------------------------------
|
253
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
254
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
255
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
256
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
257
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
258
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
259
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
260
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
261
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
262
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
263
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
264
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
265
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
266
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
267
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
268
|
+
[1m[35m (0.0ms)[0m begin transaction
|
269
|
+
--------------------------------------------------------------------------------------------------------------------
|
270
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
271
|
+
--------------------------------------------------------------------------------------------------------------------
|
272
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
273
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
274
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
275
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
276
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
277
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
278
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
279
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
280
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
281
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
282
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
283
|
+
--------------------------------------------------------------------------------------------------------
|
284
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
285
|
+
--------------------------------------------------------------------------------------------------------
|
286
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
287
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
288
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
289
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
290
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
291
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
292
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
293
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
294
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
295
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
296
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
297
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
298
|
+
[1m[35m (3.2ms)[0m rollback transaction
|
299
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
300
|
+
---------------------------------------------------------------------------------------------------
|
301
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
302
|
+
---------------------------------------------------------------------------------------------------
|
303
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
304
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
305
|
+
[1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
|
306
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
307
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
308
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
309
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
310
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
311
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
312
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
313
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
314
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
315
|
+
-------------------------------------------------------------------------------------------------------
|
316
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
317
|
+
-------------------------------------------------------------------------------------------------------
|
318
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
319
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
320
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
321
|
+
[1m[36m (1.2ms)[0m [1mrollback transaction[0m
|
322
|
+
[1m[35m (0.1ms)[0m begin transaction
|
323
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
324
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
325
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
326
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
327
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
328
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
329
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
330
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
331
|
+
-----------------------------------------------------------------------------------------------------------------------
|
332
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
333
|
+
-----------------------------------------------------------------------------------------------------------------------
|
334
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
335
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
336
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
337
|
+
[1m[36m (1.2ms)[0m [1mrollback transaction[0m
|
338
|
+
[1m[35m (0.1ms)[0m begin transaction
|
339
|
+
------------------------------------------------------------------------------
|
340
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
341
|
+
------------------------------------------------------------------------------
|
342
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
343
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
344
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
345
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
346
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
347
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
348
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
349
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
350
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
351
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
352
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
353
|
+
[1m[35m (1.2ms)[0m rollback transaction
|
354
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
355
|
+
------------------------------------------------------------------------------------------------------------------
|
356
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
357
|
+
------------------------------------------------------------------------------------------------------------------
|
358
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
359
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
360
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
361
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
362
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
363
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
364
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
365
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
366
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
367
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
368
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
369
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
370
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
371
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
372
|
+
[1m[35m (1.2ms)[0m rollback transaction
|
373
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
374
|
+
-------------------------------------------------------------------------------------------------
|
375
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
376
|
+
-------------------------------------------------------------------------------------------------
|
377
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
378
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
379
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
380
|
+
[1m[36m (1.2ms)[0m [1mrollback transaction[0m
|
381
|
+
[1m[35m (0.1ms)[0m begin transaction
|
382
|
+
------------------------------------------------------------------------------------------------------------
|
383
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
384
|
+
------------------------------------------------------------------------------------------------------------
|
385
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
386
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
387
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
388
|
+
[1m[35m (1.2ms)[0m rollback transaction
|
389
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
390
|
+
-----------------------------------------------------------------------------------------
|
391
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
392
|
+
-----------------------------------------------------------------------------------------
|
393
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
394
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
395
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
396
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
397
|
+
[1m[35m (0.1ms)[0m begin transaction
|
398
|
+
----------------------------------------------------------------------------------------------------------------
|
399
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
400
|
+
----------------------------------------------------------------------------------------------------------------
|
401
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
402
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
403
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
404
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
405
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
406
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
407
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
408
|
+
--------------------------------------------------------------------------------------------------------------------
|
409
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
410
|
+
--------------------------------------------------------------------------------------------------------------------
|
411
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
412
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
413
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
414
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
415
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
416
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
417
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
418
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
419
|
+
-----------------------------------------------------------------------------------------------------------------
|
420
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
421
|
+
-----------------------------------------------------------------------------------------------------------------
|
422
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
423
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
424
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
425
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
426
|
+
------------------------------
|
427
|
+
LargeTextFieldTest: test_truth
|
428
|
+
------------------------------
|
429
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
430
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
431
|
+
[1m[35m (0.1ms)[0m begin transaction
|
432
|
+
------------------------------
|
433
|
+
LargeTextFieldTest: test_truth
|
434
|
+
------------------------------
|
435
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
436
|
+
[1m[35m (0.0ms)[0m begin transaction
|
437
|
+
----------------------------------------------------------------------------------------------------------
|
438
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
439
|
+
----------------------------------------------------------------------------------------------------------
|
440
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
441
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
442
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
443
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
444
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
445
|
+
---------------------------------------------------------------------------------------------------
|
446
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
447
|
+
---------------------------------------------------------------------------------------------------
|
448
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
449
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
450
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
451
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
452
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
453
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
454
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
455
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
456
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
457
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
458
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
459
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
460
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
461
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
462
|
+
[1m[35m (0.0ms)[0m begin transaction
|
463
|
+
------------------------------------------------------------------------------------------------------
|
464
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
465
|
+
------------------------------------------------------------------------------------------------------
|
466
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
467
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
468
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
469
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
470
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
471
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
472
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
473
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
474
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
475
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
476
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
477
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
478
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
479
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
480
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
481
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
482
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
483
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
484
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
485
|
+
[1m[35m (0.0ms)[0m begin transaction
|
486
|
+
----------------------------------------------------------------------------------------
|
487
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
488
|
+
----------------------------------------------------------------------------------------
|
489
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
490
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
491
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
492
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
493
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
494
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
495
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
496
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
497
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
498
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
499
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
500
|
+
----------------------------------------------------------------------------------------------
|
501
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
502
|
+
----------------------------------------------------------------------------------------------
|
503
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
504
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
505
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
506
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
507
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
508
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
509
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
510
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
511
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
512
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
513
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
514
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
515
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
516
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
517
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
518
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
519
|
+
[1m[35m (0.0ms)[0m begin transaction
|
520
|
+
---------------------------------------------------------------------------------------------------
|
521
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
522
|
+
---------------------------------------------------------------------------------------------------
|
523
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
524
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
525
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
526
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
527
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
528
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
529
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
530
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
531
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
532
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
533
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
534
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
535
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
536
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
537
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
538
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
539
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
540
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
541
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
542
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
543
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
544
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
545
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
546
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
547
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
548
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
549
|
+
LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
|
550
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
551
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
552
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
553
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
554
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
555
|
+
[1m[35m (0.0ms)[0m begin transaction
|
556
|
+
------------------------------------------------------------------------------------------------------
|
557
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
558
|
+
------------------------------------------------------------------------------------------------------
|
559
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
560
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
561
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
562
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
563
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
564
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
565
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
566
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
567
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
568
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
569
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
570
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
571
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
572
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
573
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
574
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
575
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
576
|
+
[1m[35m (0.0ms)[0m begin transaction
|
577
|
+
------------------------------------------------------------------------------------------------------------------
|
578
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
579
|
+
------------------------------------------------------------------------------------------------------------------
|
580
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
581
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
582
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
583
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
584
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
585
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
586
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
587
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
588
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
589
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
590
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
591
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
592
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
593
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
594
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
595
|
+
[1m[35m (0.0ms)[0m begin transaction
|
596
|
+
--------------------------------------------------------------------------------------------------------------------
|
597
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
598
|
+
--------------------------------------------------------------------------------------------------------------------
|
599
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
600
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
601
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
602
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
603
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
604
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
605
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
606
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
607
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
608
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
609
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
610
|
+
--------------------------------------------------------------------------------------------------------
|
611
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
612
|
+
--------------------------------------------------------------------------------------------------------
|
613
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
614
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
615
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
616
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
617
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
618
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
619
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
620
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
621
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
622
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
623
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
624
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
625
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
626
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
627
|
+
---------------------------------------------------------------------------------------------------
|
628
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
629
|
+
---------------------------------------------------------------------------------------------------
|
630
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
631
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
632
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
633
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
634
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
635
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
636
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
637
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
638
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
639
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
640
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
641
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
642
|
+
-------------------------------------------------------------------------------------------------------
|
643
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
644
|
+
-------------------------------------------------------------------------------------------------------
|
645
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
646
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
647
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
648
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
649
|
+
[1m[35m (0.0ms)[0m begin transaction
|
650
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
651
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
652
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
653
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
654
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
655
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
656
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
657
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
658
|
+
-----------------------------------------------------------------------------------------------------------------------
|
659
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
660
|
+
-----------------------------------------------------------------------------------------------------------------------
|
661
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
662
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
663
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
664
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
665
|
+
[1m[35m (0.0ms)[0m begin transaction
|
666
|
+
------------------------------------------------------------------------------
|
667
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
668
|
+
------------------------------------------------------------------------------
|
669
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
670
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
671
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
672
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
673
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
674
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
675
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
676
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
677
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
678
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
679
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
680
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
681
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
682
|
+
------------------------------------------------------------------------------------------------------------------
|
683
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
684
|
+
------------------------------------------------------------------------------------------------------------------
|
685
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
686
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
687
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
688
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
689
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
690
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
691
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
692
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
693
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
694
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
695
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
696
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
697
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
698
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
699
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
700
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
701
|
+
-------------------------------------------------------------------------------------------------
|
702
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
703
|
+
-------------------------------------------------------------------------------------------------
|
704
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
705
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
706
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
707
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
708
|
+
[1m[35m (0.0ms)[0m begin transaction
|
709
|
+
------------------------------------------------------------------------------------------------------------
|
710
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
711
|
+
------------------------------------------------------------------------------------------------------------
|
712
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
713
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
714
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
715
|
+
[1m[35m (2.2ms)[0m rollback transaction
|
716
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
717
|
+
-----------------------------------------------------------------------------------------
|
718
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
719
|
+
-----------------------------------------------------------------------------------------
|
720
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
721
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
722
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
723
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
724
|
+
[1m[35m (0.1ms)[0m begin transaction
|
725
|
+
----------------------------------------------------------------------------------------------------------------
|
726
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
727
|
+
----------------------------------------------------------------------------------------------------------------
|
728
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
729
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
730
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
731
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
732
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
733
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
734
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
735
|
+
--------------------------------------------------------------------------------------------------------------------
|
736
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
737
|
+
--------------------------------------------------------------------------------------------------------------------
|
738
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
739
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
740
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
741
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
742
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
743
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
744
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
745
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
746
|
+
-----------------------------------------------------------------------------------------------------------------
|
747
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
748
|
+
-----------------------------------------------------------------------------------------------------------------
|
749
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
750
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
751
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
752
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
753
|
+
---------------------------------------------------------------------------------------------------
|
754
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
755
|
+
---------------------------------------------------------------------------------------------------
|
756
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
757
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria Public Library"]]
|
758
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
759
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
760
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
761
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
|
762
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
763
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
764
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
765
|
+
[1m[36m (1.2ms)[0m [1mrollback transaction[0m
|
766
|
+
[1m[35m (0.1ms)[0m begin transaction
|
767
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
768
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
769
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
770
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
771
|
+
[1m[35m (0.0ms)[0m begin transaction
|
772
|
+
--------------------------------------------------------------------------------------------------
|
773
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
774
|
+
--------------------------------------------------------------------------------------------------
|
775
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
776
|
+
[1m[35m (0.0ms)[0m begin transaction
|
777
|
+
-----------------------------------------------------------------------------------------------------------------------
|
778
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
779
|
+
-----------------------------------------------------------------------------------------------------------------------
|
780
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
781
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
782
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
783
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
784
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
785
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
786
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
787
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 2]]
|
788
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
789
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
790
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
791
|
+
--------------------------------------------------------------------------------------------------------------------------
|
792
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
793
|
+
--------------------------------------------------------------------------------------------------------------------------
|
794
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
795
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
796
|
+
-------------------------------------------------------------------------------------------------------
|
797
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
798
|
+
-------------------------------------------------------------------------------------------------------
|
799
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
800
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
801
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
802
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
803
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
804
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
805
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 2]]
|
806
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
807
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
808
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
809
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
810
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
811
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
812
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
813
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
814
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
815
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
816
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
817
|
+
[1m[35m (0.0ms)[0m begin transaction
|
818
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
819
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
820
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
821
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
822
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
823
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
824
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
825
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
826
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
827
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
828
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
829
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
830
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
831
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
832
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
833
|
+
[1m[35m (0.1ms)[0m begin transaction
|
834
|
+
--------------------------------------------------------------------------------------------------
|
835
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
836
|
+
--------------------------------------------------------------------------------------------------
|
837
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
838
|
+
[1m[35m (0.0ms)[0m begin transaction
|
839
|
+
-----------------------------------------------------------------------------------------------------------------------
|
840
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
841
|
+
-----------------------------------------------------------------------------------------------------------------------
|
842
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
843
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
844
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
845
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
846
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
847
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
848
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 1]]
|
849
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
850
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
851
|
+
[1m[35m (0.0ms)[0m begin transaction
|
852
|
+
--------------------------------------------------------------------------------------------------------------------------
|
853
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
854
|
+
--------------------------------------------------------------------------------------------------------------------------
|
855
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
856
|
+
[1m[35m (0.0ms)[0m begin transaction
|
857
|
+
-------------------------------------------------------------------------------------------------------
|
858
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
859
|
+
-------------------------------------------------------------------------------------------------------
|
860
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
861
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
862
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
863
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
864
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
865
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
866
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
867
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
868
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
869
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
870
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
871
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
872
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
873
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
874
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
875
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
876
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
877
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
878
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
879
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
880
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
881
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
882
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
883
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
884
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
885
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
886
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
887
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
888
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
889
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
890
|
+
[1m[35m (0.0ms)[0m begin transaction
|
891
|
+
---------------------------------------------------------------------------------------------------
|
892
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
893
|
+
---------------------------------------------------------------------------------------------------
|
894
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
895
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
|
896
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
897
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
898
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
|
899
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
900
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
901
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
902
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
903
|
+
[1m[35m (0.0ms)[0m begin transaction
|
904
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
905
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
906
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
907
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
908
|
+
[1m[35m (0.0ms)[0m begin transaction
|
909
|
+
----------------------------------------------------------------------------------------------------------
|
910
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
911
|
+
----------------------------------------------------------------------------------------------------------
|
912
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
913
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
914
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
915
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
916
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
917
|
+
---------------------------------------------------------------------------------------------------
|
918
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
919
|
+
---------------------------------------------------------------------------------------------------
|
920
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
921
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
922
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
923
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
924
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
925
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
926
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
927
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
928
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
929
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
930
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
931
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
932
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
933
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
934
|
+
[1m[35m (0.0ms)[0m begin transaction
|
935
|
+
------------------------------------------------------------------------------------------------------
|
936
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
937
|
+
------------------------------------------------------------------------------------------------------
|
938
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
939
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
940
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
941
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
942
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
943
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
944
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
945
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
946
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
947
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
948
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
949
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
950
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
951
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
952
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
953
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
954
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
955
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
956
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
957
|
+
[1m[35m (0.0ms)[0m begin transaction
|
958
|
+
----------------------------------------------------------------------------------------
|
959
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
960
|
+
----------------------------------------------------------------------------------------
|
961
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
962
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
963
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
964
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
965
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
966
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
967
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
968
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
969
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
970
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
971
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
972
|
+
----------------------------------------------------------------------------------------------
|
973
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
974
|
+
----------------------------------------------------------------------------------------------
|
975
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
976
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
977
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
978
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
979
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
980
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
981
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
982
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
983
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
984
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
985
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
986
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
987
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
988
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
989
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
990
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
991
|
+
[1m[35m (0.0ms)[0m begin transaction
|
992
|
+
---------------------------------------------------------------------------------------------------
|
993
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
994
|
+
---------------------------------------------------------------------------------------------------
|
995
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
996
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
997
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
998
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
999
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1000
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
1001
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1002
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1003
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1004
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
1005
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
1006
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1007
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1008
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1009
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1010
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1011
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1012
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
1013
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
1014
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
1015
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1016
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
1017
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
1018
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1019
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1020
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
1021
|
+
LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
|
1022
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
1023
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1024
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1025
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1026
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1027
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1028
|
+
------------------------------------------------------------------------------------------------------
|
1029
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
1030
|
+
------------------------------------------------------------------------------------------------------
|
1031
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1032
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1033
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1034
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1035
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1036
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1037
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1038
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1039
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1040
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1041
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1042
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
1043
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1044
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1045
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1046
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1047
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
1048
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1049
|
+
------------------------------------------------------------------------------------------------------------------
|
1050
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
1051
|
+
------------------------------------------------------------------------------------------------------------------
|
1052
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1053
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1054
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1055
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
1056
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1057
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
1058
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
1059
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1060
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
1061
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1062
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
1063
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
1064
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1065
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
1066
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
1067
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1068
|
+
--------------------------------------------------------------------------------------------------------------------
|
1069
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
1070
|
+
--------------------------------------------------------------------------------------------------------------------
|
1071
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1072
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1073
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1074
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1075
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1076
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
1077
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1078
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1079
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1080
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1081
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1082
|
+
--------------------------------------------------------------------------------------------------------
|
1083
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
1084
|
+
--------------------------------------------------------------------------------------------------------
|
1085
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1086
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1087
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1088
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1089
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1090
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1091
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1092
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1093
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1094
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1095
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1096
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1097
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1098
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1099
|
+
---------------------------------------------------------------------------------------------------
|
1100
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
1101
|
+
---------------------------------------------------------------------------------------------------
|
1102
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1103
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1104
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1105
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1106
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
1107
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
1108
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1109
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
1110
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
1111
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1112
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1113
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1114
|
+
-------------------------------------------------------------------------------------------------------
|
1115
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
1116
|
+
-------------------------------------------------------------------------------------------------------
|
1117
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1118
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1119
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1120
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
1121
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1122
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
1123
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
1124
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
1125
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1126
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1127
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1128
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1129
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1130
|
+
-----------------------------------------------------------------------------------------------------------------------
|
1131
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
1132
|
+
-----------------------------------------------------------------------------------------------------------------------
|
1133
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1134
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1135
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1136
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1137
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1138
|
+
------------------------------------------------------------------------------
|
1139
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
1140
|
+
------------------------------------------------------------------------------
|
1141
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1142
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1143
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1144
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1145
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1146
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1147
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1148
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
1149
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1150
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1151
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1152
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1153
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1154
|
+
------------------------------------------------------------------------------------------------------------------
|
1155
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
1156
|
+
------------------------------------------------------------------------------------------------------------------
|
1157
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1158
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1159
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1160
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1161
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
1162
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
1163
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1164
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
1165
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1166
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1167
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
1168
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1169
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1170
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1171
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1172
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1173
|
+
-------------------------------------------------------------------------------------------------
|
1174
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
1175
|
+
-------------------------------------------------------------------------------------------------
|
1176
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1177
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1178
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1179
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
1180
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1181
|
+
------------------------------------------------------------------------------------------------------------
|
1182
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
1183
|
+
------------------------------------------------------------------------------------------------------------
|
1184
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1185
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1186
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1187
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1188
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1189
|
+
-----------------------------------------------------------------------------------------
|
1190
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
1191
|
+
-----------------------------------------------------------------------------------------
|
1192
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1193
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1194
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1195
|
+
[1m[36m (1.8ms)[0m [1mrollback transaction[0m
|
1196
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1197
|
+
----------------------------------------------------------------------------------------------------------------
|
1198
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
1199
|
+
----------------------------------------------------------------------------------------------------------------
|
1200
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1201
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1202
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1203
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1204
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1205
|
+
[1m[35m (2.9ms)[0m rollback transaction
|
1206
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1207
|
+
--------------------------------------------------------------------------------------------------------------------
|
1208
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
1209
|
+
--------------------------------------------------------------------------------------------------------------------
|
1210
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1211
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1212
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
1213
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1214
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1215
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1216
|
+
[1m[35m (2.8ms)[0m rollback transaction
|
1217
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1218
|
+
-----------------------------------------------------------------------------------------------------------------
|
1219
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
1220
|
+
-----------------------------------------------------------------------------------------------------------------
|
1221
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1222
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1223
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1224
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1225
|
+
------------------------------
|
1226
|
+
LargeTextFieldTest: test_truth
|
1227
|
+
------------------------------
|
1228
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1229
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1230
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1231
|
+
--------------------------------------------------------------------------------------------------
|
1232
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
1233
|
+
--------------------------------------------------------------------------------------------------
|
1234
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1235
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1236
|
+
-----------------------------------------------------------------------------------------------------------------------
|
1237
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
1238
|
+
-----------------------------------------------------------------------------------------------------------------------
|
1239
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1240
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1241
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1242
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1243
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
1244
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1245
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 1]]
|
1246
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1247
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
1248
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1249
|
+
--------------------------------------------------------------------------------------------------------------------------
|
1250
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
1251
|
+
--------------------------------------------------------------------------------------------------------------------------
|
1252
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1253
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1254
|
+
-------------------------------------------------------------------------------------------------------
|
1255
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
1256
|
+
-------------------------------------------------------------------------------------------------------
|
1257
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1258
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1259
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1260
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1261
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
1262
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1263
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1264
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
1265
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1266
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1267
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
1268
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1269
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1270
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
1271
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1272
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1273
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1274
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
1275
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
1276
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
1277
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1278
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1279
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1280
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1281
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
1282
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1283
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1284
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
1285
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
1286
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1287
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1288
|
+
------------------------------
|
1289
|
+
LargeTextFieldTest: test_truth
|
1290
|
+
------------------------------
|
1291
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1292
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1293
|
+
----------------------------------------------------------------------------------------------------------
|
1294
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
1295
|
+
----------------------------------------------------------------------------------------------------------
|
1296
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1297
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1298
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1299
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1300
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1301
|
+
---------------------------------------------------------------------------------------------------
|
1302
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
1303
|
+
---------------------------------------------------------------------------------------------------
|
1304
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1305
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1306
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1307
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1308
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1309
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
1310
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1311
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1312
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1313
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1314
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
1315
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
1316
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1317
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1318
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1319
|
+
------------------------------------------------------------------------------------------------------
|
1320
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
1321
|
+
------------------------------------------------------------------------------------------------------
|
1322
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1323
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1324
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1325
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1326
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
1327
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1328
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1329
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1330
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1331
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
1332
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1333
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1334
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1335
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1336
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
1337
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1338
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1339
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1340
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1341
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1342
|
+
----------------------------------------------------------------------------------------
|
1343
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
1344
|
+
----------------------------------------------------------------------------------------
|
1345
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1346
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1347
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1348
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1349
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1350
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
1351
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1352
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1353
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
1354
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1355
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1356
|
+
----------------------------------------------------------------------------------------------
|
1357
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
1358
|
+
----------------------------------------------------------------------------------------------
|
1359
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1360
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1361
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1362
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1363
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1364
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1365
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1366
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1367
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1368
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
1369
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1370
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1371
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1372
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1373
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1374
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1375
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1376
|
+
---------------------------------------------------------------------------------------------------
|
1377
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
1378
|
+
---------------------------------------------------------------------------------------------------
|
1379
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1380
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1381
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1382
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1383
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1384
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
1385
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1386
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1387
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1388
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
1389
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
1390
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1391
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1392
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1393
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1394
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1395
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1396
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
1397
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
1398
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
1399
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1400
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
1401
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
1402
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1403
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1404
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
1405
|
+
LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
|
1406
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
1407
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1408
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1409
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1410
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
1411
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1412
|
+
------------------------------------------------------------------------------------------------------
|
1413
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
1414
|
+
------------------------------------------------------------------------------------------------------
|
1415
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1416
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1417
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1418
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1419
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1420
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1421
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1422
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1423
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1424
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1425
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1426
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
1427
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1428
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1429
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1430
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1431
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1432
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1433
|
+
------------------------------------------------------------------------------------------------------------------
|
1434
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
1435
|
+
------------------------------------------------------------------------------------------------------------------
|
1436
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1437
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1438
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1439
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
1440
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1441
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
1442
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
1443
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1444
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
1445
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1446
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
1447
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
1448
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1449
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
1450
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1451
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1452
|
+
--------------------------------------------------------------------------------------------------------------------
|
1453
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
1454
|
+
--------------------------------------------------------------------------------------------------------------------
|
1455
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1456
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1457
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1458
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1459
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1460
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
1461
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1462
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1463
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1464
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1465
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1466
|
+
--------------------------------------------------------------------------------------------------------
|
1467
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
1468
|
+
--------------------------------------------------------------------------------------------------------
|
1469
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1470
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1471
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1472
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1473
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1474
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1475
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1476
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1477
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1478
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1479
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1480
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1481
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
1482
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1483
|
+
---------------------------------------------------------------------------------------------------
|
1484
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
1485
|
+
---------------------------------------------------------------------------------------------------
|
1486
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1487
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1488
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1489
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1490
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
1491
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
1492
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1493
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
1494
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
1495
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1496
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1497
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1498
|
+
-------------------------------------------------------------------------------------------------------
|
1499
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
1500
|
+
-------------------------------------------------------------------------------------------------------
|
1501
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1502
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1503
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1504
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1505
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1506
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
1507
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
1508
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
1509
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1510
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1511
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1512
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1513
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1514
|
+
-----------------------------------------------------------------------------------------------------------------------
|
1515
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
1516
|
+
-----------------------------------------------------------------------------------------------------------------------
|
1517
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1518
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1519
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1520
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1521
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1522
|
+
------------------------------------------------------------------------------
|
1523
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
1524
|
+
------------------------------------------------------------------------------
|
1525
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1526
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1527
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1528
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1529
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1530
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1531
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1532
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
1533
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1534
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1535
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1536
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1537
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1538
|
+
------------------------------------------------------------------------------------------------------------------
|
1539
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
1540
|
+
------------------------------------------------------------------------------------------------------------------
|
1541
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1542
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1543
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1544
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1545
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
1546
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
1547
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1548
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
1549
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1550
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1551
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
1552
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1553
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1554
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1555
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1556
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1557
|
+
-------------------------------------------------------------------------------------------------
|
1558
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
1559
|
+
-------------------------------------------------------------------------------------------------
|
1560
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1561
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1562
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1563
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
1564
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1565
|
+
------------------------------------------------------------------------------------------------------------
|
1566
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
1567
|
+
------------------------------------------------------------------------------------------------------------
|
1568
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1569
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1570
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1571
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1572
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1573
|
+
-----------------------------------------------------------------------------------------
|
1574
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
1575
|
+
-----------------------------------------------------------------------------------------
|
1576
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1577
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1578
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1579
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
1580
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1581
|
+
----------------------------------------------------------------------------------------------------------------
|
1582
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
1583
|
+
----------------------------------------------------------------------------------------------------------------
|
1584
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1585
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1586
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1587
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1588
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1589
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1590
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1591
|
+
--------------------------------------------------------------------------------------------------------------------
|
1592
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
1593
|
+
--------------------------------------------------------------------------------------------------------------------
|
1594
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1595
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1596
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
1597
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1598
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1599
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1600
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1601
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1602
|
+
-----------------------------------------------------------------------------------------------------------------
|
1603
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
1604
|
+
-----------------------------------------------------------------------------------------------------------------
|
1605
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1606
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1607
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1608
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1609
|
+
---------------------------------------------------------------------------------------------------
|
1610
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
1611
|
+
---------------------------------------------------------------------------------------------------
|
1612
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1613
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria Public Library"]]
|
1614
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
1615
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1616
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1617
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
|
1618
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1619
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1620
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1621
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
1622
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1623
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
1624
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
1625
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
1626
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
1627
|
+
[1m[36m (63.6ms)[0m [1mCREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
1628
|
+
[1m[35m (28.3ms)[0m CREATE UNIQUE INDEX `large_text_field_by_owner_field` ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`)
|
1629
|
+
[1m[36m (14.4ms)[0m [1mCREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
1630
|
+
[1m[35m (14.6ms)[0m CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
|
1631
|
+
[1m[36m (25.4ms)[0m [1mCREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) [0m
|
1632
|
+
[1m[35m (1.0ms)[0m SELECT version FROM `schema_migrations`
|
1633
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20160217033529')[0m
|
1634
|
+
[1m[35m (1.3ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20110217210640')
|
1635
|
+
[1m[36mActiveRecord::SchemaMigration Load (3.1ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
1636
|
+
[1m[36m (13.5ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
1637
|
+
[1m[35m (29.8ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
1638
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
1639
|
+
Migrating to AddLargeTextFields (20110217210640)
|
1640
|
+
[1m[35m (25.8ms)[0m CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB
|
1641
|
+
[1m[36m (15.0ms)[0m [1mCREATE UNIQUE INDEX `large_text_field_by_owner_field` ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) [0m
|
1642
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1643
|
+
[1m[36mSQL (3.1ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20110217210640')[0m
|
1644
|
+
[1m[35m (0.4ms)[0m COMMIT
|
1645
|
+
Migrating to CreateLibraries (20160217033529)
|
1646
|
+
[1m[36m (15.7ms)[0m [1mCREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
1647
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1648
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO `schema_migrations` (`version`) VALUES ('20160217033529')[0m
|
1649
|
+
[1m[35m (0.3ms)[0m COMMIT
|
1650
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
1651
|
+
[1m[35m (0.3ms)[0m SELECT fk.referenced_table_name as 'to_table'
|
1652
|
+
,fk.referenced_column_name as 'primary_key'
|
1653
|
+
,fk.column_name as 'column'
|
1654
|
+
,fk.constraint_name as 'name'
|
1655
|
+
FROM information_schema.key_column_usage fk
|
1656
|
+
WHERE fk.referenced_column_name is not null
|
1657
|
+
AND fk.table_schema = 'large_text_field_test'
|
1658
|
+
AND fk.table_name = 'large_text_fields'
|
1659
|
+
|
1660
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `large_text_fields`[0m
|
1661
|
+
[1m[35m (0.2ms)[0m SELECT fk.referenced_table_name as 'to_table'
|
1662
|
+
,fk.referenced_column_name as 'primary_key'
|
1663
|
+
,fk.column_name as 'column'
|
1664
|
+
,fk.constraint_name as 'name'
|
1665
|
+
FROM information_schema.key_column_usage fk
|
1666
|
+
WHERE fk.referenced_column_name is not null
|
1667
|
+
AND fk.table_schema = 'large_text_field_test'
|
1668
|
+
AND fk.table_name = 'libraries'
|
1669
|
+
|
1670
|
+
[1m[36m (0.1ms)[0m [1mSHOW CREATE TABLE `libraries`[0m
|
1671
|
+
[1m[36m (6.3ms)[0m [1mDROP TABLE `large_text_fields` CASCADE[0m
|
1672
|
+
[1m[35m (32.5ms)[0m CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB
|
1673
|
+
[1m[36m (20.9ms)[0m [1mCREATE UNIQUE INDEX `large_text_field_by_owner_field` USING btree ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) [0m
|
1674
|
+
[1m[35m (4.1ms)[0m DROP TABLE `libraries` CASCADE
|
1675
|
+
[1m[36m (12.3ms)[0m [1mCREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
1676
|
+
[1m[35m (3.0ms)[0m SELECT version FROM `schema_migrations`
|
1677
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
1678
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1679
|
+
[1m[35m (0.1ms)[0m begin transaction
|
1680
|
+
----------------------------------------------------------------------------------------------------------
|
1681
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
1682
|
+
----------------------------------------------------------------------------------------------------------
|
1683
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1684
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1685
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1686
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
1687
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1688
|
+
---------------------------------------------------------------------------------------------------
|
1689
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
1690
|
+
---------------------------------------------------------------------------------------------------
|
1691
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1692
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1693
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1694
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1695
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1696
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
1697
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1698
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1699
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1700
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1701
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
1702
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
1703
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1704
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
1705
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1706
|
+
------------------------------------------------------------------------------------------------------
|
1707
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
1708
|
+
------------------------------------------------------------------------------------------------------
|
1709
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1710
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1711
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1712
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1713
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
1714
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1715
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1716
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1717
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1718
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
1719
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1720
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1721
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1722
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1723
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
1724
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1725
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1726
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1727
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
1728
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1729
|
+
----------------------------------------------------------------------------------------
|
1730
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
1731
|
+
----------------------------------------------------------------------------------------
|
1732
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1733
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1734
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1735
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1736
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1737
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
1738
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1739
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1740
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
1741
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
1742
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1743
|
+
----------------------------------------------------------------------------------------------
|
1744
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
1745
|
+
----------------------------------------------------------------------------------------------
|
1746
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1747
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1748
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1749
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1750
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1751
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1752
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1753
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1754
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1755
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
1756
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1757
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1758
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1759
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1760
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1761
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
1762
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1763
|
+
---------------------------------------------------------------------------------------------------
|
1764
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
1765
|
+
---------------------------------------------------------------------------------------------------
|
1766
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1767
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1768
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1769
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1770
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1771
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
1772
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1773
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1774
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1775
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
1776
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
1777
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1778
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1779
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1780
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1781
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1782
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1783
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
1784
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
1785
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
1786
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1787
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
1788
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
1789
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
1790
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1791
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
1792
|
+
LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
|
1793
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
1794
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1795
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1796
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1797
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
1798
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1799
|
+
------------------------------------------------------------------------------------------------------
|
1800
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
1801
|
+
------------------------------------------------------------------------------------------------------
|
1802
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1803
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1804
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1805
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1806
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1807
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1808
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1809
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1810
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1811
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1812
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1813
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
1814
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1815
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1816
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1817
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1818
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
1819
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1820
|
+
------------------------------------------------------------------------------------------------------------------
|
1821
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
1822
|
+
------------------------------------------------------------------------------------------------------------------
|
1823
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1824
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1825
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1826
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
1827
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1828
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
1829
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
1830
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1831
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
1832
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1833
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
1834
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
1835
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1836
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
1837
|
+
[1m[36m (2.0ms)[0m [1mrollback transaction[0m
|
1838
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1839
|
+
--------------------------------------------------------------------------------------------------------------------
|
1840
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
1841
|
+
--------------------------------------------------------------------------------------------------------------------
|
1842
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1843
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1844
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1845
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1846
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1847
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
1848
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1849
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1850
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1851
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1852
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1853
|
+
--------------------------------------------------------------------------------------------------------
|
1854
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
1855
|
+
--------------------------------------------------------------------------------------------------------
|
1856
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1857
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1858
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1859
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
1860
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
1861
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1862
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
1863
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1864
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1865
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1866
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1867
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1868
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1869
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1870
|
+
---------------------------------------------------------------------------------------------------
|
1871
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
1872
|
+
---------------------------------------------------------------------------------------------------
|
1873
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1874
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1875
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1876
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1877
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
1878
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
1879
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1880
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
1881
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
1882
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1883
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1884
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1885
|
+
-------------------------------------------------------------------------------------------------------
|
1886
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
1887
|
+
-------------------------------------------------------------------------------------------------------
|
1888
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1889
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1890
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1891
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
1892
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1893
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
1894
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
1895
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
1896
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1897
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1898
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1899
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1900
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1901
|
+
-----------------------------------------------------------------------------------------------------------------------
|
1902
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
1903
|
+
-----------------------------------------------------------------------------------------------------------------------
|
1904
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1905
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1906
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1907
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
1908
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1909
|
+
------------------------------------------------------------------------------
|
1910
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
1911
|
+
------------------------------------------------------------------------------
|
1912
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1913
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1914
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1915
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1916
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1917
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1918
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1919
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
1920
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1921
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1922
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1923
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1924
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1925
|
+
------------------------------------------------------------------------------------------------------------------
|
1926
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
1927
|
+
------------------------------------------------------------------------------------------------------------------
|
1928
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1929
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1930
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1931
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1932
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
1933
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
1934
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1935
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
1936
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1937
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1938
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
1939
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1940
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
1941
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
1942
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1943
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1944
|
+
-------------------------------------------------------------------------------------------------
|
1945
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
1946
|
+
-------------------------------------------------------------------------------------------------
|
1947
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1948
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1949
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1950
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
1951
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1952
|
+
------------------------------------------------------------------------------------------------------------
|
1953
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
1954
|
+
------------------------------------------------------------------------------------------------------------
|
1955
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1956
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1957
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1958
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1959
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1960
|
+
-----------------------------------------------------------------------------------------
|
1961
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
1962
|
+
-----------------------------------------------------------------------------------------
|
1963
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1964
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1965
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1966
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
1967
|
+
[1m[35m (0.0ms)[0m begin transaction
|
1968
|
+
----------------------------------------------------------------------------------------------------------------
|
1969
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
1970
|
+
----------------------------------------------------------------------------------------------------------------
|
1971
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1972
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
1973
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1974
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1975
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1976
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
1977
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1978
|
+
--------------------------------------------------------------------------------------------------------------------
|
1979
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
1980
|
+
--------------------------------------------------------------------------------------------------------------------
|
1981
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1982
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
1983
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
1984
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1985
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
1986
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
1987
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
1988
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1989
|
+
-----------------------------------------------------------------------------------------------------------------
|
1990
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
1991
|
+
-----------------------------------------------------------------------------------------------------------------
|
1992
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1993
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
1994
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1995
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1996
|
+
------------------------------
|
1997
|
+
LargeTextFieldTest: test_truth
|
1998
|
+
------------------------------
|
1999
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2000
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2001
|
+
---------------------------------------------------------------------------------------------------
|
2002
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
2003
|
+
---------------------------------------------------------------------------------------------------
|
2004
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2005
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria Public Library"]]
|
2006
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
2007
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2008
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2009
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
|
2010
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2011
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2012
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2013
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2014
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2015
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
2016
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
2017
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
2018
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2019
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2020
|
+
--------------------------------------------------------------------------------------------------
|
2021
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
2022
|
+
--------------------------------------------------------------------------------------------------
|
2023
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2024
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2025
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2026
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
2027
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2028
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2029
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2030
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
2031
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2032
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2033
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2034
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2035
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 2]]
|
2036
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2037
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2038
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2039
|
+
--------------------------------------------------------------------------------------------------------------------------
|
2040
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
2041
|
+
--------------------------------------------------------------------------------------------------------------------------
|
2042
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2043
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2044
|
+
-------------------------------------------------------------------------------------------------------
|
2045
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
2046
|
+
-------------------------------------------------------------------------------------------------------
|
2047
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2048
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2049
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
2050
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2051
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2052
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
2053
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 2]]
|
2054
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2055
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2056
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2057
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2058
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2059
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
2060
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2061
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2062
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
2063
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2064
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2065
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2066
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
2067
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
2068
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
2069
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2070
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2071
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "notes"], ["value", "none_set"], ["owner_id", 1]]
|
2072
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2073
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2074
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2075
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2076
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2077
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
2078
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
2079
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2080
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2081
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2082
|
+
------------------------------
|
2083
|
+
LargeTextFieldTest: test_truth
|
2084
|
+
------------------------------
|
2085
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2086
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2087
|
+
---------------------------------------------------------------------------------------------------
|
2088
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
2089
|
+
---------------------------------------------------------------------------------------------------
|
2090
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2091
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
|
2092
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2093
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
2094
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
|
2095
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2096
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2097
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2098
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2099
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2100
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
2101
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
2102
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
2103
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2104
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2105
|
+
--------------------------------------------------------------------------------------------------
|
2106
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
2107
|
+
--------------------------------------------------------------------------------------------------
|
2108
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2109
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2110
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2111
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
2112
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2113
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2114
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2115
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2116
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2117
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2118
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2119
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 1]]
|
2120
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2121
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2122
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2123
|
+
--------------------------------------------------------------------------------------------------------------------------
|
2124
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
2125
|
+
--------------------------------------------------------------------------------------------------------------------------
|
2126
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2127
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2128
|
+
-------------------------------------------------------------------------------------------------------
|
2129
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
2130
|
+
-------------------------------------------------------------------------------------------------------
|
2131
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2132
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2133
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2134
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2135
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
2136
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2137
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2138
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2139
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2140
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2141
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
2142
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2143
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2144
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
2145
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2146
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2147
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2148
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
2149
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
2150
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
2151
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2152
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2153
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2154
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2155
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2156
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2157
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2158
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
2159
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
2160
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2161
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2162
|
+
----------------------------------------------------------------------------------------------------------
|
2163
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
2164
|
+
----------------------------------------------------------------------------------------------------------
|
2165
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2166
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2167
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2168
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
2169
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2170
|
+
---------------------------------------------------------------------------------------------------
|
2171
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
2172
|
+
---------------------------------------------------------------------------------------------------
|
2173
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2174
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2175
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2176
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2177
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2178
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
2179
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2180
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2181
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2182
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2183
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
2184
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
2185
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2186
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2187
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2188
|
+
------------------------------------------------------------------------------------------------------
|
2189
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
2190
|
+
------------------------------------------------------------------------------------------------------
|
2191
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2192
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2193
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2194
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2195
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
2196
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2197
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2198
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2199
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2200
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
2201
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2202
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2203
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2204
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2205
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
2206
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2207
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2208
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2209
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2210
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2211
|
+
----------------------------------------------------------------------------------------
|
2212
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
2213
|
+
----------------------------------------------------------------------------------------
|
2214
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2215
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2216
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2217
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2218
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2219
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
2220
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2221
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2222
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
2223
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
2224
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2225
|
+
----------------------------------------------------------------------------------------------
|
2226
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
2227
|
+
----------------------------------------------------------------------------------------------
|
2228
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2229
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2230
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2231
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2232
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2233
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2234
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2235
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2236
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2237
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
2238
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2239
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2240
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2241
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2242
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2243
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2244
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2245
|
+
---------------------------------------------------------------------------------------------------
|
2246
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
2247
|
+
---------------------------------------------------------------------------------------------------
|
2248
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2249
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2250
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2251
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2252
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2253
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
2254
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2255
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2256
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2257
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
2258
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
2259
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2260
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2261
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2262
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2263
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2264
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2265
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
2266
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
2267
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
2268
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2269
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
2270
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
2271
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2272
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2273
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
2274
|
+
LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
|
2275
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
2276
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2277
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2278
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2279
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2280
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2281
|
+
------------------------------------------------------------------------------------------------------
|
2282
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
2283
|
+
------------------------------------------------------------------------------------------------------
|
2284
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2285
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2286
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2287
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2288
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2289
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2290
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2291
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2292
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2293
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2294
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2295
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
2296
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2297
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2298
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2299
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2300
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2301
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2302
|
+
------------------------------------------------------------------------------------------------------------------
|
2303
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
2304
|
+
------------------------------------------------------------------------------------------------------------------
|
2305
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2306
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2307
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2308
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
2309
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2310
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
2311
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
2312
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2313
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
2314
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2315
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
2316
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
2317
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2318
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
2319
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2320
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2321
|
+
--------------------------------------------------------------------------------------------------------------------
|
2322
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
2323
|
+
--------------------------------------------------------------------------------------------------------------------
|
2324
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2325
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2326
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2327
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2328
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2329
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
2330
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2331
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
2332
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2333
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2334
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2335
|
+
--------------------------------------------------------------------------------------------------------
|
2336
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
2337
|
+
--------------------------------------------------------------------------------------------------------
|
2338
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2339
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2340
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2341
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2342
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2343
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2344
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2345
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2346
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2347
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2348
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2349
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2350
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2351
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2352
|
+
---------------------------------------------------------------------------------------------------
|
2353
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
2354
|
+
---------------------------------------------------------------------------------------------------
|
2355
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2356
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2357
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2358
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2359
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
2360
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
2361
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2362
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
2363
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
2364
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2365
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2366
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2367
|
+
-------------------------------------------------------------------------------------------------------
|
2368
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
2369
|
+
-------------------------------------------------------------------------------------------------------
|
2370
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2371
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2372
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2373
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2374
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2375
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
2376
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
2377
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
2378
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2379
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2380
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2381
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2382
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2383
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2384
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
2385
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2386
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2387
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2388
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2389
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2390
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2391
|
+
------------------------------------------------------------------------------
|
2392
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
2393
|
+
------------------------------------------------------------------------------
|
2394
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2395
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2396
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2397
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2398
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2399
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2400
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2401
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
2402
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2403
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
2404
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2405
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2406
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2407
|
+
------------------------------------------------------------------------------------------------------------------
|
2408
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
2409
|
+
------------------------------------------------------------------------------------------------------------------
|
2410
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2411
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2412
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2413
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2414
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
2415
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
2416
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2417
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
2418
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2419
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2420
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
2421
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2422
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
2423
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2424
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2425
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2426
|
+
-------------------------------------------------------------------------------------------------
|
2427
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
2428
|
+
-------------------------------------------------------------------------------------------------
|
2429
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2430
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2431
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2432
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2433
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2434
|
+
------------------------------------------------------------------------------------------------------------
|
2435
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
2436
|
+
------------------------------------------------------------------------------------------------------------
|
2437
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2438
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2439
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2440
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2441
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2442
|
+
-----------------------------------------------------------------------------------------
|
2443
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
2444
|
+
-----------------------------------------------------------------------------------------
|
2445
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2446
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2447
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2448
|
+
[1m[36m (1.6ms)[0m [1mrollback transaction[0m
|
2449
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2450
|
+
----------------------------------------------------------------------------------------------------------------
|
2451
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
2452
|
+
----------------------------------------------------------------------------------------------------------------
|
2453
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2454
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2455
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2456
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2457
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2458
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2459
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2460
|
+
--------------------------------------------------------------------------------------------------------------------
|
2461
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
2462
|
+
--------------------------------------------------------------------------------------------------------------------
|
2463
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2464
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2465
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
2466
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2467
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2468
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2469
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2470
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2471
|
+
-----------------------------------------------------------------------------------------------------------------
|
2472
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
2473
|
+
-----------------------------------------------------------------------------------------------------------------
|
2474
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2475
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
2476
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2477
|
+
[1m[36m (11.5ms)[0m [1mDROP TABLE `large_text_fields` CASCADE[0m
|
2478
|
+
[1m[35m (22.7ms)[0m CREATE TABLE `large_text_fields` (`id` int(11) auto_increment PRIMARY KEY, `field_name` varchar(255) NOT NULL, `value` mediumtext, `owner_id` int(11) NOT NULL, `owner_type` varchar(255) NOT NULL) ENGINE=InnoDB
|
2479
|
+
[1m[36m (41.1ms)[0m [1mCREATE UNIQUE INDEX `large_text_field_by_owner_field` USING btree ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) [0m
|
2480
|
+
[1m[35m (2.9ms)[0m DROP TABLE `libraries` CASCADE
|
2481
|
+
[1m[36m (16.0ms)[0m [1mCREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
2482
|
+
[1m[35m (8.5ms)[0m SELECT version FROM `schema_migrations`
|
2483
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.8ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
2484
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2485
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2486
|
+
--------------------------------------------------------------------------------------------------
|
2487
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
2488
|
+
--------------------------------------------------------------------------------------------------
|
2489
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2490
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2491
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2492
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
2493
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2494
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2495
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2496
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2497
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
2498
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2499
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2500
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 1]]
|
2501
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2502
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2503
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2504
|
+
--------------------------------------------------------------------------------------------------------------------------
|
2505
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
2506
|
+
--------------------------------------------------------------------------------------------------------------------------
|
2507
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
2508
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2509
|
+
-------------------------------------------------------------------------------------------------------
|
2510
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
2511
|
+
-------------------------------------------------------------------------------------------------------
|
2512
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
2513
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2514
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2515
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2516
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
2517
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2518
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2519
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2520
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2521
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2522
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
2523
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2524
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
2525
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
2526
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2527
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
2528
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2529
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
2530
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
2531
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
2532
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2533
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2534
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2535
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2536
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
2537
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2538
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2539
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
2540
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
2541
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
2542
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2543
|
+
---------------------------------------------------------------------------------------------------
|
2544
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
2545
|
+
---------------------------------------------------------------------------------------------------
|
2546
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2547
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
|
2548
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2549
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2550
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
|
2551
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2552
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2553
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2554
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2555
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2556
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
2557
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
2558
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
2559
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
2560
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2561
|
+
----------------------------------------------------------------------------------------------------------
|
2562
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
2563
|
+
----------------------------------------------------------------------------------------------------------
|
2564
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
2565
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2566
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2567
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
2568
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2569
|
+
--------------------------------------------------------------------------------------------------------------
|
2570
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a single argument to be passed into reload.
|
2571
|
+
--------------------------------------------------------------------------------------------------------------
|
2572
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2573
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2574
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2575
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2576
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
2577
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
2578
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2579
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [0m [["id", 2]]
|
2580
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2581
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2582
|
+
---------------------------------------------------------------------------------------------------
|
2583
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
2584
|
+
---------------------------------------------------------------------------------------------------
|
2585
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2586
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2587
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2588
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2589
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2590
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
2591
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2592
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2593
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2594
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2595
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
2596
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
2597
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2598
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
2599
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2600
|
+
------------------------------------------------------------------------------------------------------
|
2601
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
2602
|
+
------------------------------------------------------------------------------------------------------
|
2603
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2604
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2605
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2606
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
2607
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
2608
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2609
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2610
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2611
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
2612
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
2613
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2614
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2615
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2616
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2617
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
2618
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2619
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2620
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2621
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
2622
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2623
|
+
----------------------------------------------------------------------------------------
|
2624
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
2625
|
+
----------------------------------------------------------------------------------------
|
2626
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2627
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2628
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2629
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2630
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2631
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
2632
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2633
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2634
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
2635
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2636
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2637
|
+
----------------------------------------------------------------------------------------------
|
2638
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
2639
|
+
----------------------------------------------------------------------------------------------
|
2640
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2641
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2642
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2643
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2644
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
2645
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2646
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2647
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2648
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2649
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
2650
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2651
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2652
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2653
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2654
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2655
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2656
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2657
|
+
---------------------------------------------------------------------------------------------------
|
2658
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
2659
|
+
---------------------------------------------------------------------------------------------------
|
2660
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2661
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2662
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2663
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2664
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2665
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
2666
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2667
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2668
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2669
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
2670
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
2671
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2672
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2673
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2674
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2675
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2676
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2677
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
2678
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
2679
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
2680
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2681
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
2682
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
2683
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
2684
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2685
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
2686
|
+
LargeTextField::OwnerTest: test_: a large text field should declare the association when it is first described and other meta data when it is first defined.
|
2687
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
2688
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2689
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2690
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2691
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
2692
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2693
|
+
------------------------------------------------------------------------------------------------------
|
2694
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
2695
|
+
------------------------------------------------------------------------------------------------------
|
2696
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2697
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2698
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2699
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2700
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2701
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2702
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2703
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2704
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2705
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2706
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2707
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
2708
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2709
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2710
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2711
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2712
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
2713
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2714
|
+
------------------------------------------------------------------------------------------------------------------
|
2715
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
2716
|
+
------------------------------------------------------------------------------------------------------------------
|
2717
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2718
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2719
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2720
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
2721
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2722
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
2723
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
2724
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2725
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
2726
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2727
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
2728
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
2729
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2730
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
2731
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
2732
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2733
|
+
--------------------------------------------------------------------------------------------------------------------
|
2734
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
2735
|
+
--------------------------------------------------------------------------------------------------------------------
|
2736
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2737
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2738
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2739
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2740
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2741
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
2742
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2743
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
2744
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2745
|
+
[1m[35m (1.4ms)[0m rollback transaction
|
2746
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2747
|
+
--------------------------------------------------------------------------------------------------------
|
2748
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
2749
|
+
--------------------------------------------------------------------------------------------------------
|
2750
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2751
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2752
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2753
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
2754
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
2755
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2756
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
2757
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2758
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2759
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2760
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2761
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2762
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2763
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2764
|
+
---------------------------------------------------------------------------------------------------
|
2765
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
2766
|
+
---------------------------------------------------------------------------------------------------
|
2767
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2768
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2769
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2770
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2771
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
2772
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
2773
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2774
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
2775
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
2776
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2777
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
2778
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2779
|
+
-------------------------------------------------------------------------------------------------------
|
2780
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
2781
|
+
-------------------------------------------------------------------------------------------------------
|
2782
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2783
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2784
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2785
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
2786
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2787
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
2788
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
2789
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
2790
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2791
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2792
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2793
|
+
[1m[35m (1.3ms)[0m rollback transaction
|
2794
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2795
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2796
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
2797
|
+
-----------------------------------------------------------------------------------------------------------------------
|
2798
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2799
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2800
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2801
|
+
[1m[36m (1.5ms)[0m [1mrollback transaction[0m
|
2802
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2803
|
+
------------------------------------------------------------------------------
|
2804
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
2805
|
+
------------------------------------------------------------------------------
|
2806
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2807
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2808
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2809
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2810
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2811
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2812
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2813
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
2814
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2815
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
2816
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2817
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2818
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2819
|
+
------------------------------------------------------------------------------------------------------------------
|
2820
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
2821
|
+
------------------------------------------------------------------------------------------------------------------
|
2822
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2823
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2824
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2825
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2826
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
2827
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
2828
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2829
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
2830
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2831
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2832
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
2833
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2834
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
2835
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
2836
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
2837
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2838
|
+
-------------------------------------------------------------------------------------------------
|
2839
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
2840
|
+
-------------------------------------------------------------------------------------------------
|
2841
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2842
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2843
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2844
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
2845
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2846
|
+
------------------------------------------------------------------------------------------------------------
|
2847
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
2848
|
+
------------------------------------------------------------------------------------------------------------
|
2849
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2850
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2851
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2852
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2853
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2854
|
+
-----------------------------------------------------------------------------------------
|
2855
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
2856
|
+
-----------------------------------------------------------------------------------------
|
2857
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2858
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2859
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2860
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
2861
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2862
|
+
----------------------------------------------------------------------------------------------------------------
|
2863
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
2864
|
+
----------------------------------------------------------------------------------------------------------------
|
2865
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2866
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
2867
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2868
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2869
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2870
|
+
[1m[35m (1.2ms)[0m rollback transaction
|
2871
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2872
|
+
--------------------------------------------------------------------------------------------------------------------
|
2873
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
2874
|
+
--------------------------------------------------------------------------------------------------------------------
|
2875
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2876
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
2877
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
2878
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2879
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
2880
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
2881
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
2882
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2883
|
+
-----------------------------------------------------------------------------------------------------------------
|
2884
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
2885
|
+
-----------------------------------------------------------------------------------------------------------------
|
2886
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2887
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
2888
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
2889
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2890
|
+
------------------------------
|
2891
|
+
LargeTextFieldTest: test_truth
|
2892
|
+
------------------------------
|
2893
|
+
[1m[35m (0.0ms)[0m rollback transaction
|