large_text_field 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/large_text_field/version.rb +1 -1
- data/test/dummy/log/test.log +794 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40f3feb2ddeb7499788d2f89e5e5f6d65944c69f
|
4
|
+
data.tar.gz: 97fd1b431fc477370eb2822f979ab6409186c821
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92550cce241931423df48769f67fb3caf6750c3af8b85445883be0513f346e93b4cae87006fa3054fd589cce4f8036caad17c3373d69850cae196dd02734937a
|
7
|
+
data.tar.gz: 24dec0903a9b9100fc3242519f746151d1e57edf7bf4e3c7ab1382ccad0c914c66e179f84968b296bcfbf5896cc5016fd67a2ab8771c9b788e23534b018a0a05
|
data/test/dummy/log/test.log
CHANGED
@@ -5031,5 +5031,799 @@ LargeTextField::NamedTextValueTest: test_: unique index should raise a unique co
|
|
5031
5031
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5032
5032
|
------------------------------
|
5033
5033
|
LargeTextFieldTest: test_truth
|
5034
|
+
------------------------------
|
5035
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
5036
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5037
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5038
|
+
---------------------------------------------------------------------------------------------------
|
5039
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
5040
|
+
---------------------------------------------------------------------------------------------------
|
5041
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5042
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
|
5043
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5044
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5045
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " The Royal Library of Alexandria or Ancient Library of Alexandria in Alexandria, Egypt, was one of the\n largest and most significant libraries of the ancient world. It was dedicated to the Muses, the nine\n goddesses of the arts.[1] It flourished under the patronage of the Ptolemaic dynasty and functioned\n as a major center of scholarship from its construction in the 3rd century BCE until the Roman conquest\n of Egypt in 30 BCE, with collections of works, lecture halls, meeting rooms, and gardens. The library\n was part of a larger research institution called the Musaeum of Alexandria, where many of the most\n famous thinkers of the ancient world studied.\n\n The library was created by Ptolemy I Soter, who was a Macedonian general and the successor of Alexander\n the Great.[2] Most of the books were kept as papyrus scrolls. It is unknown how many such scrolls were\n housed at any given time.\n\n The library is famous for having been burned down, resulting in the loss of many scrolls and books; its\n destruction has become a symbol for the loss of cultural knowledge. A few sources differ on who is\n responsible for the destruction and when it occurred. There is mythology regarding this main burning\n but the library may in truth have suffered several fires or other acts of destruction over many years.\n Possible occasions for the partial or complete destruction of the Library of Alexandria include a fire\n set by Julius Caesar in 48 BCE and an attack by Aurelian in the CE 270s.\n\n After the main library was fully destroyed, ancient scholars used a \"daughter library\" in a temple known\n as the Serapeum, located in another part of the city. According to Socrates of Constantinople, Coptic Pope\n Theophilus destroyed the Serapeum in AD 391, although it's not certain that it still contained an offshoot\n of the library then.\n"]]
|
5046
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5047
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5048
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5049
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
5050
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5051
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
5052
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
5053
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
5054
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5055
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5056
|
+
--------------------------------------------------------------------------------------------------
|
5057
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
5058
|
+
--------------------------------------------------------------------------------------------------
|
5059
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5060
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5061
|
+
-----------------------------------------------------------------------------------------------------------------------
|
5062
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
5063
|
+
-----------------------------------------------------------------------------------------------------------------------
|
5064
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5065
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5066
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5067
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5068
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
5069
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5070
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 1]]
|
5071
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5072
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
5073
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5074
|
+
--------------------------------------------------------------------------------------------------------------------------
|
5075
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
5076
|
+
--------------------------------------------------------------------------------------------------------------------------
|
5077
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5078
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5079
|
+
-------------------------------------------------------------------------------------------------------
|
5080
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
5081
|
+
-------------------------------------------------------------------------------------------------------
|
5082
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5083
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5084
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5085
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5086
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
5087
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5088
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5089
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
5090
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5091
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5092
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
5093
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5094
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5095
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
5096
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5097
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
5098
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5099
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
5100
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
5101
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
5102
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5103
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5104
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5105
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5106
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
5107
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5108
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5109
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
5110
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
5111
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
5112
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5113
|
+
----------------------------------------------------------------------------------------------------------
|
5114
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
5115
|
+
----------------------------------------------------------------------------------------------------------
|
5116
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5117
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5118
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5119
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
5120
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5121
|
+
---------------------------------------------------------------------------------------------------
|
5122
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
5123
|
+
---------------------------------------------------------------------------------------------------
|
5124
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5125
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5126
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5127
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5128
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5129
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
5130
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5131
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5132
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5133
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5134
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
5135
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
5136
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5137
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
5138
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5139
|
+
------------------------------------------------------------------------------------------------------
|
5140
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
5141
|
+
------------------------------------------------------------------------------------------------------
|
5142
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5143
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5144
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5145
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5146
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
5147
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5148
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5149
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5150
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5151
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
5152
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5153
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5154
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5155
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5156
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
5157
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5158
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5159
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5160
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
5161
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5162
|
+
----------------------------------------------------------------------------------------
|
5163
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
5164
|
+
----------------------------------------------------------------------------------------
|
5165
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5166
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5167
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5168
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5169
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5170
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
5171
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5172
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5173
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.2ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
5174
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
5175
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5176
|
+
----------------------------------------------------------------------------------------------
|
5177
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
5178
|
+
----------------------------------------------------------------------------------------------
|
5179
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5180
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5181
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5182
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5183
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5184
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5185
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5186
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5187
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5188
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
5189
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5190
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5191
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5192
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5193
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5194
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
5195
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5196
|
+
---------------------------------------------------------------------------------------------------
|
5197
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
5198
|
+
---------------------------------------------------------------------------------------------------
|
5199
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5200
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5201
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5202
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5203
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5204
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
5205
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5206
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5207
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5208
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
5209
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
5210
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5211
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5212
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5213
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5214
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5215
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5216
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
5217
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
5218
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
5219
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5220
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
5221
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
5222
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
5223
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5224
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
5225
|
+
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.
|
5226
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
5227
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5228
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5229
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5230
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
5231
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5232
|
+
------------------------------------------------------------------------------------------------------
|
5233
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
5234
|
+
------------------------------------------------------------------------------------------------------
|
5235
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5236
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5237
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5238
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5239
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5240
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5241
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5242
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5243
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5244
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5245
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5246
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
5247
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5248
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5249
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5250
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5251
|
+
[1m[36m (0.6ms)[0m [1mrollback transaction[0m
|
5252
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5253
|
+
------------------------------------------------------------------------------------------------------------------
|
5254
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
5255
|
+
------------------------------------------------------------------------------------------------------------------
|
5256
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5257
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5258
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5259
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
5260
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5261
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
5262
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
5263
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5264
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
5265
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5266
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
5267
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
5268
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5269
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
5270
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
5271
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5272
|
+
--------------------------------------------------------------------------------------------------------------------
|
5273
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
5274
|
+
--------------------------------------------------------------------------------------------------------------------
|
5275
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5276
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5277
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5278
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5279
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5280
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
5281
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5282
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
5283
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5284
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
5285
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5286
|
+
--------------------------------------------------------------------------------------------------------
|
5287
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
5288
|
+
--------------------------------------------------------------------------------------------------------
|
5289
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5290
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5291
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5292
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5293
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5294
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5295
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5296
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5297
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5298
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5299
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5300
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5301
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
5302
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5303
|
+
---------------------------------------------------------------------------------------------------
|
5304
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
5305
|
+
---------------------------------------------------------------------------------------------------
|
5306
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5307
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5308
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5309
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5310
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
5311
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
5312
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5313
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
5314
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
5315
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5316
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
5317
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5318
|
+
-------------------------------------------------------------------------------------------------------
|
5319
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
5320
|
+
-------------------------------------------------------------------------------------------------------
|
5321
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5322
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5323
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5324
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
5325
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5326
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
5327
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
5328
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
5329
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5330
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5331
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5332
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
5333
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5334
|
+
-----------------------------------------------------------------------------------------------------------------------
|
5335
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
5336
|
+
-----------------------------------------------------------------------------------------------------------------------
|
5337
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5338
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5339
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5340
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
5341
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5342
|
+
------------------------------------------------------------------------------
|
5343
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
5344
|
+
------------------------------------------------------------------------------
|
5345
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5346
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5347
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5348
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5349
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5350
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5351
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5352
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
5353
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5354
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
5355
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5356
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
5357
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5358
|
+
------------------------------------------------------------------------------------------------------------------
|
5359
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
5360
|
+
------------------------------------------------------------------------------------------------------------------
|
5361
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5362
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5363
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5364
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5365
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
5366
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
5367
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5368
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
5369
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5370
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5371
|
+
[1m[35mSQL (0.0ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
5372
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5373
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
5374
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5375
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
5376
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5377
|
+
-------------------------------------------------------------------------------------------------
|
5378
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
5379
|
+
-------------------------------------------------------------------------------------------------
|
5380
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5381
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5382
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5383
|
+
[1m[36m (1.1ms)[0m [1mrollback transaction[0m
|
5384
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5385
|
+
------------------------------------------------------------------------------------------------------------
|
5386
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
5387
|
+
------------------------------------------------------------------------------------------------------------
|
5388
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5389
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5390
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5391
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
5392
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5393
|
+
-----------------------------------------------------------------------------------------
|
5394
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
5395
|
+
-----------------------------------------------------------------------------------------
|
5396
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5397
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5398
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5399
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
5400
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5401
|
+
----------------------------------------------------------------------------------------------------------------
|
5402
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
5403
|
+
----------------------------------------------------------------------------------------------------------------
|
5404
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5405
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5406
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5407
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5408
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5409
|
+
[1m[35m (1.1ms)[0m rollback transaction
|
5410
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5411
|
+
--------------------------------------------------------------------------------------------------------------------
|
5412
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
5413
|
+
--------------------------------------------------------------------------------------------------------------------
|
5414
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5415
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5416
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
5417
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5418
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5419
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5420
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
5421
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5422
|
+
-----------------------------------------------------------------------------------------------------------------
|
5423
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
5424
|
+
-----------------------------------------------------------------------------------------------------------------
|
5425
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5426
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
5427
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
5428
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5429
|
+
------------------------------
|
5430
|
+
LargeTextFieldTest: test_truth
|
5431
|
+
------------------------------
|
5432
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
5433
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5434
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5435
|
+
---------------------------------------------------------------------------------------------------
|
5436
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to construct a library.
|
5437
|
+
---------------------------------------------------------------------------------------------------
|
5438
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5439
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Alexandria Public Library"]]
|
5440
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5441
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5442
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", " 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"]]
|
5443
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5444
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5445
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.2ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5446
|
+
[1m[36m (1.3ms)[0m [1mrollback transaction[0m
|
5447
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5448
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
5449
|
+
LargeTextField::LibraryTest: test_: LargeTextField::Library should be able to dup a class that has no current large text field.
|
5450
|
+
--------------------------------------------------------------------------------------------------------------------------------
|
5451
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5452
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5453
|
+
--------------------------------------------------------------------------------------------------
|
5454
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should belong to owner.
|
5455
|
+
--------------------------------------------------------------------------------------------------
|
5456
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5457
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5458
|
+
-----------------------------------------------------------------------------------------------------------------------
|
5459
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should have field name and value attributes.
|
5460
|
+
-----------------------------------------------------------------------------------------------------------------------
|
5461
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5462
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5463
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5464
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5465
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
5466
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5467
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 1]]
|
5468
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5469
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
5470
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5471
|
+
--------------------------------------------------------------------------------------------------------------------------
|
5472
|
+
LargeTextField::NamedTextValueTest: test_: LargeTextField::NamedTextValue should use large_text_fields as the table name.
|
5473
|
+
--------------------------------------------------------------------------------------------------------------------------
|
5474
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
5475
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5476
|
+
-------------------------------------------------------------------------------------------------------
|
5477
|
+
LargeTextField::NamedTextValueTest: test_: unique index should allow different owners and field names.
|
5478
|
+
-------------------------------------------------------------------------------------------------------
|
5479
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5480
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5481
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5482
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5483
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Alexandria"]]
|
5484
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5485
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5486
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
5487
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5488
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5489
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "dog"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
5490
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5491
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5492
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 2], ["owner_type", "Library"]]
|
5493
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5494
|
+
[1m[35m (2.1ms)[0m rollback transaction
|
5495
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5496
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
5497
|
+
LargeTextField::NamedTextValueTest: test_: unique index should raise a unique constraint failure on the same owner, and field name.
|
5498
|
+
------------------------------------------------------------------------------------------------------------------------------------
|
5499
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5500
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5501
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5502
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5503
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?) [["field_name", "puppy"], ["value", "Millie"], ["owner_id", 1], ["owner_type", "Library"]]
|
5504
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5505
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5506
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("field_name", "value", "owner_id", "owner_type") VALUES (?, ?, ?, ?)[0m [["field_name", "puppy"], ["value", "Wiki"], ["owner_id", 1], ["owner_type", "Library"]]
|
5507
|
+
[1m[35m (0.0ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
5508
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
5509
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5510
|
+
----------------------------------------------------------------------------------------------------------
|
5511
|
+
LargeTextField::OwnerTest: test_: a large text field should allow a custom maximum length to be provided.
|
5512
|
+
----------------------------------------------------------------------------------------------------------
|
5513
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5514
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5515
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5516
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
5517
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5518
|
+
---------------------------------------------------------------------------------------------------
|
5519
|
+
LargeTextField::OwnerTest: test_: a large text field should allow for concurrent sets and deletes.
|
5520
|
+
---------------------------------------------------------------------------------------------------
|
5521
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5522
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5523
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5524
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5525
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5526
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
5527
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5528
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5529
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5530
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5531
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 2]]
|
5532
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ?[0m [["value", "third"], ["id", 1]]
|
5533
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5534
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
5535
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5536
|
+
------------------------------------------------------------------------------------------------------
|
5537
|
+
LargeTextField::OwnerTest: test_: a large text field should allow get and set with saves and deletes.
|
5538
|
+
------------------------------------------------------------------------------------------------------
|
5539
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5540
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5541
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5542
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5543
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger badger "]]
|
5544
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5545
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5546
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5547
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5548
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom mushroom "], ["id", 1]]
|
5549
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5550
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5551
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5552
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5553
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
5554
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5555
|
+
[1m[36mLibrary Load (0.1ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5556
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.1ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5557
|
+
[1m[36m (1.4ms)[0m [1mrollback transaction[0m
|
5558
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5559
|
+
----------------------------------------------------------------------------------------
|
5560
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to be eager loaded.
|
5561
|
+
----------------------------------------------------------------------------------------
|
5562
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5563
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5564
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5565
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5566
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5567
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
5568
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5569
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5570
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.2ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_type" = 'Library' AND "large_text_fields"."owner_id" IN (1)[0m
|
5571
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
5572
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5573
|
+
----------------------------------------------------------------------------------------------
|
5574
|
+
LargeTextField::OwnerTest: test_: a large text field should be able to update deleted fields.
|
5575
|
+
----------------------------------------------------------------------------------------------
|
5576
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5577
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5578
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5579
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5580
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5581
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5582
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5583
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5584
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5585
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
5586
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5587
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5588
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5589
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5590
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5591
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
5592
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5593
|
+
---------------------------------------------------------------------------------------------------
|
5594
|
+
LargeTextField::OwnerTest: test_: a large text field should be cloned with the rest of the record.
|
5595
|
+
---------------------------------------------------------------------------------------------------
|
5596
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5597
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5598
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5599
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5600
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?)[0m [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5601
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"]]
|
5602
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5603
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5604
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5605
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
5606
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "catalog"], ["value", "second"], ["owner_id", 2]]
|
5607
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5608
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5609
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5610
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5611
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5612
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5613
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 3]]
|
5614
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 4]]
|
5615
|
+
[1m[35mSQL (0.1ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
5616
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5617
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1 [["id", 3]]
|
5618
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."id" = ? LIMIT 1[0m [["id", 4]]
|
5619
|
+
[1m[35m (1.0ms)[0m rollback transaction
|
5620
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5621
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
5622
|
+
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.
|
5623
|
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
5624
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5625
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5626
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5627
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
5628
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5629
|
+
------------------------------------------------------------------------------------------------------
|
5630
|
+
LargeTextField::OwnerTest: test_: a large text field should delete fields when they are set to blank.
|
5631
|
+
------------------------------------------------------------------------------------------------------
|
5632
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5633
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5634
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5635
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5636
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5637
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5638
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5639
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5640
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5641
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5642
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5643
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ? [["id", 1]]
|
5644
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5645
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5646
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5647
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5648
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
5649
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5650
|
+
------------------------------------------------------------------------------------------------------------------
|
5651
|
+
LargeTextField::OwnerTest: test_: a large text field should delete large text fields when the owner is destroyed.
|
5652
|
+
------------------------------------------------------------------------------------------------------------------
|
5653
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5654
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5655
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5656
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
5657
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5658
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
5659
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
5660
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5661
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields"[0m
|
5662
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5663
|
+
[1m[36mSQL (0.0ms)[0m [1mDELETE FROM "large_text_fields" WHERE "large_text_fields"."id" = ?[0m [["id", 1]]
|
5664
|
+
[1m[35mSQL (0.0ms)[0m DELETE FROM "libraries" WHERE "libraries"."id" = ? [["id", 2]]
|
5665
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5666
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "large_text_fields"
|
5667
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
5668
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5669
|
+
--------------------------------------------------------------------------------------------------------------------
|
5670
|
+
LargeTextField::OwnerTest: test_: a large text field should detect changes when @text_field_hash hash is/not empty.
|
5671
|
+
--------------------------------------------------------------------------------------------------------------------
|
5672
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5673
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5674
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5675
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5676
|
+
[1m[36mSQL (0.0ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5677
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "description"], ["value", "a new note"], ["owner_id", 2]]
|
5678
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5679
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
5680
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5681
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
5682
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5683
|
+
--------------------------------------------------------------------------------------------------------
|
5684
|
+
LargeTextField::OwnerTest: test_: a large text field should forget about changes if they are not saved.
|
5685
|
+
--------------------------------------------------------------------------------------------------------
|
5686
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5687
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5688
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5689
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 1]]
|
5690
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 1], ["owner_type", "Library"]]
|
5691
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5692
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 1], ["owner_type", "Library"], ["field_name", "description"], ["value", "first"]]
|
5693
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5694
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5695
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5696
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5697
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5698
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
5699
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5700
|
+
---------------------------------------------------------------------------------------------------
|
5701
|
+
LargeTextField::OwnerTest: test_: a large text field should not save fields that are set to blank.
|
5702
|
+
---------------------------------------------------------------------------------------------------
|
5703
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5704
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5705
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5706
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5707
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Millie"]]
|
5708
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "first"], ["owner_id", 2]]
|
5709
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5710
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
5711
|
+
[1m[35mLargeTextField::NamedTextValue Load (0.0ms)[0m SELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ? [["owner_id", 2], ["owner_type", "Library"]]
|
5712
|
+
[1m[36m (0.0ms)[0m [1mSELECT COUNT(*) FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5713
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
5714
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5715
|
+
-------------------------------------------------------------------------------------------------------
|
5716
|
+
LargeTextField::OwnerTest: test_: a large text field should only validate_large_text_fields if loaded.
|
5717
|
+
-------------------------------------------------------------------------------------------------------
|
5718
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5719
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5720
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5721
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
5722
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5723
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
5724
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a custom maximum length to be provided that is not in the allowable range.
|
5725
|
+
-----------------------------------------------------------------------------------------------------------------------------------------------
|
5726
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5727
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5728
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5729
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
5730
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5731
|
+
-----------------------------------------------------------------------------------------------------------------------
|
5732
|
+
LargeTextField::OwnerTest: test_: a large text field should prevent a non-Integer to be provided for a custom maximum.
|
5733
|
+
-----------------------------------------------------------------------------------------------------------------------
|
5734
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5735
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5736
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5737
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
5738
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5739
|
+
------------------------------------------------------------------------------
|
5740
|
+
LargeTextField::OwnerTest: test_: a large text field should read from a file.
|
5741
|
+
------------------------------------------------------------------------------
|
5742
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5743
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5744
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5745
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5746
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5747
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5748
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5749
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "large_text_fields" ("owner_id", "owner_type", "field_name", "value") VALUES (?, ?, ?, ?) [["owner_id", 2], ["owner_type", "Library"], ["field_name", "description"], ["value", "this is a string from the file"]]
|
5750
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5751
|
+
[1m[35mLibrary Load (0.1ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
5752
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.1ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5753
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
5754
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
5755
|
+
------------------------------------------------------------------------------------------------------------------
|
5756
|
+
LargeTextField::OwnerTest: test_: a large text field should reload changes when they come from a different model.
|
5757
|
+
------------------------------------------------------------------------------------------------------------------
|
5758
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5759
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5760
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5761
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5762
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Cambridge University Library"]]
|
5763
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?)[0m [["owner_type", "Library"], ["field_name", "description"], ["value", "in england"], ["owner_id", 2]]
|
5764
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5765
|
+
[1m[36mLibrary Load (0.0ms)[0m [1mSELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1[0m [["id", 2]]
|
5766
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5767
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5768
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "large_text_fields" SET "value" = ? WHERE "large_text_fields"."id" = ? [["value", "The main research library of the University of Cambridge in England"], ["id", 1]]
|
5769
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5770
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 2]]
|
5771
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 2], ["owner_type", "Library"]]
|
5772
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
5773
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5774
|
+
-------------------------------------------------------------------------------------------------
|
5775
|
+
LargeTextField::OwnerTest: test_: a large text field should singularize the errors if requested.
|
5776
|
+
-------------------------------------------------------------------------------------------------
|
5777
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5778
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5779
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5780
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
5781
|
+
[1m[35m (0.0ms)[0m begin transaction
|
5782
|
+
------------------------------------------------------------------------------------------------------------
|
5783
|
+
LargeTextField::OwnerTest: test_: a large text field should support strings or symbols for get/set methods.
|
5784
|
+
------------------------------------------------------------------------------------------------------------
|
5785
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5786
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5787
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5788
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
5789
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5790
|
+
-----------------------------------------------------------------------------------------
|
5791
|
+
LargeTextField::OwnerTest: test_: a large text field should validate the maximum length.
|
5792
|
+
-----------------------------------------------------------------------------------------
|
5793
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5794
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5795
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
5796
|
+
[1m[36m (1.8ms)[0m [1mrollback transaction[0m
|
5797
|
+
[1m[35m (0.1ms)[0m begin transaction
|
5798
|
+
----------------------------------------------------------------------------------------------------------------
|
5799
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign empty string.
|
5800
|
+
----------------------------------------------------------------------------------------------------------------
|
5801
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
5802
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "libraries" ("name") VALUES (?) [["name", "Smithsonian"]]
|
5803
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5804
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5805
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5806
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
5807
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5808
|
+
--------------------------------------------------------------------------------------------------------------------
|
5809
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should be able to assign non empty string.
|
5810
|
+
--------------------------------------------------------------------------------------------------------------------
|
5811
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5812
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "libraries" ("name") VALUES (?)[0m [["name", "Smithsonian"]]
|
5813
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "large_text_fields" ("owner_type", "field_name", "value", "owner_id") VALUES (?, ?, ?, ?) [["owner_type", "Library"], ["field_name", "notes"], ["value", "this is some text"], ["owner_id", 1]]
|
5814
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5815
|
+
[1m[35mLibrary Load (0.0ms)[0m SELECT "libraries".* FROM "libraries" WHERE "libraries"."id" = ? LIMIT 1 [["id", 1]]
|
5816
|
+
[1m[36mLargeTextField::NamedTextValue Load (0.0ms)[0m [1mSELECT "large_text_fields".* FROM "large_text_fields" WHERE "large_text_fields"."owner_id" = ? AND "large_text_fields"."owner_type" = ?[0m [["owner_id", 1], ["owner_type", "Library"]]
|
5817
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
5818
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5819
|
+
-----------------------------------------------------------------------------------------------------------------
|
5820
|
+
LargeTextField::OwnerTest: test_: updating in large_text_field_save hook should raise error on saving nil value.
|
5821
|
+
-----------------------------------------------------------------------------------------------------------------
|
5822
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5823
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
5824
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
5825
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
5826
|
+
------------------------------
|
5827
|
+
LargeTextFieldTest: test_truth
|
5034
5828
|
------------------------------
|
5035
5829
|
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: large_text_field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: protected_attributes
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
47
|
+
version: '2.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
54
|
+
version: '2.0'
|
55
55
|
description: Large text fields are kept in a central table, and polymorphically associated
|
56
56
|
with your models. Access and assignemnt should behave as if it was a column on
|
57
57
|
the same table.
|