large_text_field 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +25 -17
  4. data/Rakefile +2 -1
  5. data/config/brakeman.ignore +12 -0
  6. data/db/migrate/20110217210640_add_large_text_fields.rb +2 -0
  7. data/lib/large_text_field/application_record.rb +7 -0
  8. data/lib/large_text_field/named_text_value.rb +3 -1
  9. data/lib/large_text_field/owner.rb +22 -6
  10. data/lib/large_text_field/version.rb +1 -1
  11. data/lib/large_text_field.rb +5 -4
  12. metadata +24 -81
  13. data/test/dummy/README.rdoc +0 -261
  14. data/test/dummy/Rakefile +0 -9
  15. data/test/dummy/app/assets/config/manifest.js +0 -1
  16. data/test/dummy/app/models/library.rb +0 -23
  17. data/test/dummy/config/application.rb +0 -54
  18. data/test/dummy/config/boot.rb +0 -12
  19. data/test/dummy/config/database.yml +0 -37
  20. data/test/dummy/config/environment.rb +0 -7
  21. data/test/dummy/config/environments/development.rb +0 -38
  22. data/test/dummy/config/environments/production.rb +0 -71
  23. data/test/dummy/config/environments/test.rb +0 -41
  24. data/test/dummy/config.ru +0 -6
  25. data/test/dummy/db/development.sqlite3 +0 -0
  26. data/test/dummy/db/migrate/20160217033529_create_libraries.rb +0 -13
  27. data/test/dummy/db/schema.rb +0 -29
  28. data/test/dummy/db/test.sqlite3 +0 -0
  29. data/test/dummy/log/development.log +0 -39
  30. data/test/dummy/log/test.log +0 -2893
  31. data/test/dummy/script/rails +0 -8
  32. data/test/dummy/test/fixtures/text_field_owners.yml +0 -11
  33. data/test/fixtures/large_text_field/named_text_values.yml +0 -11
  34. data/test/large_text_field_test.rb +0 -9
  35. data/test/reports/TEST-LargeTextField-LibraryTest.xml +0 -9
  36. data/test/reports/TEST-LargeTextField-NamedTextValueTest.xml +0 -15
  37. data/test/reports/TEST-LargeTextField-OwnerTest.xml +0 -53
  38. data/test/reports/TEST-LargeTextFieldTest.xml +0 -7
  39. data/test/test_helper.rb +0 -46
  40. data/test/unit/dummy/library_test.rb +0 -25
  41. data/test/unit/large_text_field/name_text_value_test.rb +0 -49
  42. data/test/unit/large_text_field/owner_test.rb +0 -317
@@ -1,2893 +0,0 @@
1
-  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.0ms) select sqlite_version(*)
3
-  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- Migrating to AddLargeTextFields (20110217210640)
6
-  (0.0ms) begin transaction
7
-  (0.3ms) 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
-  (0.1ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
9
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20110217210640"]]
10
-  (2.7ms) commit transaction
11
- Migrating to CreateLibraries (20160217033529)
12
-  (0.0ms) begin transaction
13
-  (0.3ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL) 
14
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20160217033529"]]
15
-  (1.5ms) commit transaction
16
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
17
-  (0.1ms)  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
- 
25
-  (1.4ms) DROP TABLE "large_text_fields"
26
-  (1.4ms) 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
-  (0.0ms) select sqlite_version(*)
28
-  (1.2ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
29
-  (1.2ms) DROP TABLE "libraries"
30
-  (1.2ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
31
-  (0.1ms) SELECT version FROM "schema_migrations"
32
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
33
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
34
-  (0.1ms) begin transaction
35
- --------------------------------------------------------------------------------------------------
36
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
37
- --------------------------------------------------------------------------------------------------
38
-  (0.0ms) rollback transaction
39
-  (0.0ms) begin transaction
40
- -----------------------------------------------------------------------------------------------------------------------
41
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
42
- -----------------------------------------------------------------------------------------------------------------------
43
-  (0.0ms) SAVEPOINT active_record_1
44
- SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
45
-  (0.0ms) RELEASE SAVEPOINT active_record_1
46
-  (0.1ms) SAVEPOINT active_record_1
47
- SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
48
-  (0.0ms) RELEASE SAVEPOINT active_record_1
49
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
50
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
51
-  (1.3ms) rollback transaction
52
-  (0.1ms) begin transaction
53
- --------------------------------------------------------------------------------------------------------------------------
54
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
55
- --------------------------------------------------------------------------------------------------------------------------
56
-  (0.0ms) rollback transaction
57
-  (0.0ms) begin transaction
58
- -------------------------------------------------------------------------------------------------------
59
- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
60
- -------------------------------------------------------------------------------------------------------
61
-  (0.0ms) SAVEPOINT active_record_1
62
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
63
-  (0.0ms) RELEASE SAVEPOINT active_record_1
64
-  (0.0ms) SAVEPOINT active_record_1
65
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
66
-  (0.0ms) RELEASE SAVEPOINT active_record_1
67
-  (0.0ms) SAVEPOINT active_record_1
68
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
70
-  (0.0ms) SAVEPOINT active_record_1
71
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
72
-  (0.0ms) RELEASE SAVEPOINT active_record_1
73
-  (0.0ms) SAVEPOINT active_record_1
74
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
76
-  (0.8ms) rollback transaction
77
-  (0.0ms) begin transaction
78
- ------------------------------------------------------------------------------------------------------------------------------------
79
- LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
80
- ------------------------------------------------------------------------------------------------------------------------------------
81
-  (0.0ms) SAVEPOINT active_record_1
82
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
83
-  (0.0ms) RELEASE SAVEPOINT active_record_1
84
-  (0.0ms) SAVEPOINT active_record_1
85
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
87
-  (0.0ms) SAVEPOINT active_record_1
88
- SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
89
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
90
-  (0.8ms) rollback transaction
91
-  (0.0ms) begin transaction
92
- ---------------------------------------------------------------------------------------------------
93
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
94
- ---------------------------------------------------------------------------------------------------
95
-  (0.0ms) SAVEPOINT active_record_1
96
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
97
-  (0.0ms) RELEASE SAVEPOINT active_record_1
98
-  (0.0ms) SAVEPOINT active_record_1
99
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
101
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
102
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (1.1ms) rollback transaction
104
-  (0.0ms) 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
-  (0.0ms) rollback transaction
109
-  (0.0ms) begin transaction
110
- ----------------------------------------------------------------------------------------------------------
111
- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
112
- ----------------------------------------------------------------------------------------------------------
113
-  (0.0ms) SAVEPOINT active_record_1
114
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
115
-  (0.0ms) RELEASE SAVEPOINT active_record_1
116
-  (1.1ms) rollback transaction
117
-  (0.1ms) begin transaction
118
- ---------------------------------------------------------------------------------------------------
119
- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
120
- ---------------------------------------------------------------------------------------------------
121
-  (0.0ms) SAVEPOINT active_record_1
122
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
123
-  (0.0ms) RELEASE SAVEPOINT active_record_1
124
-  (0.0ms) SAVEPOINT active_record_1
125
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
127
-  (0.0ms) RELEASE SAVEPOINT active_record_1
128
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
129
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
131
- SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
132
- SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
133
-  (0.0ms) RELEASE SAVEPOINT active_record_1
134
-  (1.1ms) rollback transaction
135
-  (0.0ms) begin transaction
136
- ------------------------------------------------------------------------------------------------------
137
- LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
138
- ------------------------------------------------------------------------------------------------------
139
-  (0.0ms) SAVEPOINT active_record_1
140
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
141
-  (0.0ms) RELEASE SAVEPOINT active_record_1
142
-  (0.0ms) SAVEPOINT active_record_1
143
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
145
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
146
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
148
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
150
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
151
- LargeTextField::NamedTextValue Load (0.1ms) 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"]]
152
-  (0.0ms) SAVEPOINT active_record_1
153
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
154
-  (0.0ms) RELEASE SAVEPOINT active_record_1
155
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
156
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (1.2ms) rollback transaction
158
-  (0.1ms) begin transaction
159
- ----------------------------------------------------------------------------------------
160
- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
161
- ----------------------------------------------------------------------------------------
162
-  (0.0ms) SAVEPOINT active_record_1
163
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
164
-  (0.0ms) RELEASE SAVEPOINT active_record_1
165
-  (0.0ms) SAVEPOINT active_record_1
166
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
167
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
169
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
170
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
171
-  (1.0ms) rollback transaction
172
-  (0.0ms) begin transaction
173
- ----------------------------------------------------------------------------------------------
174
- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
175
- ----------------------------------------------------------------------------------------------
176
-  (0.0ms) SAVEPOINT active_record_1
177
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
178
-  (0.0ms) RELEASE SAVEPOINT active_record_1
179
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
180
-  (0.0ms) SAVEPOINT active_record_1
181
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
182
-  (0.0ms) RELEASE SAVEPOINT active_record_1
183
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
184
-  (0.0ms) SAVEPOINT active_record_1
185
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
186
-  (0.0ms) RELEASE SAVEPOINT active_record_1
187
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
188
-  (0.0ms) SAVEPOINT active_record_1
189
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
190
-  (0.0ms) RELEASE SAVEPOINT active_record_1
191
-  (0.8ms) rollback transaction
192
-  (0.1ms) begin transaction
193
- ---------------------------------------------------------------------------------------------------
194
- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
195
- ---------------------------------------------------------------------------------------------------
196
-  (0.1ms) SAVEPOINT active_record_1
197
- SQL (7.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
198
-  (0.1ms) RELEASE SAVEPOINT active_record_1
199
-  (0.1ms) SAVEPOINT active_record_1
200
- SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
201
- SQL (0.1ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
203
-  (0.1ms) SAVEPOINT active_record_1
204
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
205
- SQL (0.1ms) 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
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
207
-  (0.1ms) RELEASE SAVEPOINT active_record_1
208
-  (0.0ms) SAVEPOINT active_record_1
209
-  (0.0ms) RELEASE SAVEPOINT active_record_1
210
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
211
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.1ms) SAVEPOINT active_record_1
213
- SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
214
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
215
- SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
216
-  (0.0ms) RELEASE SAVEPOINT active_record_1
217
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
218
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
219
-  (33.4ms) rollback transaction
220
-  (0.1ms) begin transaction
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
-  (0.0ms) SAVEPOINT active_record_1
225
- SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
226
-  (0.1ms) RELEASE SAVEPOINT active_record_1
227
-  (8.8ms) rollback transaction
228
-  (0.1ms) begin transaction
229
- ------------------------------------------------------------------------------------------------------
230
- LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
231
- ------------------------------------------------------------------------------------------------------
232
-  (0.0ms) SAVEPOINT active_record_1
233
- SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
234
-  (0.1ms) RELEASE SAVEPOINT active_record_1
235
-  (0.1ms) 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
-  (0.0ms) SAVEPOINT active_record_1
237
- SQL (0.2ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
239
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
240
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
241
-  (0.1ms) 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
-  (0.0ms) SAVEPOINT active_record_1
243
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
244
-  (0.0ms) RELEASE SAVEPOINT active_record_1
245
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
246
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
247
-  (0.0ms) 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
-  (1.2ms) rollback transaction
249
-  (0.1ms) begin transaction
250
- ------------------------------------------------------------------------------------------------------------------
251
- LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
252
- ------------------------------------------------------------------------------------------------------------------
253
-  (0.0ms) SAVEPOINT active_record_1
254
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
255
-  (0.0ms) RELEASE SAVEPOINT active_record_1
256
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
257
-  (0.0ms) SAVEPOINT active_record_1
258
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
259
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
260
-  (0.0ms) RELEASE SAVEPOINT active_record_1
261
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
262
-  (0.0ms) SAVEPOINT active_record_1
263
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
264
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
265
-  (0.0ms) RELEASE SAVEPOINT active_record_1
266
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
267
-  (0.8ms) rollback transaction
268
-  (0.0ms) begin transaction
269
- --------------------------------------------------------------------------------------------------------------------
270
- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
271
- --------------------------------------------------------------------------------------------------------------------
272
-  (0.0ms) SAVEPOINT active_record_1
273
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
274
-  (0.1ms) RELEASE SAVEPOINT active_record_1
275
-  (0.1ms) SAVEPOINT active_record_1
276
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
277
- SQL (0.2ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
279
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
280
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
281
-  (0.9ms) rollback transaction
282
-  (0.1ms) begin transaction
283
- --------------------------------------------------------------------------------------------------------
284
- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
285
- --------------------------------------------------------------------------------------------------------
286
-  (0.0ms) SAVEPOINT active_record_1
287
- SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
288
-  (0.0ms) RELEASE SAVEPOINT active_record_1
289
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
290
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.0ms) SAVEPOINT active_record_1
292
- SQL (0.2ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
294
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
295
- LargeTextField::NamedTextValue Load (0.1ms) 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"]]
296
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
297
- LargeTextField::NamedTextValue Load (0.1ms) 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"]]
298
-  (3.2ms) rollback transaction
299
-  (0.1ms) begin transaction
300
- ---------------------------------------------------------------------------------------------------
301
- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
302
- ---------------------------------------------------------------------------------------------------
303
-  (0.0ms) SAVEPOINT active_record_1
304
- SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
305
-  (0.2ms) RELEASE SAVEPOINT active_record_1
306
-  (0.1ms) SAVEPOINT active_record_1
307
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
308
- SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
309
-  (0.1ms) RELEASE SAVEPOINT active_record_1
310
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
311
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
313
-  (1.1ms) rollback transaction
314
-  (0.1ms) begin transaction
315
- -------------------------------------------------------------------------------------------------------
316
- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
317
- -------------------------------------------------------------------------------------------------------
318
-  (0.0ms) SAVEPOINT active_record_1
319
- SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
320
-  (0.0ms) RELEASE SAVEPOINT active_record_1
321
-  (1.2ms) rollback transaction
322
-  (0.1ms) 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
-  (0.0ms) SAVEPOINT active_record_1
327
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
328
-  (0.0ms) RELEASE SAVEPOINT active_record_1
329
-  (1.4ms) rollback transaction
330
-  (0.1ms) begin transaction
331
- -----------------------------------------------------------------------------------------------------------------------
332
- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
333
- -----------------------------------------------------------------------------------------------------------------------
334
-  (0.0ms) SAVEPOINT active_record_1
335
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
336
-  (0.0ms) RELEASE SAVEPOINT active_record_1
337
-  (1.2ms) rollback transaction
338
-  (0.1ms) begin transaction
339
- ------------------------------------------------------------------------------
340
- LargeTextField::OwnerTest: test_: a large text field should read from a file.
341
- ------------------------------------------------------------------------------
342
-  (0.0ms) SAVEPOINT active_record_1
343
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
344
-  (0.0ms) RELEASE SAVEPOINT active_record_1
345
-  (0.0ms) SAVEPOINT active_record_1
346
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
347
-  (0.0ms) RELEASE SAVEPOINT active_record_1
348
-  (0.1ms) SAVEPOINT active_record_1
349
- SQL (0.2ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
351
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
352
- LargeTextField::NamedTextValue Load (0.1ms) 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"]]
353
-  (1.2ms) rollback transaction
354
-  (0.1ms) begin transaction
355
- ------------------------------------------------------------------------------------------------------------------
356
- LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
357
- ------------------------------------------------------------------------------------------------------------------
358
-  (0.1ms) SAVEPOINT active_record_1
359
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
360
-  (0.0ms) RELEASE SAVEPOINT active_record_1
361
-  (0.0ms) SAVEPOINT active_record_1
362
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
363
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
364
-  (0.0ms) RELEASE SAVEPOINT active_record_1
365
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
366
-  (0.0ms) SAVEPOINT active_record_1
367
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
368
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
370
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
371
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
372
-  (1.2ms) rollback transaction
373
-  (0.1ms) begin transaction
374
- -------------------------------------------------------------------------------------------------
375
- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
376
- -------------------------------------------------------------------------------------------------
377
-  (0.0ms) SAVEPOINT active_record_1
378
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
379
-  (0.1ms) RELEASE SAVEPOINT active_record_1
380
-  (1.2ms) rollback transaction
381
-  (0.1ms) begin transaction
382
- ------------------------------------------------------------------------------------------------------------
383
- LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
384
- ------------------------------------------------------------------------------------------------------------
385
-  (0.0ms) SAVEPOINT active_record_1
386
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
387
-  (0.0ms) RELEASE SAVEPOINT active_record_1
388
-  (1.2ms) rollback transaction
389
-  (0.1ms) begin transaction
390
- -----------------------------------------------------------------------------------------
391
- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
392
- -----------------------------------------------------------------------------------------
393
-  (0.0ms) SAVEPOINT active_record_1
394
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
395
-  (0.0ms) RELEASE SAVEPOINT active_record_1
396
-  (1.3ms) rollback transaction
397
-  (0.1ms) begin transaction
398
- ----------------------------------------------------------------------------------------------------------------
399
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
400
- ----------------------------------------------------------------------------------------------------------------
401
-  (0.0ms) SAVEPOINT active_record_1
402
- SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
403
-  (0.0ms) RELEASE SAVEPOINT active_record_1
404
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
405
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
406
-  (1.0ms) rollback transaction
407
-  (0.0ms) begin transaction
408
- --------------------------------------------------------------------------------------------------------------------
409
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
410
- --------------------------------------------------------------------------------------------------------------------
411
-  (0.0ms) SAVEPOINT active_record_1
412
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
413
- SQL (0.1ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
415
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
416
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
417
-  (0.8ms) rollback transaction
418
-  (0.1ms) begin transaction
419
- -----------------------------------------------------------------------------------------------------------------
420
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
421
- -----------------------------------------------------------------------------------------------------------------
422
-  (0.0ms) SAVEPOINT active_record_1
423
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
424
-  (0.0ms) rollback transaction
425
-  (0.0ms) begin transaction
426
- ------------------------------
427
- LargeTextFieldTest: test_truth
428
- ------------------------------
429
-  (0.0ms) rollback transaction
430
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
431
-  (0.1ms) begin transaction
432
- ------------------------------
433
- LargeTextFieldTest: test_truth
434
- ------------------------------
435
-  (0.0ms) rollback transaction
436
-  (0.0ms) begin transaction
437
- ----------------------------------------------------------------------------------------------------------
438
- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
439
- ----------------------------------------------------------------------------------------------------------
440
-  (0.0ms) SAVEPOINT active_record_1
441
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
442
-  (0.0ms) RELEASE SAVEPOINT active_record_1
443
-  (0.8ms) rollback transaction
444
-  (0.0ms) begin transaction
445
- ---------------------------------------------------------------------------------------------------
446
- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
447
- ---------------------------------------------------------------------------------------------------
448
-  (0.0ms) SAVEPOINT active_record_1
449
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
450
-  (0.0ms) RELEASE SAVEPOINT active_record_1
451
-  (0.0ms) SAVEPOINT active_record_1
452
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
454
-  (0.0ms) RELEASE SAVEPOINT active_record_1
455
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
456
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.0ms) SAVEPOINT active_record_1
458
- SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
459
- SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
460
-  (0.0ms) RELEASE SAVEPOINT active_record_1
461
-  (0.8ms) rollback transaction
462
-  (0.0ms) begin transaction
463
- ------------------------------------------------------------------------------------------------------
464
- LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
465
- ------------------------------------------------------------------------------------------------------
466
-  (0.0ms) SAVEPOINT active_record_1
467
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
468
-  (0.0ms) RELEASE SAVEPOINT active_record_1
469
-  (0.0ms) SAVEPOINT active_record_1
470
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
472
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
473
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
475
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
477
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
478
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
479
-  (0.0ms) SAVEPOINT active_record_1
480
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
481
-  (0.0ms) RELEASE SAVEPOINT active_record_1
482
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
483
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.7ms) rollback transaction
485
-  (0.0ms) begin transaction
486
- ----------------------------------------------------------------------------------------
487
- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
488
- ----------------------------------------------------------------------------------------
489
-  (0.0ms) SAVEPOINT active_record_1
490
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
491
-  (0.0ms) RELEASE SAVEPOINT active_record_1
492
-  (0.0ms) SAVEPOINT active_record_1
493
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
494
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
496
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
497
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
498
-  (0.7ms) rollback transaction
499
-  (0.0ms) begin transaction
500
- ----------------------------------------------------------------------------------------------
501
- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
502
- ----------------------------------------------------------------------------------------------
503
-  (0.0ms) SAVEPOINT active_record_1
504
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
505
-  (0.0ms) RELEASE SAVEPOINT active_record_1
506
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
507
-  (0.0ms) SAVEPOINT active_record_1
508
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
509
-  (0.1ms) RELEASE SAVEPOINT active_record_1
510
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
511
-  (0.0ms) SAVEPOINT active_record_1
512
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
513
-  (0.0ms) RELEASE SAVEPOINT active_record_1
514
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
515
-  (0.0ms) SAVEPOINT active_record_1
516
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
517
-  (0.0ms) RELEASE SAVEPOINT active_record_1
518
-  (0.7ms) rollback transaction
519
-  (0.0ms) begin transaction
520
- ---------------------------------------------------------------------------------------------------
521
- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
522
- ---------------------------------------------------------------------------------------------------
523
-  (0.0ms) SAVEPOINT active_record_1
524
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
525
-  (0.0ms) RELEASE SAVEPOINT active_record_1
526
-  (0.0ms) SAVEPOINT active_record_1
527
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
528
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
530
-  (0.0ms) SAVEPOINT active_record_1
531
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
532
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
534
-  (0.0ms) RELEASE SAVEPOINT active_record_1
535
-  (0.0ms) SAVEPOINT active_record_1
536
-  (0.0ms) RELEASE SAVEPOINT active_record_1
537
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
538
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
540
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
541
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
542
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
543
-  (0.0ms) RELEASE SAVEPOINT active_record_1
544
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
545
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
546
-  (0.7ms) rollback transaction
547
-  (0.0ms) begin transaction
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
-  (0.0ms) SAVEPOINT active_record_1
552
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
553
-  (0.0ms) RELEASE SAVEPOINT active_record_1
554
-  (0.8ms) rollback transaction
555
-  (0.0ms) begin transaction
556
- ------------------------------------------------------------------------------------------------------
557
- LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
558
- ------------------------------------------------------------------------------------------------------
559
-  (0.0ms) SAVEPOINT active_record_1
560
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
561
-  (0.0ms) RELEASE SAVEPOINT active_record_1
562
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
564
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
566
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
567
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
568
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
570
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
571
-  (0.0ms) RELEASE SAVEPOINT active_record_1
572
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
573
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
574
-  (0.0ms) 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
-  (0.7ms) rollback transaction
576
-  (0.0ms) begin transaction
577
- ------------------------------------------------------------------------------------------------------------------
578
- LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
579
- ------------------------------------------------------------------------------------------------------------------
580
-  (0.0ms) SAVEPOINT active_record_1
581
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
582
-  (0.0ms) RELEASE SAVEPOINT active_record_1
583
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
584
-  (0.0ms) SAVEPOINT active_record_1
585
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
586
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
587
-  (0.0ms) RELEASE SAVEPOINT active_record_1
588
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
589
-  (0.0ms) SAVEPOINT active_record_1
590
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
591
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
592
-  (0.0ms) RELEASE SAVEPOINT active_record_1
593
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
594
-  (0.6ms) rollback transaction
595
-  (0.0ms) begin transaction
596
- --------------------------------------------------------------------------------------------------------------------
597
- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
598
- --------------------------------------------------------------------------------------------------------------------
599
-  (0.0ms) SAVEPOINT active_record_1
600
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
601
-  (0.0ms) RELEASE SAVEPOINT active_record_1
602
-  (0.0ms) SAVEPOINT active_record_1
603
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
604
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
606
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
607
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
608
-  (0.7ms) rollback transaction
609
-  (0.0ms) begin transaction
610
- --------------------------------------------------------------------------------------------------------
611
- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
612
- --------------------------------------------------------------------------------------------------------
613
-  (0.0ms) SAVEPOINT active_record_1
614
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
615
-  (0.0ms) RELEASE SAVEPOINT active_record_1
616
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
617
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
619
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
621
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
622
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
623
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
624
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
625
-  (0.7ms) rollback transaction
626
-  (0.0ms) begin transaction
627
- ---------------------------------------------------------------------------------------------------
628
- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
629
- ---------------------------------------------------------------------------------------------------
630
-  (0.0ms) SAVEPOINT active_record_1
631
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
632
-  (0.0ms) RELEASE SAVEPOINT active_record_1
633
-  (0.0ms) SAVEPOINT active_record_1
634
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
635
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
636
-  (0.0ms) RELEASE SAVEPOINT active_record_1
637
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
638
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
640
-  (0.7ms) rollback transaction
641
-  (0.0ms) begin transaction
642
- -------------------------------------------------------------------------------------------------------
643
- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
644
- -------------------------------------------------------------------------------------------------------
645
-  (0.0ms) SAVEPOINT active_record_1
646
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
647
-  (0.0ms) RELEASE SAVEPOINT active_record_1
648
-  (0.8ms) rollback transaction
649
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
654
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
655
-  (0.0ms) RELEASE SAVEPOINT active_record_1
656
-  (0.7ms) rollback transaction
657
-  (0.0ms) begin transaction
658
- -----------------------------------------------------------------------------------------------------------------------
659
- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
660
- -----------------------------------------------------------------------------------------------------------------------
661
-  (0.0ms) SAVEPOINT active_record_1
662
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
663
-  (0.0ms) RELEASE SAVEPOINT active_record_1
664
-  (0.7ms) rollback transaction
665
-  (0.0ms) begin transaction
666
- ------------------------------------------------------------------------------
667
- LargeTextField::OwnerTest: test_: a large text field should read from a file.
668
- ------------------------------------------------------------------------------
669
-  (0.0ms) SAVEPOINT active_record_1
670
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
671
-  (0.0ms) RELEASE SAVEPOINT active_record_1
672
-  (0.0ms) SAVEPOINT active_record_1
673
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
674
-  (0.0ms) RELEASE SAVEPOINT active_record_1
675
-  (0.0ms) SAVEPOINT active_record_1
676
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
678
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
679
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
680
-  (0.6ms) rollback transaction
681
-  (0.0ms) begin transaction
682
- ------------------------------------------------------------------------------------------------------------------
683
- LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
684
- ------------------------------------------------------------------------------------------------------------------
685
-  (0.0ms) SAVEPOINT active_record_1
686
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
687
-  (0.0ms) RELEASE SAVEPOINT active_record_1
688
-  (0.0ms) SAVEPOINT active_record_1
689
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
690
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
691
-  (0.0ms) RELEASE SAVEPOINT active_record_1
692
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
693
-  (0.0ms) SAVEPOINT active_record_1
694
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
695
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
697
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
698
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
699
-  (0.7ms) rollback transaction
700
-  (0.0ms) begin transaction
701
- -------------------------------------------------------------------------------------------------
702
- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
703
- -------------------------------------------------------------------------------------------------
704
-  (0.0ms) SAVEPOINT active_record_1
705
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
706
-  (0.0ms) RELEASE SAVEPOINT active_record_1
707
-  (0.8ms) rollback transaction
708
-  (0.0ms) begin transaction
709
- ------------------------------------------------------------------------------------------------------------
710
- LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
711
- ------------------------------------------------------------------------------------------------------------
712
-  (0.0ms) SAVEPOINT active_record_1
713
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
714
-  (0.0ms) RELEASE SAVEPOINT active_record_1
715
-  (2.2ms) rollback transaction
716
-  (0.0ms) begin transaction
717
- -----------------------------------------------------------------------------------------
718
- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
719
- -----------------------------------------------------------------------------------------
720
-  (0.0ms) SAVEPOINT active_record_1
721
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
722
-  (0.0ms) RELEASE SAVEPOINT active_record_1
723
-  (0.9ms) rollback transaction
724
-  (0.1ms) begin transaction
725
- ----------------------------------------------------------------------------------------------------------------
726
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
727
- ----------------------------------------------------------------------------------------------------------------
728
-  (0.0ms) SAVEPOINT active_record_1
729
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
730
-  (0.0ms) RELEASE SAVEPOINT active_record_1
731
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
732
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
733
-  (0.8ms) rollback transaction
734
-  (0.0ms) begin transaction
735
- --------------------------------------------------------------------------------------------------------------------
736
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
737
- --------------------------------------------------------------------------------------------------------------------
738
-  (0.0ms) SAVEPOINT active_record_1
739
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
740
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
742
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
743
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
744
-  (0.7ms) rollback transaction
745
-  (0.0ms) begin transaction
746
- -----------------------------------------------------------------------------------------------------------------
747
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
748
- -----------------------------------------------------------------------------------------------------------------
749
-  (0.0ms) SAVEPOINT active_record_1
750
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
751
-  (0.0ms) rollback transaction
752
-  (0.0ms) begin transaction
753
- ---------------------------------------------------------------------------------------------------
754
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
755
- ---------------------------------------------------------------------------------------------------
756
-  (0.0ms) SAVEPOINT active_record_1
757
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
758
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
760
-  (0.0ms) SAVEPOINT active_record_1
761
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
763
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
764
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (1.2ms) rollback transaction
766
-  (0.1ms) 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
-  (0.0ms) rollback transaction
771
-  (0.0ms) begin transaction
772
- --------------------------------------------------------------------------------------------------
773
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
774
- --------------------------------------------------------------------------------------------------
775
-  (0.0ms) rollback transaction
776
-  (0.0ms) begin transaction
777
- -----------------------------------------------------------------------------------------------------------------------
778
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
779
- -----------------------------------------------------------------------------------------------------------------------
780
-  (0.0ms) SAVEPOINT active_record_1
781
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
782
- SQL (0.1ms) 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]]
783
-  (0.0ms) RELEASE SAVEPOINT active_record_1
784
-  (0.0ms) SAVEPOINT active_record_1
785
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
787
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 2]]
788
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
789
-  (0.7ms) rollback transaction
790
-  (0.0ms) begin transaction
791
- --------------------------------------------------------------------------------------------------------------------------
792
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
793
- --------------------------------------------------------------------------------------------------------------------------
794
-  (0.0ms) rollback transaction
795
-  (0.0ms) begin transaction
796
- -------------------------------------------------------------------------------------------------------
797
- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
798
- -------------------------------------------------------------------------------------------------------
799
-  (0.0ms) SAVEPOINT active_record_1
800
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
801
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
803
-  (0.0ms) SAVEPOINT active_record_1
804
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
805
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
807
-  (0.0ms) SAVEPOINT active_record_1
808
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
809
-  (0.0ms) RELEASE SAVEPOINT active_record_1
810
-  (0.0ms) SAVEPOINT active_record_1
811
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
813
-  (0.0ms) SAVEPOINT active_record_1
814
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
815
-  (0.0ms) RELEASE SAVEPOINT active_record_1
816
-  (0.7ms) rollback transaction
817
-  (0.0ms) begin transaction
818
- ------------------------------------------------------------------------------------------------------------------------------------
819
- LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
820
- ------------------------------------------------------------------------------------------------------------------------------------
821
-  (0.0ms) SAVEPOINT active_record_1
822
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
823
- SQL (0.1ms) 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]]
824
-  (0.0ms) RELEASE SAVEPOINT active_record_1
825
-  (0.0ms) SAVEPOINT active_record_1
826
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
828
-  (0.0ms) SAVEPOINT active_record_1
829
- SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
830
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
831
-  (0.7ms) rollback transaction
832
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
833
-  (0.1ms) begin transaction
834
- --------------------------------------------------------------------------------------------------
835
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
836
- --------------------------------------------------------------------------------------------------
837
-  (0.0ms) rollback transaction
838
-  (0.0ms) begin transaction
839
- -----------------------------------------------------------------------------------------------------------------------
840
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
841
- -----------------------------------------------------------------------------------------------------------------------
842
-  (0.0ms) SAVEPOINT active_record_1
843
- SQL (0.5ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
844
-  (0.0ms) RELEASE SAVEPOINT active_record_1
845
-  (0.0ms) SAVEPOINT active_record_1
846
- SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
847
-  (0.0ms) RELEASE SAVEPOINT active_record_1
848
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
849
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
850
-  (1.0ms) rollback transaction
851
-  (0.0ms) begin transaction
852
- --------------------------------------------------------------------------------------------------------------------------
853
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
854
- --------------------------------------------------------------------------------------------------------------------------
855
-  (0.0ms) rollback transaction
856
-  (0.0ms) begin transaction
857
- -------------------------------------------------------------------------------------------------------
858
- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
859
- -------------------------------------------------------------------------------------------------------
860
-  (0.0ms) SAVEPOINT active_record_1
861
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
862
-  (0.0ms) RELEASE SAVEPOINT active_record_1
863
-  (0.0ms) SAVEPOINT active_record_1
864
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
865
-  (0.0ms) RELEASE SAVEPOINT active_record_1
866
-  (0.0ms) SAVEPOINT active_record_1
867
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
869
-  (0.0ms) SAVEPOINT active_record_1
870
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
871
-  (0.0ms) RELEASE SAVEPOINT active_record_1
872
-  (0.0ms) SAVEPOINT active_record_1
873
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
875
-  (0.7ms) rollback transaction
876
-  (0.0ms) begin transaction
877
- ------------------------------------------------------------------------------------------------------------------------------------
878
- LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
879
- ------------------------------------------------------------------------------------------------------------------------------------
880
-  (0.0ms) SAVEPOINT active_record_1
881
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
882
-  (0.0ms) RELEASE SAVEPOINT active_record_1
883
-  (0.0ms) SAVEPOINT active_record_1
884
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
886
-  (0.0ms) SAVEPOINT active_record_1
887
- SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
888
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
889
-  (0.7ms) rollback transaction
890
-  (0.0ms) begin transaction
891
- ---------------------------------------------------------------------------------------------------
892
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
893
- ---------------------------------------------------------------------------------------------------
894
-  (0.0ms) SAVEPOINT active_record_1
895
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
896
-  (0.0ms) RELEASE SAVEPOINT active_record_1
897
-  (0.0ms) SAVEPOINT active_record_1
898
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
900
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
901
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.7ms) rollback transaction
903
-  (0.0ms) 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
-  (0.0ms) rollback transaction
908
-  (0.0ms) begin transaction
909
- ----------------------------------------------------------------------------------------------------------
910
- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
911
- ----------------------------------------------------------------------------------------------------------
912
-  (0.0ms) SAVEPOINT active_record_1
913
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
914
-  (0.0ms) RELEASE SAVEPOINT active_record_1
915
-  (0.8ms) rollback transaction
916
-  (0.0ms) begin transaction
917
- ---------------------------------------------------------------------------------------------------
918
- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
919
- ---------------------------------------------------------------------------------------------------
920
-  (0.0ms) SAVEPOINT active_record_1
921
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
922
-  (0.0ms) RELEASE SAVEPOINT active_record_1
923
-  (0.0ms) SAVEPOINT active_record_1
924
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
926
-  (0.0ms) RELEASE SAVEPOINT active_record_1
927
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
928
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
930
- SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
931
- SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
932
-  (0.0ms) RELEASE SAVEPOINT active_record_1
933
-  (0.8ms) rollback transaction
934
-  (0.0ms) begin transaction
935
- ------------------------------------------------------------------------------------------------------
936
- LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
937
- ------------------------------------------------------------------------------------------------------
938
-  (0.0ms) SAVEPOINT active_record_1
939
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
940
-  (0.0ms) RELEASE SAVEPOINT active_record_1
941
-  (0.0ms) SAVEPOINT active_record_1
942
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
944
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
945
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
947
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
949
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
950
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
951
-  (0.0ms) SAVEPOINT active_record_1
952
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
953
-  (0.1ms) RELEASE SAVEPOINT active_record_1
954
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
955
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.8ms) rollback transaction
957
-  (0.0ms) begin transaction
958
- ----------------------------------------------------------------------------------------
959
- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
960
- ----------------------------------------------------------------------------------------
961
-  (0.0ms) SAVEPOINT active_record_1
962
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
963
-  (0.0ms) RELEASE SAVEPOINT active_record_1
964
-  (0.0ms) SAVEPOINT active_record_1
965
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
966
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
968
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
969
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
970
-  (0.7ms) rollback transaction
971
-  (0.0ms) begin transaction
972
- ----------------------------------------------------------------------------------------------
973
- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
974
- ----------------------------------------------------------------------------------------------
975
-  (0.0ms) SAVEPOINT active_record_1
976
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
977
-  (0.0ms) RELEASE SAVEPOINT active_record_1
978
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
979
-  (0.0ms) SAVEPOINT active_record_1
980
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
981
-  (0.0ms) RELEASE SAVEPOINT active_record_1
982
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
983
-  (0.0ms) SAVEPOINT active_record_1
984
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
985
-  (0.0ms) RELEASE SAVEPOINT active_record_1
986
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
987
-  (0.0ms) SAVEPOINT active_record_1
988
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
989
-  (0.0ms) RELEASE SAVEPOINT active_record_1
990
-  (0.7ms) rollback transaction
991
-  (0.0ms) begin transaction
992
- ---------------------------------------------------------------------------------------------------
993
- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
994
- ---------------------------------------------------------------------------------------------------
995
-  (0.0ms) SAVEPOINT active_record_1
996
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
997
-  (0.0ms) RELEASE SAVEPOINT active_record_1
998
-  (0.0ms) SAVEPOINT active_record_1
999
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1000
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1002
-  (0.0ms) SAVEPOINT active_record_1
1003
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1004
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
1006
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1007
-  (0.0ms) SAVEPOINT active_record_1
1008
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1009
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1010
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1012
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
1013
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
1014
- SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1015
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1016
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
1017
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
1018
-  (0.8ms) rollback transaction
1019
-  (0.0ms) begin transaction
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
-  (0.0ms) SAVEPOINT active_record_1
1024
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1025
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1026
-  (0.7ms) rollback transaction
1027
-  (0.0ms) begin transaction
1028
- ------------------------------------------------------------------------------------------------------
1029
- LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
1030
- ------------------------------------------------------------------------------------------------------
1031
-  (0.0ms) SAVEPOINT active_record_1
1032
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1033
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1034
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1036
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1038
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1039
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1040
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1042
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1043
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1044
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1045
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1046
-  (0.0ms) 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
-  (0.8ms) rollback transaction
1048
-  (0.1ms) begin transaction
1049
- ------------------------------------------------------------------------------------------------------------------
1050
- LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
1051
- ------------------------------------------------------------------------------------------------------------------
1052
-  (0.0ms) SAVEPOINT active_record_1
1053
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1054
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1055
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1056
-  (0.0ms) SAVEPOINT active_record_1
1057
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1058
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1059
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1060
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1061
-  (0.0ms) SAVEPOINT active_record_1
1062
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1063
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1064
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1065
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1066
-  (0.9ms) rollback transaction
1067
-  (0.0ms) begin transaction
1068
- --------------------------------------------------------------------------------------------------------------------
1069
- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
1070
- --------------------------------------------------------------------------------------------------------------------
1071
-  (0.0ms) SAVEPOINT active_record_1
1072
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1073
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1074
-  (0.0ms) SAVEPOINT active_record_1
1075
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1076
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1078
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1079
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1080
-  (0.7ms) rollback transaction
1081
-  (0.0ms) begin transaction
1082
- --------------------------------------------------------------------------------------------------------
1083
- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
1084
- --------------------------------------------------------------------------------------------------------
1085
-  (0.0ms) SAVEPOINT active_record_1
1086
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1087
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1088
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1089
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1091
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1093
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1094
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1095
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1096
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1097
-  (0.8ms) rollback transaction
1098
-  (0.0ms) begin transaction
1099
- ---------------------------------------------------------------------------------------------------
1100
- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
1101
- ---------------------------------------------------------------------------------------------------
1102
-  (0.0ms) SAVEPOINT active_record_1
1103
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1104
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1105
-  (0.0ms) SAVEPOINT active_record_1
1106
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
1107
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
1108
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1109
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1110
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1112
-  (0.7ms) rollback transaction
1113
-  (0.0ms) begin transaction
1114
- -------------------------------------------------------------------------------------------------------
1115
- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
1116
- -------------------------------------------------------------------------------------------------------
1117
-  (0.0ms) SAVEPOINT active_record_1
1118
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1119
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1120
-  (0.8ms) rollback transaction
1121
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1126
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1127
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1128
-  (0.7ms) rollback transaction
1129
-  (0.0ms) begin transaction
1130
- -----------------------------------------------------------------------------------------------------------------------
1131
- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
1132
- -----------------------------------------------------------------------------------------------------------------------
1133
-  (0.0ms) SAVEPOINT active_record_1
1134
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1135
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1136
-  (0.7ms) rollback transaction
1137
-  (0.0ms) begin transaction
1138
- ------------------------------------------------------------------------------
1139
- LargeTextField::OwnerTest: test_: a large text field should read from a file.
1140
- ------------------------------------------------------------------------------
1141
-  (0.0ms) SAVEPOINT active_record_1
1142
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1143
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1144
-  (0.0ms) SAVEPOINT active_record_1
1145
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1146
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1147
-  (0.1ms) SAVEPOINT active_record_1
1148
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1150
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1151
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1152
-  (0.7ms) rollback transaction
1153
-  (0.0ms) begin transaction
1154
- ------------------------------------------------------------------------------------------------------------------
1155
- LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
1156
- ------------------------------------------------------------------------------------------------------------------
1157
-  (0.0ms) SAVEPOINT active_record_1
1158
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1159
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1160
-  (0.0ms) SAVEPOINT active_record_1
1161
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1162
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1163
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1164
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1165
-  (0.0ms) SAVEPOINT active_record_1
1166
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1167
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1169
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1170
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1171
-  (0.7ms) rollback transaction
1172
-  (0.0ms) begin transaction
1173
- -------------------------------------------------------------------------------------------------
1174
- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
1175
- -------------------------------------------------------------------------------------------------
1176
-  (0.0ms) SAVEPOINT active_record_1
1177
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1178
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1179
-  (1.0ms) rollback transaction
1180
-  (0.1ms) begin transaction
1181
- ------------------------------------------------------------------------------------------------------------
1182
- LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
1183
- ------------------------------------------------------------------------------------------------------------
1184
-  (0.0ms) SAVEPOINT active_record_1
1185
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1186
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1187
-  (0.8ms) rollback transaction
1188
-  (0.0ms) begin transaction
1189
- -----------------------------------------------------------------------------------------
1190
- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
1191
- -----------------------------------------------------------------------------------------
1192
-  (0.0ms) SAVEPOINT active_record_1
1193
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1194
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1195
-  (1.8ms) rollback transaction
1196
-  (0.1ms) begin transaction
1197
- ----------------------------------------------------------------------------------------------------------------
1198
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
1199
- ----------------------------------------------------------------------------------------------------------------
1200
-  (0.0ms) SAVEPOINT active_record_1
1201
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1202
-  (0.1ms) RELEASE SAVEPOINT active_record_1
1203
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1204
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1205
-  (2.9ms) rollback transaction
1206
-  (0.1ms) begin transaction
1207
- --------------------------------------------------------------------------------------------------------------------
1208
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
1209
- --------------------------------------------------------------------------------------------------------------------
1210
-  (0.0ms) SAVEPOINT active_record_1
1211
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1212
- SQL (0.8ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1214
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1215
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1216
-  (2.8ms) rollback transaction
1217
-  (0.4ms) begin transaction
1218
- -----------------------------------------------------------------------------------------------------------------
1219
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
1220
- -----------------------------------------------------------------------------------------------------------------
1221
-  (0.0ms) SAVEPOINT active_record_1
1222
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1223
-  (0.0ms) rollback transaction
1224
-  (0.0ms) begin transaction
1225
- ------------------------------
1226
- LargeTextFieldTest: test_truth
1227
- ------------------------------
1228
-  (0.0ms) rollback transaction
1229
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1230
-  (0.1ms) begin transaction
1231
- --------------------------------------------------------------------------------------------------
1232
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
1233
- --------------------------------------------------------------------------------------------------
1234
-  (0.0ms) rollback transaction
1235
-  (0.0ms) begin transaction
1236
- -----------------------------------------------------------------------------------------------------------------------
1237
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
1238
- -----------------------------------------------------------------------------------------------------------------------
1239
-  (0.0ms) SAVEPOINT active_record_1
1240
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1241
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1242
-  (0.0ms) SAVEPOINT active_record_1
1243
- SQL (0.2ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
1244
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1245
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
1246
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1247
-  (1.0ms) rollback transaction
1248
-  (0.0ms) begin transaction
1249
- --------------------------------------------------------------------------------------------------------------------------
1250
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
1251
- --------------------------------------------------------------------------------------------------------------------------
1252
-  (0.0ms) rollback transaction
1253
-  (0.0ms) begin transaction
1254
- -------------------------------------------------------------------------------------------------------
1255
- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
1256
- -------------------------------------------------------------------------------------------------------
1257
-  (0.0ms) SAVEPOINT active_record_1
1258
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1259
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1260
-  (0.0ms) SAVEPOINT active_record_1
1261
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
1262
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1263
-  (0.0ms) SAVEPOINT active_record_1
1264
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1266
-  (0.0ms) SAVEPOINT active_record_1
1267
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
1268
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1269
-  (0.0ms) SAVEPOINT active_record_1
1270
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1272
-  (0.7ms) rollback transaction
1273
-  (0.0ms) begin transaction
1274
- ------------------------------------------------------------------------------------------------------------------------------------
1275
- LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
1276
- ------------------------------------------------------------------------------------------------------------------------------------
1277
-  (0.0ms) SAVEPOINT active_record_1
1278
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1279
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1280
-  (0.0ms) SAVEPOINT active_record_1
1281
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1283
-  (0.0ms) SAVEPOINT active_record_1
1284
- SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
1285
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1286
-  (0.6ms) rollback transaction
1287
-  (0.0ms) begin transaction
1288
- ------------------------------
1289
- LargeTextFieldTest: test_truth
1290
- ------------------------------
1291
-  (0.0ms) rollback transaction
1292
-  (0.0ms) begin transaction
1293
- ----------------------------------------------------------------------------------------------------------
1294
- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
1295
- ----------------------------------------------------------------------------------------------------------
1296
-  (0.0ms) SAVEPOINT active_record_1
1297
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1298
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1299
-  (0.7ms) rollback transaction
1300
-  (0.0ms) begin transaction
1301
- ---------------------------------------------------------------------------------------------------
1302
- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
1303
- ---------------------------------------------------------------------------------------------------
1304
-  (0.0ms) SAVEPOINT active_record_1
1305
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1306
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1307
-  (0.0ms) SAVEPOINT active_record_1
1308
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
1310
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1311
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1312
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1314
- SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
1315
- SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
1316
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1317
-  (0.7ms) rollback transaction
1318
-  (0.0ms) begin transaction
1319
- ------------------------------------------------------------------------------------------------------
1320
- LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
1321
- ------------------------------------------------------------------------------------------------------
1322
-  (0.0ms) SAVEPOINT active_record_1
1323
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1324
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1325
-  (0.0ms) SAVEPOINT active_record_1
1326
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1328
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1329
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1331
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1333
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1334
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1335
-  (0.0ms) SAVEPOINT active_record_1
1336
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1337
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1338
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1339
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.6ms) rollback transaction
1341
-  (0.0ms) begin transaction
1342
- ----------------------------------------------------------------------------------------
1343
- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
1344
- ----------------------------------------------------------------------------------------
1345
-  (0.0ms) SAVEPOINT active_record_1
1346
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1347
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1348
-  (0.0ms) SAVEPOINT active_record_1
1349
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1350
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1352
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1353
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
1354
-  (0.7ms) rollback transaction
1355
-  (0.0ms) begin transaction
1356
- ----------------------------------------------------------------------------------------------
1357
- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
1358
- ----------------------------------------------------------------------------------------------
1359
-  (0.0ms) SAVEPOINT active_record_1
1360
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1361
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1362
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1363
-  (0.0ms) SAVEPOINT active_record_1
1364
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1365
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1366
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1367
-  (0.0ms) SAVEPOINT active_record_1
1368
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1369
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1370
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1371
-  (0.0ms) SAVEPOINT active_record_1
1372
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1373
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1374
-  (0.7ms) rollback transaction
1375
-  (0.0ms) begin transaction
1376
- ---------------------------------------------------------------------------------------------------
1377
- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
1378
- ---------------------------------------------------------------------------------------------------
1379
-  (0.0ms) SAVEPOINT active_record_1
1380
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1381
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1382
-  (0.0ms) SAVEPOINT active_record_1
1383
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1384
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1386
-  (0.0ms) SAVEPOINT active_record_1
1387
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1388
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
1390
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1391
-  (0.0ms) SAVEPOINT active_record_1
1392
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1393
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1394
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1396
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
1397
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
1398
- SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1399
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1400
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
1401
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
1402
-  (0.7ms) rollback transaction
1403
-  (0.0ms) begin transaction
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
-  (0.0ms) SAVEPOINT active_record_1
1408
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1409
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1410
-  (0.8ms) rollback transaction
1411
-  (0.0ms) begin transaction
1412
- ------------------------------------------------------------------------------------------------------
1413
- LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
1414
- ------------------------------------------------------------------------------------------------------
1415
-  (0.0ms) SAVEPOINT active_record_1
1416
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1417
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1418
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1420
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1422
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1423
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1424
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1426
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1427
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1428
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1429
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1430
-  (0.0ms) 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
-  (0.6ms) rollback transaction
1432
-  (0.0ms) begin transaction
1433
- ------------------------------------------------------------------------------------------------------------------
1434
- LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
1435
- ------------------------------------------------------------------------------------------------------------------
1436
-  (0.0ms) SAVEPOINT active_record_1
1437
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1438
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1439
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1440
-  (0.0ms) SAVEPOINT active_record_1
1441
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1442
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1443
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1444
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1445
-  (0.0ms) SAVEPOINT active_record_1
1446
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1447
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1448
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1449
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1450
-  (0.7ms) rollback transaction
1451
-  (0.0ms) begin transaction
1452
- --------------------------------------------------------------------------------------------------------------------
1453
- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
1454
- --------------------------------------------------------------------------------------------------------------------
1455
-  (0.0ms) SAVEPOINT active_record_1
1456
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1457
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1458
-  (0.0ms) SAVEPOINT active_record_1
1459
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1460
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1462
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1463
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1464
-  (0.6ms) rollback transaction
1465
-  (0.0ms) begin transaction
1466
- --------------------------------------------------------------------------------------------------------
1467
- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
1468
- --------------------------------------------------------------------------------------------------------
1469
-  (0.0ms) SAVEPOINT active_record_1
1470
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1471
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1472
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1473
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1475
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1477
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1478
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1479
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1480
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1481
-  (0.6ms) rollback transaction
1482
-  (0.0ms) begin transaction
1483
- ---------------------------------------------------------------------------------------------------
1484
- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
1485
- ---------------------------------------------------------------------------------------------------
1486
-  (0.0ms) SAVEPOINT active_record_1
1487
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1488
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1489
-  (0.0ms) SAVEPOINT active_record_1
1490
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
1491
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
1492
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1493
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1494
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1496
-  (0.7ms) rollback transaction
1497
-  (0.0ms) begin transaction
1498
- -------------------------------------------------------------------------------------------------------
1499
- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
1500
- -------------------------------------------------------------------------------------------------------
1501
-  (0.0ms) SAVEPOINT active_record_1
1502
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1503
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1504
-  (0.7ms) rollback transaction
1505
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1510
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1511
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1512
-  (0.7ms) rollback transaction
1513
-  (0.0ms) begin transaction
1514
- -----------------------------------------------------------------------------------------------------------------------
1515
- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
1516
- -----------------------------------------------------------------------------------------------------------------------
1517
-  (0.0ms) SAVEPOINT active_record_1
1518
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1519
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1520
-  (0.7ms) rollback transaction
1521
-  (0.0ms) begin transaction
1522
- ------------------------------------------------------------------------------
1523
- LargeTextField::OwnerTest: test_: a large text field should read from a file.
1524
- ------------------------------------------------------------------------------
1525
-  (0.0ms) SAVEPOINT active_record_1
1526
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1527
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1528
-  (0.0ms) SAVEPOINT active_record_1
1529
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1530
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1531
-  (0.0ms) SAVEPOINT active_record_1
1532
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1534
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1535
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1536
-  (0.7ms) rollback transaction
1537
-  (0.0ms) begin transaction
1538
- ------------------------------------------------------------------------------------------------------------------
1539
- LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
1540
- ------------------------------------------------------------------------------------------------------------------
1541
-  (0.0ms) SAVEPOINT active_record_1
1542
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1543
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1544
-  (0.0ms) SAVEPOINT active_record_1
1545
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1546
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1547
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1548
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1549
-  (0.0ms) SAVEPOINT active_record_1
1550
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1551
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1553
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1554
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1555
-  (0.7ms) rollback transaction
1556
-  (0.0ms) begin transaction
1557
- -------------------------------------------------------------------------------------------------
1558
- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
1559
- -------------------------------------------------------------------------------------------------
1560
-  (0.0ms) SAVEPOINT active_record_1
1561
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1562
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1563
-  (0.8ms) rollback transaction
1564
-  (0.0ms) begin transaction
1565
- ------------------------------------------------------------------------------------------------------------
1566
- LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
1567
- ------------------------------------------------------------------------------------------------------------
1568
-  (0.0ms) SAVEPOINT active_record_1
1569
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1570
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1571
-  (0.7ms) rollback transaction
1572
-  (0.0ms) begin transaction
1573
- -----------------------------------------------------------------------------------------
1574
- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
1575
- -----------------------------------------------------------------------------------------
1576
-  (0.0ms) SAVEPOINT active_record_1
1577
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1578
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1579
-  (0.8ms) rollback transaction
1580
-  (0.0ms) begin transaction
1581
- ----------------------------------------------------------------------------------------------------------------
1582
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
1583
- ----------------------------------------------------------------------------------------------------------------
1584
-  (0.0ms) SAVEPOINT active_record_1
1585
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1586
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1587
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1588
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1589
-  (0.8ms) rollback transaction
1590
-  (0.0ms) begin transaction
1591
- --------------------------------------------------------------------------------------------------------------------
1592
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
1593
- --------------------------------------------------------------------------------------------------------------------
1594
-  (0.0ms) SAVEPOINT active_record_1
1595
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1596
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1598
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1599
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1600
-  (0.7ms) rollback transaction
1601
-  (0.0ms) begin transaction
1602
- -----------------------------------------------------------------------------------------------------------------
1603
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
1604
- -----------------------------------------------------------------------------------------------------------------
1605
-  (0.0ms) SAVEPOINT active_record_1
1606
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1607
-  (0.0ms) rollback transaction
1608
-  (0.0ms) begin transaction
1609
- ---------------------------------------------------------------------------------------------------
1610
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
1611
- ---------------------------------------------------------------------------------------------------
1612
-  (0.0ms) SAVEPOINT active_record_1
1613
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
1614
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1616
-  (0.0ms) SAVEPOINT active_record_1
1617
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1619
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1620
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.6ms) rollback transaction
1622
-  (0.0ms) 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
-  (0.0ms) rollback transaction
1627
-  (63.6ms) 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
1628
-  (28.3ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`)
1629
-  (14.4ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB
1630
-  (14.6ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
1631
-  (25.4ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`) 
1632
-  (1.0ms) SELECT version FROM `schema_migrations`
1633
-  (0.5ms) INSERT INTO `schema_migrations` (version) VALUES ('20160217033529')
1634
-  (1.3ms) INSERT INTO `schema_migrations` (version) VALUES ('20110217210640')
1635
- ActiveRecord::SchemaMigration Load (3.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1636
-  (13.5ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
1637
-  (29.8ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
1638
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1639
- Migrating to AddLargeTextFields (20110217210640)
1640
-  (25.8ms) 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
-  (15.0ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) 
1642
-  (0.1ms) BEGIN
1643
- SQL (3.1ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20110217210640')
1644
-  (0.4ms) COMMIT
1645
- Migrating to CreateLibraries (20160217033529)
1646
-  (15.7ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB
1647
-  (0.1ms) BEGIN
1648
- SQL (0.8ms) INSERT INTO `schema_migrations` (`version`) VALUES ('20160217033529')
1649
-  (0.3ms) COMMIT
1650
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1651
-  (0.3ms) 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
-  (0.1ms) SHOW CREATE TABLE `large_text_fields`
1661
-  (0.2ms) 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
-  (0.1ms) SHOW CREATE TABLE `libraries`
1671
-  (6.3ms) DROP TABLE `large_text_fields` CASCADE
1672
-  (32.5ms) 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
-  (20.9ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` USING btree ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) 
1674
-  (4.1ms) DROP TABLE `libraries` CASCADE
1675
-  (12.3ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB
1676
-  (3.0ms) SELECT version FROM `schema_migrations`
1677
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT `schema_migrations`.* FROM `schema_migrations`
1678
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1679
-  (0.1ms) begin transaction
1680
- ----------------------------------------------------------------------------------------------------------
1681
- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
1682
- ----------------------------------------------------------------------------------------------------------
1683
-  (0.0ms) SAVEPOINT active_record_1
1684
- SQL (1.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1685
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1686
-  (0.9ms) rollback transaction
1687
-  (0.0ms) begin transaction
1688
- ---------------------------------------------------------------------------------------------------
1689
- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
1690
- ---------------------------------------------------------------------------------------------------
1691
-  (0.0ms) SAVEPOINT active_record_1
1692
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1693
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1694
-  (0.0ms) SAVEPOINT active_record_1
1695
- SQL (0.7ms) 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
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
1697
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1698
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1699
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1701
- SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
1702
- SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
1703
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1704
-  (0.9ms) rollback transaction
1705
-  (0.0ms) begin transaction
1706
- ------------------------------------------------------------------------------------------------------
1707
- LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
1708
- ------------------------------------------------------------------------------------------------------
1709
-  (0.0ms) SAVEPOINT active_record_1
1710
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1711
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1712
-  (0.0ms) SAVEPOINT active_record_1
1713
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1715
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1716
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1718
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1720
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1721
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1722
-  (0.0ms) SAVEPOINT active_record_1
1723
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1724
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1725
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1726
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.8ms) rollback transaction
1728
-  (0.0ms) begin transaction
1729
- ----------------------------------------------------------------------------------------
1730
- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
1731
- ----------------------------------------------------------------------------------------
1732
-  (0.0ms) SAVEPOINT active_record_1
1733
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1734
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1735
-  (0.0ms) SAVEPOINT active_record_1
1736
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1737
- SQL (0.0ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
1739
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1740
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
1741
-  (0.9ms) rollback transaction
1742
-  (0.0ms) begin transaction
1743
- ----------------------------------------------------------------------------------------------
1744
- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
1745
- ----------------------------------------------------------------------------------------------
1746
-  (0.0ms) SAVEPOINT active_record_1
1747
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1748
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1749
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1750
-  (0.0ms) SAVEPOINT active_record_1
1751
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1752
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1753
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1754
-  (0.0ms) SAVEPOINT active_record_1
1755
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1756
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1757
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
1758
-  (0.0ms) SAVEPOINT active_record_1
1759
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1760
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1761
-  (0.9ms) rollback transaction
1762
-  (0.0ms) begin transaction
1763
- ---------------------------------------------------------------------------------------------------
1764
- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
1765
- ---------------------------------------------------------------------------------------------------
1766
-  (0.0ms) SAVEPOINT active_record_1
1767
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1768
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1769
-  (0.0ms) SAVEPOINT active_record_1
1770
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
1771
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1773
-  (0.0ms) SAVEPOINT active_record_1
1774
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1775
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
1777
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1778
-  (0.0ms) SAVEPOINT active_record_1
1779
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1780
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1781
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1783
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
1784
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
1785
- SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1786
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1787
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
1788
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
1789
-  (1.0ms) rollback transaction
1790
-  (0.0ms) begin transaction
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
-  (0.0ms) SAVEPOINT active_record_1
1795
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1796
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1797
-  (0.9ms) rollback transaction
1798
-  (0.0ms) begin transaction
1799
- ------------------------------------------------------------------------------------------------------
1800
- LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
1801
- ------------------------------------------------------------------------------------------------------
1802
-  (0.0ms) SAVEPOINT active_record_1
1803
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1804
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1805
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1807
- SQL (0.1ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
1809
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1810
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1811
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1813
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1814
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1815
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1816
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1817
-  (0.0ms) 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
-  (0.9ms) rollback transaction
1819
-  (0.0ms) begin transaction
1820
- ------------------------------------------------------------------------------------------------------------------
1821
- LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
1822
- ------------------------------------------------------------------------------------------------------------------
1823
-  (0.0ms) SAVEPOINT active_record_1
1824
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1825
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1826
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1827
-  (0.0ms) SAVEPOINT active_record_1
1828
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1829
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1830
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1831
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
1832
-  (0.0ms) SAVEPOINT active_record_1
1833
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
1834
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
1835
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1836
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
1837
-  (2.0ms) rollback transaction
1838
-  (0.0ms) begin transaction
1839
- --------------------------------------------------------------------------------------------------------------------
1840
- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
1841
- --------------------------------------------------------------------------------------------------------------------
1842
-  (0.0ms) SAVEPOINT active_record_1
1843
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1844
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1845
-  (0.0ms) SAVEPOINT active_record_1
1846
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1847
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1849
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1850
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1851
-  (0.8ms) rollback transaction
1852
-  (0.0ms) begin transaction
1853
- --------------------------------------------------------------------------------------------------------
1854
- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
1855
- --------------------------------------------------------------------------------------------------------
1856
-  (0.0ms) SAVEPOINT active_record_1
1857
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1858
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1859
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1860
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1862
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1864
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1865
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1866
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1867
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1868
-  (0.8ms) rollback transaction
1869
-  (0.0ms) begin transaction
1870
- ---------------------------------------------------------------------------------------------------
1871
- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
1872
- ---------------------------------------------------------------------------------------------------
1873
-  (0.0ms) SAVEPOINT active_record_1
1874
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1875
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1876
-  (0.0ms) SAVEPOINT active_record_1
1877
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
1878
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
1879
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1880
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1881
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
1883
-  (0.8ms) rollback transaction
1884
-  (0.0ms) begin transaction
1885
- -------------------------------------------------------------------------------------------------------
1886
- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
1887
- -------------------------------------------------------------------------------------------------------
1888
-  (0.0ms) SAVEPOINT active_record_1
1889
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1890
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1891
-  (0.8ms) rollback transaction
1892
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
1897
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1898
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1899
-  (0.8ms) rollback transaction
1900
-  (0.0ms) begin transaction
1901
- -----------------------------------------------------------------------------------------------------------------------
1902
- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
1903
- -----------------------------------------------------------------------------------------------------------------------
1904
-  (0.0ms) SAVEPOINT active_record_1
1905
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1906
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1907
-  (0.7ms) rollback transaction
1908
-  (0.0ms) begin transaction
1909
- ------------------------------------------------------------------------------
1910
- LargeTextField::OwnerTest: test_: a large text field should read from a file.
1911
- ------------------------------------------------------------------------------
1912
-  (0.0ms) SAVEPOINT active_record_1
1913
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1914
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1915
-  (0.0ms) SAVEPOINT active_record_1
1916
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1917
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1918
-  (0.0ms) SAVEPOINT active_record_1
1919
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1921
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1922
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1923
-  (0.7ms) rollback transaction
1924
-  (0.0ms) begin transaction
1925
- ------------------------------------------------------------------------------------------------------------------
1926
- LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
1927
- ------------------------------------------------------------------------------------------------------------------
1928
-  (0.0ms) SAVEPOINT active_record_1
1929
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1930
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1931
-  (0.0ms) SAVEPOINT active_record_1
1932
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
1933
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
1934
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1935
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1936
-  (0.0ms) SAVEPOINT active_record_1
1937
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1938
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1940
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
1941
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1942
-  (0.7ms) rollback transaction
1943
-  (0.0ms) begin transaction
1944
- -------------------------------------------------------------------------------------------------
1945
- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
1946
- -------------------------------------------------------------------------------------------------
1947
-  (0.0ms) SAVEPOINT active_record_1
1948
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1949
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1950
-  (0.9ms) rollback transaction
1951
-  (0.0ms) begin transaction
1952
- ------------------------------------------------------------------------------------------------------------
1953
- LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
1954
- ------------------------------------------------------------------------------------------------------------
1955
-  (0.0ms) SAVEPOINT active_record_1
1956
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1957
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1958
-  (0.8ms) rollback transaction
1959
-  (0.0ms) begin transaction
1960
- -----------------------------------------------------------------------------------------
1961
- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
1962
- -----------------------------------------------------------------------------------------
1963
-  (0.0ms) SAVEPOINT active_record_1
1964
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1965
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1966
-  (0.9ms) rollback transaction
1967
-  (0.0ms) begin transaction
1968
- ----------------------------------------------------------------------------------------------------------------
1969
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
1970
- ----------------------------------------------------------------------------------------------------------------
1971
-  (0.0ms) SAVEPOINT active_record_1
1972
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1973
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1974
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1975
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1976
-  (0.8ms) rollback transaction
1977
-  (0.0ms) begin transaction
1978
- --------------------------------------------------------------------------------------------------------------------
1979
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
1980
- --------------------------------------------------------------------------------------------------------------------
1981
-  (0.0ms) SAVEPOINT active_record_1
1982
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
1983
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
1985
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
1986
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
1987
-  (0.7ms) rollback transaction
1988
-  (0.0ms) begin transaction
1989
- -----------------------------------------------------------------------------------------------------------------
1990
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
1991
- -----------------------------------------------------------------------------------------------------------------
1992
-  (0.0ms) SAVEPOINT active_record_1
1993
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1994
-  (0.0ms) rollback transaction
1995
-  (0.0ms) begin transaction
1996
- ------------------------------
1997
- LargeTextFieldTest: test_truth
1998
- ------------------------------
1999
-  (0.0ms) rollback transaction
2000
-  (0.0ms) begin transaction
2001
- ---------------------------------------------------------------------------------------------------
2002
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
2003
- ---------------------------------------------------------------------------------------------------
2004
-  (0.0ms) SAVEPOINT active_record_1
2005
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
2006
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2008
-  (0.0ms) SAVEPOINT active_record_1
2009
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2011
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2012
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.7ms) rollback transaction
2014
-  (0.0ms) 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
-  (0.0ms) rollback transaction
2019
-  (0.0ms) begin transaction
2020
- --------------------------------------------------------------------------------------------------
2021
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
2022
- --------------------------------------------------------------------------------------------------
2023
-  (0.0ms) rollback transaction
2024
-  (0.0ms) begin transaction
2025
- -----------------------------------------------------------------------------------------------------------------------
2026
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
2027
- -----------------------------------------------------------------------------------------------------------------------
2028
-  (0.0ms) SAVEPOINT active_record_1
2029
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2030
- SQL (0.1ms) 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]]
2031
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2032
-  (0.0ms) SAVEPOINT active_record_1
2033
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2035
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 2]]
2036
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2037
-  (0.8ms) rollback transaction
2038
-  (0.0ms) begin transaction
2039
- --------------------------------------------------------------------------------------------------------------------------
2040
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
2041
- --------------------------------------------------------------------------------------------------------------------------
2042
-  (0.0ms) rollback transaction
2043
-  (0.0ms) begin transaction
2044
- -------------------------------------------------------------------------------------------------------
2045
- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
2046
- -------------------------------------------------------------------------------------------------------
2047
-  (0.0ms) SAVEPOINT active_record_1
2048
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2049
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2051
-  (0.0ms) SAVEPOINT active_record_1
2052
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
2053
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2055
-  (0.0ms) SAVEPOINT active_record_1
2056
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
2057
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2058
-  (0.0ms) SAVEPOINT active_record_1
2059
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2061
-  (0.0ms) SAVEPOINT active_record_1
2062
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
2063
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2064
-  (0.7ms) rollback transaction
2065
-  (0.0ms) begin transaction
2066
- ------------------------------------------------------------------------------------------------------------------------------------
2067
- LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
2068
- ------------------------------------------------------------------------------------------------------------------------------------
2069
-  (0.0ms) SAVEPOINT active_record_1
2070
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2071
- SQL (0.1ms) 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]]
2072
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2073
-  (0.0ms) SAVEPOINT active_record_1
2074
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2076
-  (0.0ms) SAVEPOINT active_record_1
2077
- SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
2078
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
2079
-  (0.7ms) rollback transaction
2080
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2081
-  (0.1ms) begin transaction
2082
- ------------------------------
2083
- LargeTextFieldTest: test_truth
2084
- ------------------------------
2085
-  (0.0ms) rollback transaction
2086
-  (0.0ms) begin transaction
2087
- ---------------------------------------------------------------------------------------------------
2088
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
2089
- ---------------------------------------------------------------------------------------------------
2090
-  (0.0ms) SAVEPOINT active_record_1
2091
- SQL (1.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
2092
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2093
-  (0.1ms) SAVEPOINT active_record_1
2094
- SQL (0.7ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2096
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2097
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.8ms) rollback transaction
2099
-  (0.0ms) 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
-  (0.0ms) rollback transaction
2104
-  (0.0ms) begin transaction
2105
- --------------------------------------------------------------------------------------------------
2106
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
2107
- --------------------------------------------------------------------------------------------------
2108
-  (0.0ms) rollback transaction
2109
-  (0.0ms) begin transaction
2110
- -----------------------------------------------------------------------------------------------------------------------
2111
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
2112
- -----------------------------------------------------------------------------------------------------------------------
2113
-  (0.0ms) SAVEPOINT active_record_1
2114
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2115
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2116
-  (0.0ms) SAVEPOINT active_record_1
2117
- SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
2118
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2119
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
2120
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2121
-  (0.7ms) rollback transaction
2122
-  (0.0ms) begin transaction
2123
- --------------------------------------------------------------------------------------------------------------------------
2124
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
2125
- --------------------------------------------------------------------------------------------------------------------------
2126
-  (0.0ms) rollback transaction
2127
-  (0.0ms) begin transaction
2128
- -------------------------------------------------------------------------------------------------------
2129
- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
2130
- -------------------------------------------------------------------------------------------------------
2131
-  (0.0ms) SAVEPOINT active_record_1
2132
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2133
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2134
-  (0.0ms) SAVEPOINT active_record_1
2135
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
2136
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2137
-  (0.0ms) SAVEPOINT active_record_1
2138
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2140
-  (0.0ms) SAVEPOINT active_record_1
2141
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
2142
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2143
-  (0.0ms) SAVEPOINT active_record_1
2144
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2146
-  (0.7ms) rollback transaction
2147
-  (0.0ms) begin transaction
2148
- ------------------------------------------------------------------------------------------------------------------------------------
2149
- LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
2150
- ------------------------------------------------------------------------------------------------------------------------------------
2151
-  (0.0ms) SAVEPOINT active_record_1
2152
- SQL (0.2ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2153
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2154
-  (0.0ms) SAVEPOINT active_record_1
2155
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2157
-  (0.0ms) SAVEPOINT active_record_1
2158
- SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
2159
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
2160
-  (0.7ms) rollback transaction
2161
-  (0.0ms) begin transaction
2162
- ----------------------------------------------------------------------------------------------------------
2163
- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
2164
- ----------------------------------------------------------------------------------------------------------
2165
-  (0.0ms) SAVEPOINT active_record_1
2166
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2167
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2168
-  (0.9ms) rollback transaction
2169
-  (0.0ms) begin transaction
2170
- ---------------------------------------------------------------------------------------------------
2171
- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
2172
- ---------------------------------------------------------------------------------------------------
2173
-  (0.0ms) SAVEPOINT active_record_1
2174
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2175
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2176
-  (0.0ms) SAVEPOINT active_record_1
2177
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
2179
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2180
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2181
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2183
- SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
2184
- SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
2185
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2186
-  (0.7ms) rollback transaction
2187
-  (0.0ms) begin transaction
2188
- ------------------------------------------------------------------------------------------------------
2189
- LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
2190
- ------------------------------------------------------------------------------------------------------
2191
-  (0.0ms) SAVEPOINT active_record_1
2192
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2193
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2194
-  (0.0ms) SAVEPOINT active_record_1
2195
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2197
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2198
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2200
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2202
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2203
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2204
-  (0.0ms) SAVEPOINT active_record_1
2205
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
2206
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2207
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2208
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.8ms) rollback transaction
2210
-  (0.0ms) begin transaction
2211
- ----------------------------------------------------------------------------------------
2212
- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
2213
- ----------------------------------------------------------------------------------------
2214
-  (0.0ms) SAVEPOINT active_record_1
2215
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2216
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2217
-  (0.0ms) SAVEPOINT active_record_1
2218
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2219
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2221
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2222
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
2223
-  (0.9ms) rollback transaction
2224
-  (0.1ms) begin transaction
2225
- ----------------------------------------------------------------------------------------------
2226
- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
2227
- ----------------------------------------------------------------------------------------------
2228
-  (0.0ms) SAVEPOINT active_record_1
2229
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2230
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2231
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2232
-  (0.0ms) SAVEPOINT active_record_1
2233
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2234
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2235
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2236
-  (0.0ms) SAVEPOINT active_record_1
2237
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
2238
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2239
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2240
-  (0.0ms) SAVEPOINT active_record_1
2241
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2242
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2243
-  (0.7ms) rollback transaction
2244
-  (0.0ms) begin transaction
2245
- ---------------------------------------------------------------------------------------------------
2246
- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
2247
- ---------------------------------------------------------------------------------------------------
2248
-  (0.0ms) SAVEPOINT active_record_1
2249
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2250
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2251
-  (0.0ms) SAVEPOINT active_record_1
2252
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2253
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2255
-  (0.0ms) SAVEPOINT active_record_1
2256
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2257
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
2259
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2260
-  (0.0ms) SAVEPOINT active_record_1
2261
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2262
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2263
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2265
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
2266
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
2267
- SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
2268
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2269
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
2270
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
2271
-  (0.8ms) rollback transaction
2272
-  (0.0ms) begin transaction
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
-  (0.0ms) SAVEPOINT active_record_1
2277
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2278
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2279
-  (0.7ms) rollback transaction
2280
-  (0.0ms) begin transaction
2281
- ------------------------------------------------------------------------------------------------------
2282
- LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
2283
- ------------------------------------------------------------------------------------------------------
2284
-  (0.0ms) SAVEPOINT active_record_1
2285
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2286
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2287
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2289
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2291
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2292
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2293
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2295
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
2296
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2297
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2298
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2299
-  (0.0ms) 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
-  (0.7ms) rollback transaction
2301
-  (0.0ms) begin transaction
2302
- ------------------------------------------------------------------------------------------------------------------
2303
- LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
2304
- ------------------------------------------------------------------------------------------------------------------
2305
-  (0.0ms) SAVEPOINT active_record_1
2306
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2307
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2308
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
2309
-  (0.0ms) SAVEPOINT active_record_1
2310
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
2311
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
2312
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2313
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
2314
-  (0.0ms) SAVEPOINT active_record_1
2315
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
2316
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
2317
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2318
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
2319
-  (0.8ms) rollback transaction
2320
-  (0.0ms) begin transaction
2321
- --------------------------------------------------------------------------------------------------------------------
2322
- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
2323
- --------------------------------------------------------------------------------------------------------------------
2324
-  (0.0ms) SAVEPOINT active_record_1
2325
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2326
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2327
-  (0.0ms) SAVEPOINT active_record_1
2328
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2329
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2331
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2332
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2333
-  (0.7ms) rollback transaction
2334
-  (0.0ms) begin transaction
2335
- --------------------------------------------------------------------------------------------------------
2336
- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
2337
- --------------------------------------------------------------------------------------------------------
2338
-  (0.0ms) SAVEPOINT active_record_1
2339
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2340
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2341
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2342
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2344
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2346
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2347
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2348
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2349
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2350
-  (0.7ms) rollback transaction
2351
-  (0.0ms) begin transaction
2352
- ---------------------------------------------------------------------------------------------------
2353
- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
2354
- ---------------------------------------------------------------------------------------------------
2355
-  (0.0ms) SAVEPOINT active_record_1
2356
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2357
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2358
-  (0.0ms) SAVEPOINT active_record_1
2359
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
2360
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
2361
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2362
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2363
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
2365
-  (0.8ms) rollback transaction
2366
-  (0.0ms) begin transaction
2367
- -------------------------------------------------------------------------------------------------------
2368
- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
2369
- -------------------------------------------------------------------------------------------------------
2370
-  (0.0ms) SAVEPOINT active_record_1
2371
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2372
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2373
-  (0.7ms) rollback transaction
2374
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2379
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2380
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2381
-  (0.7ms) rollback transaction
2382
-  (0.0ms) begin transaction
2383
- -----------------------------------------------------------------------------------------------------------------------
2384
- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
2385
- -----------------------------------------------------------------------------------------------------------------------
2386
-  (0.0ms) SAVEPOINT active_record_1
2387
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2388
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2389
-  (0.8ms) rollback transaction
2390
-  (0.0ms) begin transaction
2391
- ------------------------------------------------------------------------------
2392
- LargeTextField::OwnerTest: test_: a large text field should read from a file.
2393
- ------------------------------------------------------------------------------
2394
-  (0.0ms) SAVEPOINT active_record_1
2395
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2396
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2397
-  (0.0ms) SAVEPOINT active_record_1
2398
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2399
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2400
-  (0.0ms) SAVEPOINT active_record_1
2401
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2403
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2404
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2405
-  (0.7ms) rollback transaction
2406
-  (0.0ms) begin transaction
2407
- ------------------------------------------------------------------------------------------------------------------
2408
- LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
2409
- ------------------------------------------------------------------------------------------------------------------
2410
-  (0.0ms) SAVEPOINT active_record_1
2411
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2412
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2413
-  (0.0ms) SAVEPOINT active_record_1
2414
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
2415
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
2416
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2417
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2418
-  (0.0ms) SAVEPOINT active_record_1
2419
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2420
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2422
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2423
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2424
-  (0.7ms) rollback transaction
2425
-  (0.0ms) begin transaction
2426
- -------------------------------------------------------------------------------------------------
2427
- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
2428
- -------------------------------------------------------------------------------------------------
2429
-  (0.0ms) SAVEPOINT active_record_1
2430
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2431
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2432
-  (0.8ms) rollback transaction
2433
-  (0.0ms) begin transaction
2434
- ------------------------------------------------------------------------------------------------------------
2435
- LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
2436
- ------------------------------------------------------------------------------------------------------------
2437
-  (0.0ms) SAVEPOINT active_record_1
2438
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2439
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2440
-  (0.8ms) rollback transaction
2441
-  (0.0ms) begin transaction
2442
- -----------------------------------------------------------------------------------------
2443
- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
2444
- -----------------------------------------------------------------------------------------
2445
-  (0.0ms) SAVEPOINT active_record_1
2446
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2447
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2448
-  (1.6ms) rollback transaction
2449
-  (0.0ms) begin transaction
2450
- ----------------------------------------------------------------------------------------------------------------
2451
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
2452
- ----------------------------------------------------------------------------------------------------------------
2453
-  (0.0ms) SAVEPOINT active_record_1
2454
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2455
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2456
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2457
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2458
-  (0.8ms) rollback transaction
2459
-  (0.0ms) begin transaction
2460
- --------------------------------------------------------------------------------------------------------------------
2461
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
2462
- --------------------------------------------------------------------------------------------------------------------
2463
-  (0.0ms) SAVEPOINT active_record_1
2464
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2465
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2467
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2468
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2469
-  (0.7ms) rollback transaction
2470
-  (0.0ms) begin transaction
2471
- -----------------------------------------------------------------------------------------------------------------
2472
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
2473
- -----------------------------------------------------------------------------------------------------------------
2474
-  (0.0ms) SAVEPOINT active_record_1
2475
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
2476
-  (0.0ms) rollback transaction
2477
-  (11.5ms) DROP TABLE `large_text_fields` CASCADE
2478
-  (22.7ms) 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
-  (41.1ms) CREATE UNIQUE INDEX `large_text_field_by_owner_field` USING btree ON `large_text_fields` (`owner_type`, `owner_id`, `field_name`) 
2480
-  (2.9ms) DROP TABLE `libraries` CASCADE
2481
-  (16.0ms) CREATE TABLE `libraries` (`id` int(11) auto_increment PRIMARY KEY, `name` varchar(255) NOT NULL) ENGINE=InnoDB
2482
-  (8.5ms) SELECT version FROM `schema_migrations`
2483
- ActiveRecord::SchemaMigration Load (1.8ms) SELECT `schema_migrations`.* FROM `schema_migrations`
2484
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2485
-  (0.1ms) begin transaction
2486
- --------------------------------------------------------------------------------------------------
2487
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
2488
- --------------------------------------------------------------------------------------------------
2489
-  (0.1ms) rollback transaction
2490
-  (0.0ms) begin transaction
2491
- -----------------------------------------------------------------------------------------------------------------------
2492
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
2493
- -----------------------------------------------------------------------------------------------------------------------
2494
-  (0.0ms) SAVEPOINT active_record_1
2495
- SQL (1.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2496
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2497
-  (0.1ms) SAVEPOINT active_record_1
2498
- SQL (0.7ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
2499
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2500
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 1]]
2501
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2502
-  (0.8ms) rollback transaction
2503
-  (0.0ms) begin transaction
2504
- --------------------------------------------------------------------------------------------------------------------------
2505
- LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
2506
- --------------------------------------------------------------------------------------------------------------------------
2507
-  (0.0ms) rollback transaction
2508
-  (0.0ms) begin transaction
2509
- -------------------------------------------------------------------------------------------------------
2510
- LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
2511
- -------------------------------------------------------------------------------------------------------
2512
-  (0.1ms) SAVEPOINT active_record_1
2513
- SQL (0.7ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2514
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2515
-  (0.0ms) SAVEPOINT active_record_1
2516
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria"]]
2517
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2518
-  (0.0ms) SAVEPOINT active_record_1
2519
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2521
-  (0.0ms) SAVEPOINT active_record_1
2522
- SQL (0.0ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
2523
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2524
-  (0.1ms) SAVEPOINT active_record_1
2525
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2527
-  (1.0ms) rollback transaction
2528
-  (0.0ms) begin transaction
2529
- ------------------------------------------------------------------------------------------------------------------------------------
2530
- LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
2531
- ------------------------------------------------------------------------------------------------------------------------------------
2532
-  (0.0ms) SAVEPOINT active_record_1
2533
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2534
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2535
-  (0.0ms) SAVEPOINT active_record_1
2536
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2538
-  (0.0ms) SAVEPOINT active_record_1
2539
- SQL (0.1ms) INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
2540
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
2541
-  (0.7ms) rollback transaction
2542
-  (0.0ms) begin transaction
2543
- ---------------------------------------------------------------------------------------------------
2544
- LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
2545
- ---------------------------------------------------------------------------------------------------
2546
-  (0.0ms) SAVEPOINT active_record_1
2547
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
2548
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2549
-  (0.0ms) SAVEPOINT active_record_1
2550
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2552
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2553
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.8ms) rollback transaction
2555
-  (0.1ms) 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
-  (0.1ms) rollback transaction
2560
-  (0.0ms) begin transaction
2561
- ----------------------------------------------------------------------------------------------------------
2562
- LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
2563
- ----------------------------------------------------------------------------------------------------------
2564
-  (0.1ms) SAVEPOINT active_record_1
2565
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2566
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2567
-  (0.9ms) rollback transaction
2568
-  (0.0ms) begin transaction
2569
- --------------------------------------------------------------------------------------------------------------
2570
- LargeTextField::OwnerTest: test_: a large text field should allow a single argument to be passed into reload.
2571
- --------------------------------------------------------------------------------------------------------------
2572
-  (0.0ms) SAVEPOINT active_record_1
2573
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2574
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2575
-  (0.0ms) SAVEPOINT active_record_1
2576
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
2577
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
2578
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2579
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1  [["id", 2]]
2580
-  (0.7ms) rollback transaction
2581
-  (0.1ms) begin transaction
2582
- ---------------------------------------------------------------------------------------------------
2583
- LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
2584
- ---------------------------------------------------------------------------------------------------
2585
-  (0.0ms) SAVEPOINT active_record_1
2586
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2587
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2588
-  (0.0ms) SAVEPOINT active_record_1
2589
- SQL (0.1ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
2591
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2592
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2593
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2595
- SQL (0.1ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
2596
- SQL (0.1ms) UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "third"], ["id", 1]]
2597
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2598
-  (1.0ms) rollback transaction
2599
-  (0.0ms) begin transaction
2600
- ------------------------------------------------------------------------------------------------------
2601
- LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
2602
- ------------------------------------------------------------------------------------------------------
2603
-  (0.0ms) SAVEPOINT active_record_1
2604
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2605
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2606
-  (0.1ms) SAVEPOINT active_record_1
2607
- SQL (0.4ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2609
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2610
- LargeTextField::NamedTextValue Load (0.1ms) 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
-  (0.1ms) SAVEPOINT active_record_1
2612
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2614
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2615
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2616
-  (0.0ms) SAVEPOINT active_record_1
2617
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
2618
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2619
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2620
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (1.0ms) rollback transaction
2622
-  (0.0ms) begin transaction
2623
- ----------------------------------------------------------------------------------------
2624
- LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
2625
- ----------------------------------------------------------------------------------------
2626
-  (0.0ms) SAVEPOINT active_record_1
2627
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2628
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2629
-  (0.0ms) SAVEPOINT active_record_1
2630
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2631
- SQL (0.0ms) 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
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2633
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2634
- LargeTextField::NamedTextValue Load (0.1ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)
2635
-  (0.7ms) rollback transaction
2636
-  (0.0ms) begin transaction
2637
- ----------------------------------------------------------------------------------------------
2638
- LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
2639
- ----------------------------------------------------------------------------------------------
2640
-  (0.0ms) SAVEPOINT active_record_1
2641
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2642
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2643
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2644
-  (0.1ms) SAVEPOINT active_record_1
2645
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2646
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2647
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2648
-  (0.0ms) SAVEPOINT active_record_1
2649
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
2650
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2651
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
2652
-  (0.0ms) SAVEPOINT active_record_1
2653
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2654
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2655
-  (0.8ms) rollback transaction
2656
-  (0.0ms) begin transaction
2657
- ---------------------------------------------------------------------------------------------------
2658
- LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
2659
- ---------------------------------------------------------------------------------------------------
2660
-  (0.0ms) SAVEPOINT active_record_1
2661
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2662
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2663
-  (0.0ms) SAVEPOINT active_record_1
2664
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
2665
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2667
-  (0.0ms) SAVEPOINT active_record_1
2668
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2669
- SQL (0.0ms) 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
- SQL (0.0ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
2671
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2672
-  (0.0ms) SAVEPOINT active_record_1
2673
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2674
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2675
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2677
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
2678
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 4]]
2679
- SQL (0.1ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
2680
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2681
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
2682
- LargeTextField::NamedTextValue Load (0.0ms) SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 4]]
2683
-  (0.7ms) rollback transaction
2684
-  (0.0ms) begin transaction
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
-  (0.0ms) SAVEPOINT active_record_1
2689
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2690
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2691
-  (1.3ms) rollback transaction
2692
-  (0.1ms) begin transaction
2693
- ------------------------------------------------------------------------------------------------------
2694
- LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
2695
- ------------------------------------------------------------------------------------------------------
2696
-  (0.0ms) SAVEPOINT active_record_1
2697
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2698
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2699
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2701
- SQL (0.2ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2703
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2704
- LargeTextField::NamedTextValue Load (0.1ms) 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"]]
2705
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2707
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
2708
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2709
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2710
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2711
-  (0.0ms) 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
-  (1.0ms) rollback transaction
2713
-  (0.0ms) begin transaction
2714
- ------------------------------------------------------------------------------------------------------------------
2715
- LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
2716
- ------------------------------------------------------------------------------------------------------------------
2717
-  (0.0ms) SAVEPOINT active_record_1
2718
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2719
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2720
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
2721
-  (0.0ms) SAVEPOINT active_record_1
2722
- SQL (0.1ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
2723
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
2724
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2725
-  (0.1ms) SELECT COUNT(*) FROM "large_text_fields"
2726
-  (0.0ms) SAVEPOINT active_record_1
2727
- SQL (0.0ms) DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
2728
- SQL (0.0ms) DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
2729
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2730
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields"
2731
-  (0.8ms) rollback transaction
2732
-  (0.0ms) begin transaction
2733
- --------------------------------------------------------------------------------------------------------------------
2734
- LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
2735
- --------------------------------------------------------------------------------------------------------------------
2736
-  (0.0ms) SAVEPOINT active_record_1
2737
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2738
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2739
-  (0.0ms) SAVEPOINT active_record_1
2740
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2741
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2743
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2744
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2745
-  (1.4ms) rollback transaction
2746
-  (0.0ms) begin transaction
2747
- --------------------------------------------------------------------------------------------------------
2748
- LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
2749
- --------------------------------------------------------------------------------------------------------
2750
-  (0.0ms) SAVEPOINT active_record_1
2751
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2752
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2753
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2754
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2756
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2758
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2759
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2760
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2761
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2762
-  (0.8ms) rollback transaction
2763
-  (0.0ms) begin transaction
2764
- ---------------------------------------------------------------------------------------------------
2765
- LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
2766
- ---------------------------------------------------------------------------------------------------
2767
-  (0.0ms) SAVEPOINT active_record_1
2768
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2769
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2770
-  (0.0ms) SAVEPOINT active_record_1
2771
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
2772
- SQL (0.2ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
2773
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2774
- Library Load (0.1ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2775
- LargeTextField::NamedTextValue Load (0.0ms) 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
-  (0.0ms) SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
2777
-  (0.9ms) rollback transaction
2778
-  (0.0ms) begin transaction
2779
- -------------------------------------------------------------------------------------------------------
2780
- LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
2781
- -------------------------------------------------------------------------------------------------------
2782
-  (0.0ms) SAVEPOINT active_record_1
2783
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2784
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2785
-  (1.3ms) rollback transaction
2786
-  (0.0ms) 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
-  (0.0ms) SAVEPOINT active_record_1
2791
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2792
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2793
-  (1.3ms) rollback transaction
2794
-  (0.0ms) begin transaction
2795
- -----------------------------------------------------------------------------------------------------------------------
2796
- LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
2797
- -----------------------------------------------------------------------------------------------------------------------
2798
-  (0.0ms) SAVEPOINT active_record_1
2799
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2800
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2801
-  (1.5ms) rollback transaction
2802
-  (0.1ms) begin transaction
2803
- ------------------------------------------------------------------------------
2804
- LargeTextField::OwnerTest: test_: a large text field should read from a file.
2805
- ------------------------------------------------------------------------------
2806
-  (0.0ms) SAVEPOINT active_record_1
2807
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2808
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2809
-  (0.0ms) SAVEPOINT active_record_1
2810
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2811
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2812
-  (0.0ms) SAVEPOINT active_record_1
2813
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2815
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2816
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2817
-  (0.8ms) rollback transaction
2818
-  (0.0ms) begin transaction
2819
- ------------------------------------------------------------------------------------------------------------------
2820
- LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
2821
- ------------------------------------------------------------------------------------------------------------------
2822
-  (0.0ms) SAVEPOINT active_record_1
2823
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2824
-  (0.1ms) RELEASE SAVEPOINT active_record_1
2825
-  (0.0ms) SAVEPOINT active_record_1
2826
- SQL (0.0ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
2827
- SQL (0.1ms) INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
2828
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2829
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2830
-  (0.0ms) SAVEPOINT active_record_1
2831
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2832
- SQL (0.0ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2834
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
2835
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2836
-  (1.1ms) rollback transaction
2837
-  (0.1ms) begin transaction
2838
- -------------------------------------------------------------------------------------------------
2839
- LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
2840
- -------------------------------------------------------------------------------------------------
2841
-  (0.0ms) SAVEPOINT active_record_1
2842
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2843
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2844
-  (1.0ms) rollback transaction
2845
-  (0.0ms) begin transaction
2846
- ------------------------------------------------------------------------------------------------------------
2847
- LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
2848
- ------------------------------------------------------------------------------------------------------------
2849
-  (0.0ms) SAVEPOINT active_record_1
2850
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2851
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2852
-  (0.8ms) rollback transaction
2853
-  (0.0ms) begin transaction
2854
- -----------------------------------------------------------------------------------------
2855
- LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
2856
- -----------------------------------------------------------------------------------------
2857
-  (0.0ms) SAVEPOINT active_record_1
2858
- SQL (0.3ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2859
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2860
-  (0.9ms) rollback transaction
2861
-  (0.0ms) begin transaction
2862
- ----------------------------------------------------------------------------------------------------------------
2863
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
2864
- ----------------------------------------------------------------------------------------------------------------
2865
-  (0.0ms) SAVEPOINT active_record_1
2866
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2867
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2868
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2869
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2870
-  (1.2ms) rollback transaction
2871
-  (0.1ms) begin transaction
2872
- --------------------------------------------------------------------------------------------------------------------
2873
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
2874
- --------------------------------------------------------------------------------------------------------------------
2875
-  (0.0ms) SAVEPOINT active_record_1
2876
- SQL (0.4ms) INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
2877
- SQL (0.1ms) 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
-  (0.0ms) RELEASE SAVEPOINT active_record_1
2879
- Library Load (0.0ms) SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
2880
- LargeTextField::NamedTextValue Load (0.0ms) 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"]]
2881
-  (0.8ms) rollback transaction
2882
-  (0.1ms) begin transaction
2883
- -----------------------------------------------------------------------------------------------------------------
2884
- LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
2885
- -----------------------------------------------------------------------------------------------------------------
2886
-  (0.0ms) SAVEPOINT active_record_1
2887
-  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
2888
-  (0.0ms) rollback transaction
2889
-  (0.1ms) begin transaction
2890
- ------------------------------
2891
- LargeTextFieldTest: test_truth
2892
- ------------------------------
2893
-  (0.0ms) rollback transaction