s3_relay 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -383,6 +383,1111 @@ S3Relay::Upload::validations::filename: test_0001_validates presence
383
383
   (0.1ms) BEGIN
384
384
  -----------------------------------------------------------------------
385
385
  S3Relay::Upload::validations::upload_type: test_0001_validates presence
386
+ -----------------------------------------------------------------------
387
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
388
+  (0.1ms) ROLLBACK
389
+ SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
390
+  (14.5ms) CREATE TABLE "products" ("id" serial primary key, "name" character varying(255), "created_at" timestamp, "updated_at" timestamp)
391
+  (3.7ms) CREATE TABLE "s3_relay_uploads" ("id" serial primary key, "uuid" bytea, "user_id" integer, "parent_type" character varying(255), "parent_id" integer, "upload_type" character varying(255), "filename" text, "content_type" character varying(255), "state" character varying(255), "data" json DEFAULT '{}', "pending_at" timestamp, "imported_at" timestamp, "created_at" timestamp, "updated_at" timestamp) 
392
+  (0.7ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)
393
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
394
+  (0.2ms) SELECT version FROM "schema_migrations"
395
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141021002149')
396
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141009000804')
397
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
398
+  (0.4ms) ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "s3_relay_uploads" DISABLE TRIGGER ALL;ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL
399
+  (1.1ms) select table_name from information_schema.views where table_schema = 's3_relay_test'
400
+  (3.2ms) TRUNCATE TABLE "products", "s3_relay_uploads" RESTART IDENTITY CASCADE;
401
+  (0.2ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "s3_relay_uploads" ENABLE TRIGGER ALL
402
+  (0.2ms) BEGIN
403
+ ---------------------------------------------------------------------------------------------------------------------
404
+ S3Relay::UploadsController::POST create::success::with parent attributes::not matching an object: test_0001_anonymous
405
+ ---------------------------------------------------------------------------------------------------------------------
406
+  (0.3ms) SELECT COUNT(*) FROM "s3_relay_uploads"
407
+ Processing by S3Relay::UploadsController#create as HTML
408
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"0e5c4bfe-2c72-4ab5-80c5-7819430e7348", "filename"=>"cat.png", "content_type"=>"image/png", "parent_type"=>"Product", "parent_id"=>"10000000"}
409
+ Product Load (0.4ms) SELECT "products".* FROM "products" WHERE "products"."id" = 10000000 LIMIT 1
410
+  (0.1ms) SAVEPOINT active_record_1
411
+ S3Relay::Upload Exists (0.5ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
412
+ :value: 0e5c4bfe-2c72-4ab5-80c5-7819430e7348
413
+ :format: 1
414
+ ' LIMIT 1
415
+ SQL (0.5ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.419053"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.407270"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.419053"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
416
+  (0.2ms) RELEASE SAVEPOINT active_record_1
417
+ Completed 201 Created in 36ms (Views: 0.2ms | ActiveRecord: 3.1ms)
418
+  (0.3ms) SELECT COUNT(*) FROM "s3_relay_uploads"
419
+  (0.1ms) ROLLBACK
420
+  (0.1ms) BEGIN
421
+ ----------------------------------------------------------------
422
+ S3Relay::Upload::validations::uuid: test_0001_validates presence
423
+ ----------------------------------------------------------------
424
+ S3Relay::Upload Exists (0.4ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
425
+  (0.1ms) ROLLBACK
426
+  (0.1ms) BEGIN
427
+ ------------------------------------------------------------------
428
+ S3Relay::Upload::validations::uuid: test_0002_validates uniqueness
429
+ ------------------------------------------------------------------
430
+  (0.1ms) SAVEPOINT active_record_1
431
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:33:45.439905"], ["pending_at", "2016-09-07 16:33:45.439498"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.439905"]]
432
+  (0.1ms) RELEASE SAVEPOINT active_record_1
433
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
434
+  (0.1ms) ROLLBACK
435
+  (0.1ms) BEGIN
436
+  (0.1ms) COMMIT
437
+  (0.1ms) BEGIN
438
+  (0.1ms) ROLLBACK
439
+  (0.1ms) BEGIN
440
+ --------------------------------------------------------
441
+ S3Relay::UploadsController::GET new: test_0001_anonymous
442
+ --------------------------------------------------------
443
+ Processing by S3Relay::UploadsController#new as HTML
444
+ Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.0ms)
445
+  (0.1ms) ROLLBACK
446
+  (0.2ms) BEGIN
447
+ -------------------------------------------------------
448
+ S3Relay::Upload::upon finalization: test_0001_anonymous
449
+ -------------------------------------------------------
450
+  (0.2ms) ROLLBACK
451
+  (0.1ms) BEGIN
452
+ -----------------------------------------------
453
+ S3Relay::Upload::#imported: test_0001_anonymous
454
+ -----------------------------------------------
455
+  (0.1ms) ROLLBACK
456
+  (0.1ms) BEGIN
457
+ -----------------------------------------------
458
+ S3Relay::Upload::#pending?: test_0001_anonymous
459
+ -----------------------------------------------
460
+  (0.1ms) ROLLBACK
461
+  (0.1ms) BEGIN
462
+ --------------------------------------------------
463
+ S3Relay::Upload::#private_url: test_0001_anonymous
464
+ --------------------------------------------------
465
+  (0.1ms) ROLLBACK
466
+  (0.1ms) BEGIN
467
+ ---------------------------------------------------------------------------------
468
+ S3Relay::UploadsHelper::#s3_relay_field::with multiple: true: test_0001_anonymous
469
+ ---------------------------------------------------------------------------------
470
+  (0.1ms) SAVEPOINT active_record_1
471
+ SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.467004"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.467004"]]
472
+  (0.1ms) RELEASE SAVEPOINT active_record_1
473
+  (0.1ms) ROLLBACK
474
+  (0.1ms) BEGIN
475
+ ----------------------------------------------------------
476
+ S3Relay::Upload::associations::parent: test_0001_anonymous
477
+ ----------------------------------------------------------
478
+  (0.1ms) ROLLBACK
479
+  (0.1ms) BEGIN
480
+ ------------------------------------------------------------------------------------------
481
+ S3Relay::UploadsHelper::#s3_relay_field::with disposition: attachment: test_0001_anonymous
482
+ ------------------------------------------------------------------------------------------
483
+  (0.1ms) SAVEPOINT active_record_1
484
+ SQL (0.3ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.475544"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.475544"]]
485
+  (0.1ms) RELEASE SAVEPOINT active_record_1
486
+  (0.1ms) ROLLBACK
487
+  (0.1ms) BEGIN
488
+ -----------------------------------------------------------------------------------
489
+ S3Relay::Upload::#notify_parent::when the parent is associated: test_0001_anonymous
490
+ -----------------------------------------------------------------------------------
491
+  (0.1ms) SAVEPOINT active_record_1
492
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.480164"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.480164"]]
493
+  (0.1ms) RELEASE SAVEPOINT active_record_1
494
+  (0.1ms) SAVEPOINT active_record_1
495
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
496
+ :value: 356d4976-4484-4656-a052-48da223b71c3
497
+ :format: 1
498
+ ' LIMIT 1
499
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.483102"], ["filename", "cat.png"], ["parent_id", 3], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:33:45.479441"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.483102"], ["upload_type", "FileUpload"], ["uuid", "<36 bytes of binary data>"]]
500
+  (0.1ms) RELEASE SAVEPOINT active_record_1
501
+  (0.1ms) ROLLBACK
502
+  (0.1ms) BEGIN
503
+  (0.1ms) COMMIT
504
+  (0.1ms) BEGIN
505
+  (0.1ms) SAVEPOINT active_record_1
506
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.486877"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.486877"]]
507
+  (0.1ms) RELEASE SAVEPOINT active_record_1
508
+  (0.1ms) SAVEPOINT active_record_1
509
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
510
+ :value: 356d4976-4484-4656-a052-48da223b71c3
511
+ :format: 1
512
+ ' LIMIT 1
513
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.489710"], ["filename", "cat.png"], ["parent_id", 4], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:33:45.488176"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.489710"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
514
+  (0.1ms) RELEASE SAVEPOINT active_record_1
515
+  (0.1ms) SAVEPOINT active_record_1
516
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
517
+ :value: 356d4976-4484-4656-a052-48da223b71c3
518
+ :format: 1
519
+ ' LIMIT 1
520
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.492641"], ["filename", "cat.png"], ["parent_id", 4], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:33:45.491298"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.492641"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
521
+  (0.1ms) RELEASE SAVEPOINT active_record_1
522
+  (0.1ms) SAVEPOINT active_record_1
523
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
524
+ :value: 356d4976-4484-4656-a052-48da223b71c3
525
+ :format: 1
526
+ ' LIMIT 1
527
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.495423"], ["filename", "cat.png"], ["parent_id", 4], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:33:45.494078"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.495423"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
528
+  (0.1ms) RELEASE SAVEPOINT active_record_1
529
+  (0.3ms) SELECT "s3_relay_uploads"."id" FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 4 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
530
+  (0.1ms) ROLLBACK
531
+  (0.1ms) BEGIN
532
+ -----------------------------------------------------------------------------------------------------------------
533
+ S3Relay::UploadsController::POST create::success::with parent attributes::matching an object: test_0001_anonymous
534
+ -----------------------------------------------------------------------------------------------------------------
535
+  (0.1ms) SAVEPOINT active_record_1
536
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.501210"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.501210"]]
537
+  (0.1ms) RELEASE SAVEPOINT active_record_1
538
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 5 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
539
+ Processing by S3Relay::UploadsController#create as HTML
540
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"c4ccd03c-c40b-45a1-b3fd-30189c243c74", "filename"=>"cat.png", "content_type"=>"image/png", "parent_type"=>"Product", "parent_id"=>"5"}
541
+ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 5 LIMIT 1
542
+  (0.1ms) SAVEPOINT active_record_1
543
+ S3Relay::Upload Exists (0.4ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
544
+ :value: c4ccd03c-c40b-45a1-b3fd-30189c243c74
545
+ :format: 1
546
+ ' LIMIT 1
547
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.508279"], ["filename", "cat.png"], ["parent_id", 5], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:33:45.506024"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.508279"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
548
+  (0.1ms) RELEASE SAVEPOINT active_record_1
549
+ Completed 201 Created in 6ms (Views: 0.2ms | ActiveRecord: 1.0ms)
550
+  (0.3ms) SELECT COUNT(*) FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 5 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
551
+  (0.1ms) ROLLBACK
552
+  (0.1ms) BEGIN
553
+ --------------------------------------------------------------------
554
+ S3Relay::Upload::validations::filename: test_0001_validates presence
555
+ --------------------------------------------------------------------
556
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
557
+  (0.1ms) ROLLBACK
558
+  (0.1ms) BEGIN
559
+  (0.1ms) COMMIT
560
+  (0.1ms) BEGIN
561
+  (0.1ms) SAVEPOINT active_record_1
562
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.516854"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.516854"]]
563
+  (0.1ms) RELEASE SAVEPOINT active_record_1
564
+  (0.1ms) SAVEPOINT active_record_1
565
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
566
+ :value: 356d4976-4484-4656-a052-48da223b71c3
567
+ :format: 1
568
+ ' LIMIT 1
569
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.519653"], ["filename", "cat.png"], ["parent_id", 6], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:33:45.518088"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.519653"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
570
+  (0.1ms) RELEASE SAVEPOINT active_record_1
571
+  (0.1ms) SAVEPOINT active_record_1
572
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
573
+ :value: 356d4976-4484-4656-a052-48da223b71c3
574
+ :format: 1
575
+ ' LIMIT 1
576
+ SQL (0.1ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.522536"], ["filename", "cat.png"], ["parent_id", 6], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:33:45.521159"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.522536"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
577
+  (0.1ms) RELEASE SAVEPOINT active_record_1
578
+  (0.1ms) SAVEPOINT active_record_1
579
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
580
+ :value: 356d4976-4484-4656-a052-48da223b71c3
581
+ :format: 1
582
+ ' LIMIT 1
583
+ SQL (0.1ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.525076"], ["filename", "cat.png"], ["parent_id", 6], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:33:45.523819"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.525076"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
584
+  (0.1ms) RELEASE SAVEPOINT active_record_1
585
+ S3Relay::Upload Load (0.5ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 6 AND "s3_relay_uploads"."upload_type" = 'IconUpload' ORDER BY pending_at ASC LIMIT 1
586
+  (0.1ms) ROLLBACK
587
+  (0.1ms) BEGIN
588
+ -------------------------------------------------------------------
589
+ S3Relay::UploadsController::POST create::error: test_0001_anonymous
590
+ -------------------------------------------------------------------
591
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
592
+ Processing by S3Relay::UploadsController#create as HTML
593
+ Parameters: {"uuid"=>"d19d0438-4df4-47b1-8a5e-2ed27bacf32a", "filename"=>"cat.png", "content_type"=>"image/png"}
594
+  (0.1ms) SAVEPOINT active_record_1
595
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
596
+ :value: d19d0438-4df4-47b1-8a5e-2ed27bacf32a
597
+ :format: 1
598
+ ' LIMIT 1
599
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
600
+ Completed 422 Unprocessable Entity in 3ms (Views: 0.2ms | ActiveRecord: 0.4ms)
601
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
602
+  (0.1ms) ROLLBACK
603
+  (0.1ms) BEGIN
604
+  (0.1ms) COMMIT
605
+  (0.1ms) BEGIN
606
+  (0.1ms) SAVEPOINT active_record_1
607
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.536751"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.536751"]]
608
+  (0.1ms) RELEASE SAVEPOINT active_record_1
609
+  (0.1ms) SAVEPOINT active_record_1
610
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
611
+ :value: 356d4976-4484-4656-a052-48da223b71c3
612
+ :format: 1
613
+ ' LIMIT 1
614
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.539221"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.537947"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.539221"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
615
+  (0.1ms) RELEASE SAVEPOINT active_record_1
616
+  (0.1ms) SAVEPOINT active_record_1
617
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
618
+ :value: 356d4976-4484-4656-a052-48da223b71c3
619
+ :format: 1
620
+ ' LIMIT 1
621
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.541626"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.540488"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.541626"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
622
+  (0.1ms) RELEASE SAVEPOINT active_record_1
623
+  (0.1ms) SAVEPOINT active_record_1
624
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
625
+ :value: 356d4976-4484-4656-a052-48da223b71c3
626
+ :format: 1
627
+ ' LIMIT 1
628
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.543980"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.542841"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.543980"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
629
+  (0.1ms) RELEASE SAVEPOINT active_record_1
630
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 7 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
631
+ SQL (0.3ms) UPDATE "s3_relay_uploads" SET "parent_type" = 'Product', "parent_id" = 7 WHERE "s3_relay_uploads"."uuid" IN ('356d4976-4484-4656-a052-48da223b71c3', '356d4976-4484-4656-a052-48da223b71c3') AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
632
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 7 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
633
+  (0.1ms) ROLLBACK
634
+  (0.1ms) BEGIN
635
+  (0.1ms) COMMIT
636
+  (0.1ms) BEGIN
637
+  (0.1ms) SAVEPOINT active_record_1
638
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.548658"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.548658"]]
639
+  (0.1ms) RELEASE SAVEPOINT active_record_1
640
+  (0.1ms) SAVEPOINT active_record_1
641
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
642
+ :value: 356d4976-4484-4656-a052-48da223b71c3
643
+ :format: 1
644
+ ' LIMIT 1
645
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.550952"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.549783"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.550952"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
646
+  (0.1ms) RELEASE SAVEPOINT active_record_1
647
+  (0.1ms) SAVEPOINT active_record_1
648
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
649
+ :value: 356d4976-4484-4656-a052-48da223b71c3
650
+ :format: 1
651
+ ' LIMIT 1
652
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.553251"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.552150"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.553251"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
653
+  (0.1ms) RELEASE SAVEPOINT active_record_1
654
+  (0.2ms) SAVEPOINT active_record_1
655
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
656
+ :value: 356d4976-4484-4656-a052-48da223b71c3
657
+ :format: 1
658
+ ' LIMIT 1
659
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.556822"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.554746"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.556822"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
660
+  (0.1ms) RELEASE SAVEPOINT active_record_1
661
+ S3Relay::Upload Load (0.3ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 8 AND "s3_relay_uploads"."upload_type" = 'IconUpload' ORDER BY pending_at ASC LIMIT 1
662
+  (0.1ms) ROLLBACK
663
+  (0.2ms) BEGIN
664
+  (0.1ms) COMMIT
665
+  (0.1ms) BEGIN
666
+  (0.1ms) ROLLBACK
667
+  (0.1ms) BEGIN
668
+ -----------------------------------------------------------------------
669
+ S3Relay::Upload::validations::upload_type: test_0001_validates presence
670
+ -----------------------------------------------------------------------
671
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
672
+  (0.1ms) ROLLBACK
673
+  (0.1ms) BEGIN
674
+ --------------------------------------------------------------------------------------------------------------------------------------------
675
+ S3Relay::UploadsController::POST create::success::with parent attributes::with a current_user: test_0001_associates the upload with the user
676
+ --------------------------------------------------------------------------------------------------------------------------------------------
677
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
678
+ Processing by S3Relay::UploadsController#create as HTML
679
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"0f88c4e6-2ca2-489b-9636-8375f181c9c6", "filename"=>"cat.png", "content_type"=>"image/png"}
680
+  (0.1ms) SAVEPOINT active_record_1
681
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
682
+ :value: 0f88c4e6-2ca2-489b-9636-8375f181c9c6
683
+ :format: 1
684
+ ' LIMIT 1
685
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "user_id", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.573298"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.571989"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.573298"], ["upload_type", "PhotoUpload"], ["user_id", 123], ["uuid", "<36 bytes of binary data>"]]
686
+  (0.1ms) RELEASE SAVEPOINT active_record_1
687
+ Completed 201 Created in 4ms (Views: 0.2ms | ActiveRecord: 0.6ms)
688
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
689
+  (0.1ms) ROLLBACK
690
+  (0.1ms) BEGIN
691
+ -----------------------------------------------------
692
+ S3Relay::Upload::#mark_imported!: test_0001_anonymous
693
+ -----------------------------------------------------
694
+  (0.1ms) SAVEPOINT active_record_1
695
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
696
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
697
+  (0.1ms) ROLLBACK
698
+  (0.1ms) BEGIN
699
+ -----------------------------------------------------
700
+ S3Relay::Upload::scopes::pending: test_0001_anonymous
701
+ -----------------------------------------------------
702
+  (0.1ms) SAVEPOINT active_record_1
703
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:33:45.581791"], ["pending_at", "2016-09-07 16:33:45.581566"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.581791"]]
704
+  (0.1ms) RELEASE SAVEPOINT active_record_1
705
+  (0.1ms) SAVEPOINT active_record_1
706
+ SQL (0.1ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:33:45.583119"], ["pending_at", "2016-09-07 16:33:45.582860"], ["state", "imported"], ["updated_at", "2016-09-07 16:33:45.583119"]]
707
+  (0.1ms) RELEASE SAVEPOINT active_record_1
708
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."state" = 'pending'
709
+  (0.1ms) ROLLBACK
710
+  (0.1ms) BEGIN
711
+  (0.1ms) COMMIT
712
+  (0.1ms) BEGIN
713
+  (0.1ms) ROLLBACK
714
+  (0.1ms) BEGIN
715
+ ----------------------------------------------------------------------
716
+ S3Relay::Upload::validations::pending_at: test_0001_validates presence
717
+ ----------------------------------------------------------------------
718
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
719
+  (0.1ms) ROLLBACK
720
+  (0.1ms) BEGIN
721
+ -----------------------------------------------------------------------------
722
+ S3Relay::UploadsHelper::#s3_relay_field::without options: test_0001_anonymous
723
+ -----------------------------------------------------------------------------
724
+  (0.1ms) SAVEPOINT active_record_1
725
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:33:45.593913"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:33:45.593913"]]
726
+  (0.1ms) RELEASE SAVEPOINT active_record_1
727
+  (0.1ms) ROLLBACK
728
+  (0.1ms) BEGIN
729
+ ------------------------------------------------------
730
+ S3Relay::Upload::scopes::imported: test_0001_anonymous
731
+ ------------------------------------------------------
732
+  (0.1ms) SAVEPOINT active_record_1
733
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:33:45.596650"], ["pending_at", "2016-09-07 16:33:45.596420"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.596650"]]
734
+  (0.1ms) RELEASE SAVEPOINT active_record_1
735
+  (0.1ms) SAVEPOINT active_record_1
736
+ SQL (0.1ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:33:45.598046"], ["pending_at", "2016-09-07 16:33:45.597776"], ["state", "imported"], ["updated_at", "2016-09-07 16:33:45.598046"]]
737
+  (0.1ms) RELEASE SAVEPOINT active_record_1
738
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."state" = 'imported'
739
+  (0.1ms) ROLLBACK
740
+  (0.1ms) BEGIN
741
+  (0.1ms) COMMIT
742
+  (0.1ms) BEGIN
743
+  (0.1ms) ROLLBACK
744
+  (0.1ms) BEGIN
745
+  (0.1ms) COMMIT
746
+  (0.0ms) BEGIN
747
+  (0.1ms) ROLLBACK
748
+  (0.1ms) BEGIN
749
+ ---------------------------------------------------------------------
750
+ S3Relay::UploadsController::POST create::success: test_0001_anonymous
751
+ ---------------------------------------------------------------------
752
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
753
+ Processing by S3Relay::UploadsController#create as HTML
754
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"a233b082-5ac9-4aa9-9e7f-9691d061d2d6", "filename"=>"cat.png", "content_type"=>"image/png"}
755
+  (0.1ms) SAVEPOINT active_record_1
756
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
757
+ :value: a233b082-5ac9-4aa9-9e7f-9691d061d2d6
758
+ :format: 1
759
+ ' LIMIT 1
760
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:33:45.607065"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:33:45.605776"], ["state", "pending"], ["updated_at", "2016-09-07 16:33:45.607065"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
761
+  (0.1ms) RELEASE SAVEPOINT active_record_1
762
+ Completed 201 Created in 3ms (Views: 0.2ms | ActiveRecord: 0.6ms)
763
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
764
+  (0.1ms) ROLLBACK
765
+  (0.1ms) BEGIN
766
+  (0.1ms) COMMIT
767
+  (0.1ms) BEGIN
768
+  (0.1ms) ROLLBACK
769
+  (0.1ms) BEGIN
770
+ ------------------------------------------------------------------------
771
+ S3Relay::Upload::validations::content_type: test_0001_validates presence
772
+ ------------------------------------------------------------------------
773
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
774
+  (0.1ms) ROLLBACK
775
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
776
+  (0.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "s3_relay_uploads" DISABLE TRIGGER ALL
777
+  (1.2ms) select table_name from information_schema.views where table_schema = 's3_relay_test'
778
+  (5.5ms) TRUNCATE TABLE "products", "s3_relay_uploads" RESTART IDENTITY CASCADE;
779
+  (0.2ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "s3_relay_uploads" ENABLE TRIGGER ALL
780
+  (0.2ms) BEGIN
781
+  (0.1ms) COMMIT
782
+  (0.1ms) BEGIN
783
+  (0.1ms) ROLLBACK
784
+  (0.1ms) BEGIN
785
+ -----------------------------------------------------------------------
786
+ S3Relay::Upload::validations::upload_type: test_0001_validates presence
787
+ -----------------------------------------------------------------------
788
+ S3Relay::Upload Exists (0.5ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
789
+  (0.1ms) ROLLBACK
790
+  (0.1ms) BEGIN
791
+ ----------------------------------------------------------------------
792
+ S3Relay::Upload::validations::pending_at: test_0001_validates presence
793
+ ----------------------------------------------------------------------
794
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
795
+  (0.1ms) ROLLBACK
796
+  (0.1ms) BEGIN
797
+ --------------------------------------------------
798
+ S3Relay::Upload::#private_url: test_0001_anonymous
799
+ --------------------------------------------------
800
+  (0.1ms) ROLLBACK
801
+  (0.1ms) BEGIN
802
+ --------------------------------------------------------------------
803
+ S3Relay::Upload::validations::filename: test_0001_validates presence
804
+ --------------------------------------------------------------------
805
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
806
+  (0.1ms) ROLLBACK
807
+  (0.1ms) BEGIN
808
+ ------------------------------------------------------------------------
809
+ S3Relay::Upload::validations::content_type: test_0001_validates presence
810
+ ------------------------------------------------------------------------
811
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
812
+  (0.1ms) ROLLBACK
813
+  (0.1ms) BEGIN
814
+  (0.1ms) COMMIT
815
+  (0.1ms) BEGIN
816
+  (0.1ms) SAVEPOINT active_record_1
817
+ SQL (0.4ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.062528"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.062528"]]
818
+  (0.2ms) RELEASE SAVEPOINT active_record_1
819
+  (0.1ms) SAVEPOINT active_record_1
820
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
821
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
822
+ :format: 1
823
+ ' LIMIT 1
824
+ SQL (0.4ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.067985"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.066150"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.067985"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
825
+  (0.1ms) RELEASE SAVEPOINT active_record_1
826
+  (0.1ms) SAVEPOINT active_record_1
827
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
828
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
829
+ :format: 1
830
+ ' LIMIT 1
831
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.076411"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.074689"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.076411"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
832
+  (0.1ms) RELEASE SAVEPOINT active_record_1
833
+  (0.1ms) SAVEPOINT active_record_1
834
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
835
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
836
+ :format: 1
837
+ ' LIMIT 1
838
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.079223"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.077950"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.079223"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
839
+  (0.1ms) RELEASE SAVEPOINT active_record_1
840
+ S3Relay::Upload Load (0.4ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 1 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
841
+ SQL (0.3ms) UPDATE "s3_relay_uploads" SET "parent_type" = 'Product', "parent_id" = 1 WHERE "s3_relay_uploads"."uuid" IN ('bb66867f-e23a-4b65-93cd-61cab6718c14', 'bb66867f-e23a-4b65-93cd-61cab6718c14') AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
842
+ S3Relay::Upload Load (0.3ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 1 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
843
+  (0.2ms) ROLLBACK
844
+  (0.1ms) BEGIN
845
+  (0.1ms) COMMIT
846
+  (0.1ms) BEGIN
847
+  (0.1ms) SAVEPOINT active_record_1
848
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.087866"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.087866"]]
849
+  (0.1ms) RELEASE SAVEPOINT active_record_1
850
+  (0.1ms) SAVEPOINT active_record_1
851
+ S3Relay::Upload Exists (0.4ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
852
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
853
+ :format: 1
854
+ ' LIMIT 1
855
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.091528"], ["filename", "cat.png"], ["parent_id", 2], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:34:53.089356"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.091528"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
856
+  (0.2ms) RELEASE SAVEPOINT active_record_1
857
+  (0.1ms) SAVEPOINT active_record_1
858
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
859
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
860
+ :format: 1
861
+ ' LIMIT 1
862
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.095508"], ["filename", "cat.png"], ["parent_id", 2], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:34:53.093949"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.095508"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
863
+  (0.1ms) RELEASE SAVEPOINT active_record_1
864
+  (0.1ms) SAVEPOINT active_record_1
865
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
866
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
867
+ :format: 1
868
+ ' LIMIT 1
869
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.098932"], ["filename", "cat.png"], ["parent_id", 2], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:34:53.097102"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.098932"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
870
+  (0.1ms) RELEASE SAVEPOINT active_record_1
871
+  (0.2ms) SELECT "s3_relay_uploads"."id" FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 2 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
872
+  (0.1ms) ROLLBACK
873
+  (0.1ms) BEGIN
874
+  (0.1ms) COMMIT
875
+  (0.1ms) BEGIN
876
+  (0.2ms) SAVEPOINT active_record_1
877
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.104227"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.104227"]]
878
+  (0.1ms) RELEASE SAVEPOINT active_record_1
879
+  (0.1ms) SAVEPOINT active_record_1
880
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
881
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
882
+ :format: 1
883
+ ' LIMIT 1
884
+ SQL (0.3ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.108076"], ["filename", "cat.png"], ["parent_id", 3], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:34:53.106180"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.108076"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
885
+  (0.2ms) RELEASE SAVEPOINT active_record_1
886
+  (0.2ms) SAVEPOINT active_record_1
887
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
888
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
889
+ :format: 1
890
+ ' LIMIT 1
891
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.111773"], ["filename", "cat.png"], ["parent_id", 3], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:34:53.110134"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.111773"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
892
+  (0.1ms) RELEASE SAVEPOINT active_record_1
893
+  (0.1ms) SAVEPOINT active_record_1
894
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
895
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
896
+ :format: 1
897
+ ' LIMIT 1
898
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.114633"], ["filename", "cat.png"], ["parent_id", 3], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:34:53.113260"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.114633"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
899
+  (0.1ms) RELEASE SAVEPOINT active_record_1
900
+ S3Relay::Upload Load (0.5ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 3 AND "s3_relay_uploads"."upload_type" = 'IconUpload' ORDER BY pending_at ASC LIMIT 1
901
+  (0.1ms) ROLLBACK
902
+  (0.2ms) BEGIN
903
+ ------------------------------------------------------
904
+ S3Relay::Upload::scopes::imported: test_0001_anonymous
905
+ ------------------------------------------------------
906
+  (0.2ms) SAVEPOINT active_record_1
907
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:34:53.119514"], ["pending_at", "2016-09-07 16:34:53.119013"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.119514"]]
908
+  (0.2ms) RELEASE SAVEPOINT active_record_1
909
+  (0.1ms) SAVEPOINT active_record_1
910
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:34:53.121838"], ["pending_at", "2016-09-07 16:34:53.121463"], ["state", "imported"], ["updated_at", "2016-09-07 16:34:53.121838"]]
911
+  (0.1ms) RELEASE SAVEPOINT active_record_1
912
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."state" = 'imported'
913
+  (0.1ms) ROLLBACK
914
+  (0.1ms) BEGIN
915
+ -----------------------------------------------------
916
+ S3Relay::Upload::scopes::pending: test_0001_anonymous
917
+ -----------------------------------------------------
918
+  (0.1ms) SAVEPOINT active_record_1
919
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:34:53.126702"], ["pending_at", "2016-09-07 16:34:53.126384"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.126702"]]
920
+  (0.1ms) RELEASE SAVEPOINT active_record_1
921
+  (0.1ms) SAVEPOINT active_record_1
922
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:34:53.128365"], ["pending_at", "2016-09-07 16:34:53.128075"], ["state", "imported"], ["updated_at", "2016-09-07 16:34:53.128365"]]
923
+  (0.1ms) RELEASE SAVEPOINT active_record_1
924
+ S3Relay::Upload Load (0.3ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."state" = 'pending'
925
+  (0.1ms) ROLLBACK
926
+  (0.1ms) BEGIN
927
+ ---------------------------------------------------------------------------------
928
+ S3Relay::UploadsHelper::#s3_relay_field::with multiple: true: test_0001_anonymous
929
+ ---------------------------------------------------------------------------------
930
+  (0.1ms) SAVEPOINT active_record_1
931
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.134199"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.134199"]]
932
+  (0.1ms) RELEASE SAVEPOINT active_record_1
933
+  (0.1ms) ROLLBACK
934
+  (0.1ms) BEGIN
935
+ --------------------------------------------------------
936
+ S3Relay::UploadsController::GET new: test_0001_anonymous
937
+ --------------------------------------------------------
938
+ Processing by S3Relay::UploadsController#new as HTML
939
+ Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.0ms)
940
+  (0.1ms) ROLLBACK
941
+  (0.1ms) BEGIN
942
+ --------------------------------------------------------------------------------------------------------------------------------------------
943
+ S3Relay::UploadsController::POST create::success::with parent attributes::with a current_user: test_0001_associates the upload with the user
944
+ --------------------------------------------------------------------------------------------------------------------------------------------
945
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
946
+ Processing by S3Relay::UploadsController#create as HTML
947
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"f6cb3d96-1e8a-497a-9150-ea7b28ad06be", "filename"=>"cat.png", "content_type"=>"image/png"}
948
+  (0.2ms) SAVEPOINT active_record_1
949
+ S3Relay::Upload Exists (0.4ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
950
+ :value: f6cb3d96-1e8a-497a-9150-ea7b28ad06be
951
+ :format: 1
952
+ ' LIMIT 1
953
+ SQL (0.3ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "user_id", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.152389"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.149758"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.152389"], ["upload_type", "PhotoUpload"], ["user_id", 123], ["uuid", "<36 bytes of binary data>"]]
954
+  (0.1ms) RELEASE SAVEPOINT active_record_1
955
+ Completed 201 Created in 6ms (Views: 0.2ms | ActiveRecord: 0.9ms)
956
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
957
+  (0.1ms) ROLLBACK
958
+  (0.1ms) BEGIN
959
+  (0.1ms) COMMIT
960
+  (0.1ms) BEGIN
961
+  (0.1ms) SAVEPOINT active_record_1
962
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.158187"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.158187"]]
963
+  (0.1ms) RELEASE SAVEPOINT active_record_1
964
+  (0.1ms) SAVEPOINT active_record_1
965
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
966
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
967
+ :format: 1
968
+ ' LIMIT 1
969
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.160684"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.159378"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.160684"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
970
+  (0.1ms) RELEASE SAVEPOINT active_record_1
971
+  (0.1ms) SAVEPOINT active_record_1
972
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
973
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
974
+ :format: 1
975
+ ' LIMIT 1
976
+ SQL (0.1ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.162961"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.161939"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.162961"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
977
+  (0.1ms) RELEASE SAVEPOINT active_record_1
978
+  (0.1ms) SAVEPOINT active_record_1
979
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
980
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
981
+ :format: 1
982
+ ' LIMIT 1
983
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.165307"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.164193"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.165307"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
984
+  (0.1ms) RELEASE SAVEPOINT active_record_1
985
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 5 AND "s3_relay_uploads"."upload_type" = 'IconUpload' ORDER BY pending_at ASC LIMIT 1
986
+  (0.1ms) ROLLBACK
987
+  (0.1ms) BEGIN
988
+ -------------------------------------------------------
989
+ S3Relay::Upload::upon finalization: test_0001_anonymous
990
+ -------------------------------------------------------
991
+  (0.1ms) ROLLBACK
992
+  (0.1ms) BEGIN
993
+ -----------------------------------------------
994
+ S3Relay::Upload::#imported: test_0001_anonymous
995
+ -----------------------------------------------
996
+  (0.1ms) ROLLBACK
997
+  (0.1ms) BEGIN
998
+ -----------------------------------------------------------------------------------------------------------------
999
+ S3Relay::UploadsController::POST create::success::with parent attributes::matching an object: test_0001_anonymous
1000
+ -----------------------------------------------------------------------------------------------------------------
1001
+  (0.1ms) SAVEPOINT active_record_1
1002
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.173573"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.173573"]]
1003
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1004
+  (0.4ms) SELECT COUNT(*) FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 6 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
1005
+ Processing by S3Relay::UploadsController#create as HTML
1006
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"3aa3d439-ed71-44c1-91e4-18499be8a080", "filename"=>"cat.png", "content_type"=>"image/png", "parent_type"=>"Product", "parent_id"=>"6"}
1007
+ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 6 LIMIT 1
1008
+  (0.1ms) SAVEPOINT active_record_1
1009
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1010
+ :value: 3aa3d439-ed71-44c1-91e4-18499be8a080
1011
+ :format: 1
1012
+ ' LIMIT 1
1013
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.180270"], ["filename", "cat.png"], ["parent_id", 6], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:34:53.178717"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.180270"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1014
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1015
+ Completed 201 Created in 5ms (Views: 0.2ms | ActiveRecord: 0.9ms)
1016
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 6 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
1017
+  (0.1ms) ROLLBACK
1018
+  (0.1ms) BEGIN
1019
+  (0.1ms) COMMIT
1020
+  (0.1ms) BEGIN
1021
+  (0.1ms) ROLLBACK
1022
+  (0.1ms) BEGIN
1023
+  (0.1ms) COMMIT
1024
+  (0.1ms) BEGIN
1025
+  (0.1ms) ROLLBACK
1026
+  (0.1ms) BEGIN
1027
+  (0.1ms) COMMIT
1028
+  (0.1ms) BEGIN
1029
+  (0.1ms) ROLLBACK
1030
+  (0.1ms) BEGIN
1031
+ -----------------------------------------------
1032
+ S3Relay::Upload::#pending?: test_0001_anonymous
1033
+ -----------------------------------------------
1034
+  (0.1ms) ROLLBACK
1035
+  (0.1ms) BEGIN
1036
+ -----------------------------------------------------
1037
+ S3Relay::Upload::#mark_imported!: test_0001_anonymous
1038
+ -----------------------------------------------------
1039
+  (0.1ms) SAVEPOINT active_record_1
1040
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1041
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1042
+  (0.1ms) ROLLBACK
1043
+  (0.1ms) BEGIN
1044
+ -----------------------------------------------------------------------------------
1045
+ S3Relay::Upload::#notify_parent::when the parent is associated: test_0001_anonymous
1046
+ -----------------------------------------------------------------------------------
1047
+  (0.1ms) SAVEPOINT active_record_1
1048
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.195608"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.195608"]]
1049
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1050
+  (0.1ms) SAVEPOINT active_record_1
1051
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1052
+ :value: bb66867f-e23a-4b65-93cd-61cab6718c14
1053
+ :format: 1
1054
+ ' LIMIT 1
1055
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.198154"], ["filename", "cat.png"], ["parent_id", 7], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:34:53.194984"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.198154"], ["upload_type", "FileUpload"], ["uuid", "<36 bytes of binary data>"]]
1056
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1057
+  (0.1ms) ROLLBACK
1058
+  (0.1ms) BEGIN
1059
+ -----------------------------------------------------------------------------
1060
+ S3Relay::UploadsHelper::#s3_relay_field::without options: test_0001_anonymous
1061
+ -----------------------------------------------------------------------------
1062
+  (0.1ms) SAVEPOINT active_record_1
1063
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.201558"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.201558"]]
1064
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1065
+  (0.1ms) ROLLBACK
1066
+  (0.1ms) BEGIN
1067
+  (0.1ms) COMMIT
1068
+  (0.1ms) BEGIN
1069
+  (0.1ms) ROLLBACK
1070
+  (0.1ms) BEGIN
1071
+ ------------------------------------------------------------------------------------------
1072
+ S3Relay::UploadsHelper::#s3_relay_field::with disposition: attachment: test_0001_anonymous
1073
+ ------------------------------------------------------------------------------------------
1074
+  (0.1ms) SAVEPOINT active_record_1
1075
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:34:53.206480"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:34:53.206480"]]
1076
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1077
+  (0.1ms) ROLLBACK
1078
+  (0.1ms) BEGIN
1079
+ ---------------------------------------------------------------------
1080
+ S3Relay::UploadsController::POST create::success: test_0001_anonymous
1081
+ ---------------------------------------------------------------------
1082
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1083
+ Processing by S3Relay::UploadsController#create as HTML
1084
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"01988f6c-3e2a-4d19-8b54-f53e01c3b1c7", "filename"=>"cat.png", "content_type"=>"image/png"}
1085
+  (0.1ms) SAVEPOINT active_record_1
1086
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1087
+ :value: 01988f6c-3e2a-4d19-8b54-f53e01c3b1c7
1088
+ :format: 1
1089
+ ' LIMIT 1
1090
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.214229"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.212902"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.214229"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1091
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1092
+ Completed 201 Created in 4ms (Views: 0.3ms | ActiveRecord: 0.7ms)
1093
+  (0.3ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1094
+  (0.2ms) ROLLBACK
1095
+  (0.1ms) BEGIN
1096
+ ----------------------------------------------------------------
1097
+ S3Relay::Upload::validations::uuid: test_0001_validates presence
1098
+ ----------------------------------------------------------------
1099
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1100
+  (0.1ms) ROLLBACK
1101
+  (0.1ms) BEGIN
1102
+ ------------------------------------------------------------------
1103
+ S3Relay::Upload::validations::uuid: test_0002_validates uniqueness
1104
+ ------------------------------------------------------------------
1105
+  (0.1ms) SAVEPOINT active_record_1
1106
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:34:53.223765"], ["pending_at", "2016-09-07 16:34:53.223475"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.223765"]]
1107
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1108
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1109
+  (0.1ms) ROLLBACK
1110
+  (0.1ms) BEGIN
1111
+ ---------------------------------------------------------------------------------------------------------------------
1112
+ S3Relay::UploadsController::POST create::success::with parent attributes::not matching an object: test_0001_anonymous
1113
+ ---------------------------------------------------------------------------------------------------------------------
1114
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1115
+ Processing by S3Relay::UploadsController#create as HTML
1116
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"7add59ac-43d1-4762-b858-9f002d363c02", "filename"=>"cat.png", "content_type"=>"image/png", "parent_type"=>"Product", "parent_id"=>"10000000"}
1117
+ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 10000000 LIMIT 1
1118
+  (0.1ms) SAVEPOINT active_record_1
1119
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1120
+ :value: 7add59ac-43d1-4762-b858-9f002d363c02
1121
+ :format: 1
1122
+ ' LIMIT 1
1123
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:34:53.235583"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:34:53.233235"], ["state", "pending"], ["updated_at", "2016-09-07 16:34:53.235583"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1124
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1125
+ Completed 201 Created in 6ms (Views: 0.2ms | ActiveRecord: 1.1ms)
1126
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1127
+  (0.1ms) ROLLBACK
1128
+  (0.1ms) BEGIN
1129
+ -------------------------------------------------------------------
1130
+ S3Relay::UploadsController::POST create::error: test_0001_anonymous
1131
+ -------------------------------------------------------------------
1132
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1133
+ Processing by S3Relay::UploadsController#create as HTML
1134
+ Parameters: {"uuid"=>"2f57f99e-d3b3-4226-a4d2-7c438bd0e6fd", "filename"=>"cat.png", "content_type"=>"image/png"}
1135
+  (0.1ms) SAVEPOINT active_record_1
1136
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1137
+ :value: 2f57f99e-d3b3-4226-a4d2-7c438bd0e6fd
1138
+ :format: 1
1139
+ ' LIMIT 1
1140
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1141
+ Completed 422 Unprocessable Entity in 3ms (Views: 0.2ms | ActiveRecord: 0.5ms)
1142
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1143
+  (0.1ms) ROLLBACK
1144
+  (0.1ms) BEGIN
1145
+ ----------------------------------------------------------
1146
+ S3Relay::Upload::associations::parent: test_0001_anonymous
1147
+ ----------------------------------------------------------
1148
+  (0.1ms) ROLLBACK
1149
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1150
+  (0.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "products" DISABLE TRIGGER ALL;ALTER TABLE "s3_relay_uploads" DISABLE TRIGGER ALL
1151
+  (2.2ms) select table_name from information_schema.views where table_schema = 's3_relay_test'
1152
+  (4.6ms) TRUNCATE TABLE "products", "s3_relay_uploads" RESTART IDENTITY CASCADE;
1153
+  (0.3ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "products" ENABLE TRIGGER ALL;ALTER TABLE "s3_relay_uploads" ENABLE TRIGGER ALL
1154
+  (0.2ms) BEGIN
1155
+ --------------------------------------------------------
1156
+ S3Relay::UploadsController::GET new: test_0001_anonymous
1157
+ --------------------------------------------------------
1158
+ Processing by S3Relay::UploadsController#new as HTML
1159
+ Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1160
+  (0.2ms) ROLLBACK
1161
+  (0.1ms) BEGIN
1162
+ -----------------------------------------------------------------------------
1163
+ S3Relay::UploadsHelper::#s3_relay_field::without options: test_0001_anonymous
1164
+ -----------------------------------------------------------------------------
1165
+  (0.2ms) SAVEPOINT active_record_1
1166
+ SQL (0.5ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:35:33.408574"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:35:33.408574"]]
1167
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1168
+  (0.1ms) ROLLBACK
1169
+  (0.1ms) BEGIN
1170
+  (0.1ms) COMMIT
1171
+  (0.1ms) BEGIN
1172
+  (0.1ms) SAVEPOINT active_record_1
1173
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:35:33.415759"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:35:33.415759"]]
1174
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1175
+  (0.1ms) SAVEPOINT active_record_1
1176
+ S3Relay::Upload Exists (0.5ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1177
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1178
+ :format: 1
1179
+ ' LIMIT 1
1180
+ SQL (0.4ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.436619"], ["filename", "cat.png"], ["parent_id", 2], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:35:33.426094"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.436619"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
1181
+  (0.2ms) RELEASE SAVEPOINT active_record_1
1182
+  (0.1ms) SAVEPOINT active_record_1
1183
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1184
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1185
+ :format: 1
1186
+ ' LIMIT 1
1187
+ SQL (0.3ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.441855"], ["filename", "cat.png"], ["parent_id", 2], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:35:33.439746"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.441855"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1188
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1189
+  (0.1ms) SAVEPOINT active_record_1
1190
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1191
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1192
+ :format: 1
1193
+ ' LIMIT 1
1194
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.445236"], ["filename", "cat.png"], ["parent_id", 2], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:35:33.443662"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.445236"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1195
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1196
+ S3Relay::Upload Load (0.6ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 2 AND "s3_relay_uploads"."upload_type" = 'IconUpload' ORDER BY pending_at ASC LIMIT 1
1197
+  (0.1ms) ROLLBACK
1198
+  (0.1ms) BEGIN
1199
+ -----------------------------------------------
1200
+ S3Relay::Upload::#pending?: test_0001_anonymous
1201
+ -----------------------------------------------
1202
+  (0.1ms) ROLLBACK
1203
+  (0.1ms) BEGIN
1204
+  (0.1ms) COMMIT
1205
+  (0.1ms) BEGIN
1206
+  (0.1ms) SAVEPOINT active_record_1
1207
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:35:33.454415"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:35:33.454415"]]
1208
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1209
+  (0.1ms) SAVEPOINT active_record_1
1210
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1211
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1212
+ :format: 1
1213
+ ' LIMIT 1
1214
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.457570"], ["filename", "cat.png"], ["parent_id", 3], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:35:33.455878"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.457570"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
1215
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1216
+  (0.1ms) SAVEPOINT active_record_1
1217
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1218
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1219
+ :format: 1
1220
+ ' LIMIT 1
1221
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.460805"], ["filename", "cat.png"], ["parent_id", 3], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:35:33.459175"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.460805"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1222
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1223
+  (0.1ms) SAVEPOINT active_record_1
1224
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1225
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1226
+ :format: 1
1227
+ ' LIMIT 1
1228
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.463621"], ["filename", "cat.png"], ["parent_id", 3], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:35:33.462331"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.463621"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1229
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1230
+  (0.2ms) SELECT "s3_relay_uploads"."id" FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 3 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
1231
+  (0.2ms) ROLLBACK
1232
+  (0.1ms) BEGIN
1233
+ -------------------------------------------------------
1234
+ S3Relay::Upload::upon finalization: test_0001_anonymous
1235
+ -------------------------------------------------------
1236
+  (0.1ms) ROLLBACK
1237
+  (0.1ms) BEGIN
1238
+  (0.1ms) COMMIT
1239
+  (0.1ms) BEGIN
1240
+  (0.1ms) SAVEPOINT active_record_1
1241
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:35:33.468578"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:35:33.468578"]]
1242
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1243
+  (0.1ms) SAVEPOINT active_record_1
1244
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1245
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1246
+ :format: 1
1247
+ ' LIMIT 1
1248
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.470943"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:35:33.469673"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.470943"], ["upload_type", "IconUpload"], ["uuid", "<36 bytes of binary data>"]]
1249
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1250
+  (0.1ms) SAVEPOINT active_record_1
1251
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1252
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1253
+ :format: 1
1254
+ ' LIMIT 1
1255
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.473517"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:35:33.472414"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.473517"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1256
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1257
+  (0.1ms) SAVEPOINT active_record_1
1258
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1259
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1260
+ :format: 1
1261
+ ' LIMIT 1
1262
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.475884"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:35:33.474755"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.475884"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1263
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1264
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 4 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
1265
+ SQL (0.3ms) UPDATE "s3_relay_uploads" SET "parent_type" = 'Product', "parent_id" = 4 WHERE "s3_relay_uploads"."uuid" IN ('0c3a7abe-8821-4e0b-a423-99a1c2fa2e57', '0c3a7abe-8821-4e0b-a423-99a1c2fa2e57') AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
1266
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 4 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
1267
+  (0.1ms) ROLLBACK
1268
+  (0.1ms) BEGIN
1269
+ ----------------------------------------------------------------------
1270
+ S3Relay::Upload::validations::pending_at: test_0001_validates presence
1271
+ ----------------------------------------------------------------------
1272
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1273
+  (0.1ms) ROLLBACK
1274
+  (0.1ms) BEGIN
1275
+ ----------------------------------------------------------------
1276
+ S3Relay::Upload::validations::uuid: test_0001_validates presence
1277
+ ----------------------------------------------------------------
1278
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1279
+  (0.1ms) ROLLBACK
1280
+  (0.1ms) BEGIN
1281
+ ------------------------------------------------------------------
1282
+ S3Relay::Upload::validations::uuid: test_0002_validates uniqueness
1283
+ ------------------------------------------------------------------
1284
+  (0.1ms) SAVEPOINT active_record_1
1285
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:35:33.494259"], ["pending_at", "2016-09-07 16:35:33.493873"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.494259"]]
1286
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1287
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1288
+  (0.1ms) ROLLBACK
1289
+  (0.1ms) BEGIN
1290
+ --------------------------------------------------
1291
+ S3Relay::Upload::#private_url: test_0001_anonymous
1292
+ --------------------------------------------------
1293
+  (0.1ms) ROLLBACK
1294
+  (0.1ms) BEGIN
1295
+  (0.1ms) COMMIT
1296
+  (0.1ms) BEGIN
1297
+  (0.1ms) ROLLBACK
1298
+  (0.1ms) BEGIN
1299
+ -----------------------------------------------------
1300
+ S3Relay::Upload::scopes::pending: test_0001_anonymous
1301
+ -----------------------------------------------------
1302
+  (0.1ms) SAVEPOINT active_record_1
1303
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:35:33.504025"], ["pending_at", "2016-09-07 16:35:33.503768"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.504025"]]
1304
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1305
+  (0.1ms) SAVEPOINT active_record_1
1306
+ SQL (0.1ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:35:33.505527"], ["pending_at", "2016-09-07 16:35:33.505255"], ["state", "imported"], ["updated_at", "2016-09-07 16:35:33.505527"]]
1307
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1308
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."state" = 'pending'
1309
+  (0.1ms) ROLLBACK
1310
+  (0.1ms) BEGIN
1311
+  (0.1ms) COMMIT
1312
+  (0.1ms) BEGIN
1313
+  (0.1ms) ROLLBACK
1314
+  (0.1ms) BEGIN
1315
+ -----------------------------------------------------------------------------------------------------------------
1316
+ S3Relay::UploadsController::POST create::success::with parent attributes::matching an object: test_0001_anonymous
1317
+ -----------------------------------------------------------------------------------------------------------------
1318
+  (0.1ms) SAVEPOINT active_record_1
1319
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:35:33.514731"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:35:33.514731"]]
1320
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1321
+  (0.3ms) SELECT COUNT(*) FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 5 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
1322
+ Processing by S3Relay::UploadsController#create as HTML
1323
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"6df49f66-b480-4815-8593-c5f01772f657", "filename"=>"cat.png", "content_type"=>"image/png", "parent_type"=>"Product", "parent_id"=>"5"}
1324
+ Product Load (0.3ms) SELECT "products".* FROM "products" WHERE "products"."id" = 5 LIMIT 1
1325
+  (0.2ms) SAVEPOINT active_record_1
1326
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1327
+ :value: 6df49f66-b480-4815-8593-c5f01772f657
1328
+ :format: 1
1329
+ ' LIMIT 1
1330
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.522707"], ["filename", "cat.png"], ["parent_id", 5], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:35:33.519992"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.522707"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1331
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1332
+ Completed 201 Created in 7ms (Views: 0.2ms | ActiveRecord: 1.1ms)
1333
+  (0.3ms) SELECT COUNT(*) FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."parent_type" = 'Product' AND "s3_relay_uploads"."parent_id" = 5 AND "s3_relay_uploads"."upload_type" = 'PhotoUpload'
1334
+  (0.1ms) ROLLBACK
1335
+  (0.1ms) BEGIN
1336
+ ---------------------------------------------------------------------
1337
+ S3Relay::UploadsController::POST create::success: test_0001_anonymous
1338
+ ---------------------------------------------------------------------
1339
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1340
+ Processing by S3Relay::UploadsController#create as HTML
1341
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"000a20e4-ed14-4254-b6a1-dd299691c292", "filename"=>"cat.png", "content_type"=>"image/png"}
1342
+  (0.1ms) SAVEPOINT active_record_1
1343
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1344
+ :value: 000a20e4-ed14-4254-b6a1-dd299691c292
1345
+ :format: 1
1346
+ ' LIMIT 1
1347
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.533674"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:35:33.532364"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.533674"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1348
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1349
+ Completed 201 Created in 4ms (Views: 0.2ms | ActiveRecord: 0.6ms)
1350
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1351
+  (0.1ms) ROLLBACK
1352
+  (0.1ms) BEGIN
1353
+ ----------------------------------------------------------
1354
+ S3Relay::Upload::associations::parent: test_0001_anonymous
1355
+ ----------------------------------------------------------
1356
+  (0.1ms) ROLLBACK
1357
+  (0.1ms) BEGIN
1358
+ --------------------------------------------------------------------
1359
+ S3Relay::Upload::validations::filename: test_0001_validates presence
1360
+ --------------------------------------------------------------------
1361
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1362
+  (0.1ms) ROLLBACK
1363
+  (0.1ms) BEGIN
1364
+ -------------------------------------------------------------------
1365
+ S3Relay::UploadsController::POST create::error: test_0001_anonymous
1366
+ -------------------------------------------------------------------
1367
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1368
+ Processing by S3Relay::UploadsController#create as HTML
1369
+ Parameters: {"uuid"=>"958b443a-ebd0-49cf-a23f-263dc9810bc3", "filename"=>"cat.png", "content_type"=>"image/png"}
1370
+  (0.1ms) SAVEPOINT active_record_1
1371
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1372
+ :value: 958b443a-ebd0-49cf-a23f-263dc9810bc3
1373
+ :format: 1
1374
+ ' LIMIT 1
1375
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1376
+ Completed 422 Unprocessable Entity in 2ms (Views: 0.1ms | ActiveRecord: 0.4ms)
1377
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1378
+  (0.1ms) ROLLBACK
1379
+  (0.1ms) BEGIN
1380
+ ---------------------------------------------------------------------------------
1381
+ S3Relay::UploadsHelper::#s3_relay_field::with multiple: true: test_0001_anonymous
1382
+ ---------------------------------------------------------------------------------
1383
+  (0.1ms) SAVEPOINT active_record_1
1384
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:35:33.552314"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:35:33.552314"]]
1385
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1386
+  (0.1ms) ROLLBACK
1387
+  (0.1ms) BEGIN
1388
+  (0.1ms) COMMIT
1389
+  (0.1ms) BEGIN
1390
+  (0.1ms) ROLLBACK
1391
+  (0.1ms) BEGIN
1392
+  (0.1ms) COMMIT
1393
+  (0.1ms) BEGIN
1394
+  (0.1ms) ROLLBACK
1395
+  (0.1ms) BEGIN
1396
+ ------------------------------------------------------------------------------------------
1397
+ S3Relay::UploadsHelper::#s3_relay_field::with disposition: attachment: test_0001_anonymous
1398
+ ------------------------------------------------------------------------------------------
1399
+  (0.2ms) SAVEPOINT active_record_1
1400
+ SQL (0.2ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:35:33.557755"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:35:33.557755"]]
1401
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1402
+  (0.1ms) ROLLBACK
1403
+  (0.1ms) BEGIN
1404
+ -----------------------------------------------------------------------------------
1405
+ S3Relay::Upload::#notify_parent::when the parent is associated: test_0001_anonymous
1406
+ -----------------------------------------------------------------------------------
1407
+  (0.1ms) SAVEPOINT active_record_1
1408
+ SQL (0.1ms) INSERT INTO "products" ("created_at", "name", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", "2016-09-07 16:35:33.561051"], ["name", "Flux Capacitor"], ["updated_at", "2016-09-07 16:35:33.561051"]]
1409
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1410
+  (0.1ms) SAVEPOINT active_record_1
1411
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1412
+ :value: 0c3a7abe-8821-4e0b-a423-99a1c2fa2e57
1413
+ :format: 1
1414
+ ' LIMIT 1
1415
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "parent_id", "parent_type", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.563692"], ["filename", "cat.png"], ["parent_id", 8], ["parent_type", "Product"], ["pending_at", "2016-09-07 16:35:33.560469"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.563692"], ["upload_type", "FileUpload"], ["uuid", "<36 bytes of binary data>"]]
1416
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1417
+  (0.1ms) ROLLBACK
1418
+  (0.1ms) BEGIN
1419
+ ------------------------------------------------------
1420
+ S3Relay::Upload::scopes::imported: test_0001_anonymous
1421
+ ------------------------------------------------------
1422
+  (0.1ms) SAVEPOINT active_record_1
1423
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:35:33.566544"], ["pending_at", "2016-09-07 16:35:33.566261"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.566544"]]
1424
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1425
+  (0.1ms) SAVEPOINT active_record_1
1426
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("created_at", "pending_at", "state", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2016-09-07 16:35:33.567892"], ["pending_at", "2016-09-07 16:35:33.567623"], ["state", "imported"], ["updated_at", "2016-09-07 16:35:33.567892"]]
1427
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1428
+ S3Relay::Upload Load (0.2ms) SELECT "s3_relay_uploads".* FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."state" = 'imported'
1429
+  (0.1ms) ROLLBACK
1430
+  (0.1ms) BEGIN
1431
+ -----------------------------------------------
1432
+ S3Relay::Upload::#imported: test_0001_anonymous
1433
+ -----------------------------------------------
1434
+  (0.1ms) ROLLBACK
1435
+  (0.1ms) BEGIN
1436
+ -----------------------------------------------------
1437
+ S3Relay::Upload::#mark_imported!: test_0001_anonymous
1438
+ -----------------------------------------------------
1439
+  (0.1ms) SAVEPOINT active_record_1
1440
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1441
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1442
+  (0.1ms) ROLLBACK
1443
+  (0.1ms) BEGIN
1444
+  (0.1ms) COMMIT
1445
+  (0.1ms) BEGIN
1446
+  (0.1ms) ROLLBACK
1447
+  (0.1ms) BEGIN
1448
+ ------------------------------------------------------------------------
1449
+ S3Relay::Upload::validations::content_type: test_0001_validates presence
1450
+ ------------------------------------------------------------------------
1451
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
1452
+  (0.1ms) ROLLBACK
1453
+  (0.1ms) BEGIN
1454
+ ---------------------------------------------------------------------------------------------------------------------
1455
+ S3Relay::UploadsController::POST create::success::with parent attributes::not matching an object: test_0001_anonymous
1456
+ ---------------------------------------------------------------------------------------------------------------------
1457
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1458
+ Processing by S3Relay::UploadsController#create as HTML
1459
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"0d4facb1-717b-45cc-b423-a4d79c931a0c", "filename"=>"cat.png", "content_type"=>"image/png", "parent_type"=>"Product", "parent_id"=>"10000000"}
1460
+ Product Load (0.2ms) SELECT "products".* FROM "products" WHERE "products"."id" = 10000000 LIMIT 1
1461
+  (0.1ms) SAVEPOINT active_record_1
1462
+ S3Relay::Upload Exists (0.3ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1463
+ :value: 0d4facb1-717b-45cc-b423-a4d79c931a0c
1464
+ :format: 1
1465
+ ' LIMIT 1
1466
+ SQL (0.3ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.587219"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:35:33.585031"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.587219"], ["upload_type", "PhotoUpload"], ["uuid", "<36 bytes of binary data>"]]
1467
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1468
+ Completed 201 Created in 5ms (Views: 0.2ms | ActiveRecord: 1.1ms)
1469
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1470
+  (0.1ms) ROLLBACK
1471
+  (0.1ms) BEGIN
1472
+ --------------------------------------------------------------------------------------------------------------------------------------------
1473
+ S3Relay::UploadsController::POST create::success::with parent attributes::with a current_user: test_0001_associates the upload with the user
1474
+ --------------------------------------------------------------------------------------------------------------------------------------------
1475
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1476
+ Processing by S3Relay::UploadsController#create as HTML
1477
+ Parameters: {"association"=>"photo_uploads", "uuid"=>"6544b507-91fc-4418-ad95-aecda6a72b5b", "filename"=>"cat.png", "content_type"=>"image/png"}
1478
+  (0.1ms) SAVEPOINT active_record_1
1479
+ S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" = '---
1480
+ :value: 6544b507-91fc-4418-ad95-aecda6a72b5b
1481
+ :format: 1
1482
+ ' LIMIT 1
1483
+ SQL (0.2ms) INSERT INTO "s3_relay_uploads" ("content_type", "created_at", "filename", "pending_at", "state", "updated_at", "upload_type", "user_id", "uuid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["content_type", "image/png"], ["created_at", "2016-09-07 16:35:33.598839"], ["filename", "cat.png"], ["pending_at", "2016-09-07 16:35:33.597471"], ["state", "pending"], ["updated_at", "2016-09-07 16:35:33.598839"], ["upload_type", "PhotoUpload"], ["user_id", 123], ["uuid", "<36 bytes of binary data>"]]
1484
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1485
+ Completed 201 Created in 4ms (Views: 0.2ms | ActiveRecord: 0.6ms)
1486
+  (0.2ms) SELECT COUNT(*) FROM "s3_relay_uploads"
1487
+  (0.1ms) ROLLBACK
1488
+  (0.1ms) BEGIN
1489
+ -----------------------------------------------------------------------
1490
+ S3Relay::Upload::validations::upload_type: test_0001_validates presence
386
1491
  -----------------------------------------------------------------------
387
1492
  S3Relay::Upload Exists (0.2ms) SELECT 1 AS one FROM "s3_relay_uploads" WHERE "s3_relay_uploads"."uuid" IS NULL LIMIT 1
388
1493
   (0.1ms) ROLLBACK