custom_emails 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4467,3 +4467,468 @@ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by
4467
4467
  CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."emailable_id" = ? AND "custom_emails_emails"."emailable_type" = ? [["emailable_id", 1], ["emailable_type", "Example"]]
4468
4468
  CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (1, 2)
4469
4469
   (0.1ms) rollback transaction
4470
+  (0.3ms) begin transaction
4471
+ ----------------------------------------------------------------------------------
4472
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
4473
+ ----------------------------------------------------------------------------------
4474
+
4475
+ Sent mail to foo@bar.org (36.1ms)
4476
+ Date: Tue, 24 Dec 2013 11:01:12 +0100
4477
+ From: sender@example.org
4478
+ To: foo@bar.org
4479
+ Message-ID: <52b95b68de362_27ef3f92e6f55e8453d1@chocapic.mail>
4480
+ Subject:
4481
+ Mime-Version: 1.0
4482
+ Content-Type: text/plain;
4483
+ charset=UTF-8
4484
+ Content-Transfer-Encoding: 7bit
4485
+
4486
+
4487
+  (0.1ms) rollback transaction
4488
+  (0.1ms) begin transaction
4489
+ ----------------------------------------------------------------------------------------------------------
4490
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
4491
+ ----------------------------------------------------------------------------------------------------------
4492
+  (0.0ms) rollback transaction
4493
+  (0.0ms) begin transaction
4494
+ -------------------------------------------------------------------
4495
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
4496
+ -------------------------------------------------------------------
4497
+  (0.0ms) rollback transaction
4498
+  (0.0ms) begin transaction
4499
+ --------------------------------------------------------------------------------------------
4500
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
4501
+ --------------------------------------------------------------------------------------------
4502
+  (0.1ms) rollback transaction
4503
+  (0.0ms) begin transaction
4504
+ ----------------------------
4505
+ CustomEmailsTest: test_truth
4506
+ ----------------------------
4507
+  (0.0ms) rollback transaction
4508
+  (0.0ms) begin transaction
4509
+ ----------------------------------------------------------------------------------
4510
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
4511
+ ----------------------------------------------------------------------------------
4512
+ CustomEmails::EmailKind Load (0.3ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4513
+  (0.1ms) SAVEPOINT active_record_1
4514
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4515
+ SQL (33.7ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 10:01:12 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 10:01:12 UTC +00:00]]
4516
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4517
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4518
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4519
+  (0.0ms) SAVEPOINT active_record_1
4520
+ SQL (0.3ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_text", "Good luck..."], ["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["kind_id", 1], ["locale", :fr], ["subject", "Hello world!"], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4521
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4522
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4523
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4524
+  (0.1ms) rollback transaction
4525
+  (0.0ms) begin transaction
4526
+ --------------------------------------------------------------------------------------
4527
+ MailerTest: test_email_interpolated_attributes_are_used_when_custom_email_to_is_called
4528
+ --------------------------------------------------------------------------------------
4529
+  (0.1ms) SAVEPOINT active_record_1
4530
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4531
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4532
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4533
+  (0.0ms) SAVEPOINT active_record_1
4534
+ SQL (0.2ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_text", "Good luck {{ name }}..."], ["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["kind_id", 1], ["locale", :en], ["subject", "Hello {{ name }}!"], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4535
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4536
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4537
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4538
+
4539
+ Sent mail to test@example.com (3.5ms)
4540
+ Date: Tue, 24 Dec 2013 11:01:13 +0100
4541
+ From: sender@example.org
4542
+ To: test@example.com
4543
+ Message-ID: <52b95b6943f9_27ef3f92e6f55e845446@chocapic.mail>
4544
+ Subject: Hello Luc!
4545
+ Mime-Version: 1.0
4546
+ Content-Type: text/plain;
4547
+ charset=UTF-8
4548
+ Content-Transfer-Encoding: 7bit
4549
+
4550
+ Good luck Luc...
4551
+  (0.1ms) rollback transaction
4552
+  (0.0ms) begin transaction
4553
+ -----------------------------------------------------------------------------------
4554
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
4555
+ -----------------------------------------------------------------------------------
4556
+  (0.1ms) rollback transaction
4557
+  (0.0ms) begin transaction
4558
+ -----------------------------------------------------------------------------
4559
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
4560
+ -----------------------------------------------------------------------------
4561
+  (0.0ms) rollback transaction
4562
+  (0.0ms) begin transaction
4563
+ --------------------------------------------------------------------------------------------
4564
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
4565
+ --------------------------------------------------------------------------------------------
4566
+  (0.0ms) SAVEPOINT active_record_1
4567
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4568
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4569
+  (0.0ms) SAVEPOINT active_record_1
4570
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4571
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4572
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4573
+  (0.0ms) SAVEPOINT active_record_1
4574
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4575
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["name", :kind_2], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4576
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4577
+  (0.1ms) SAVEPOINT active_record_1
4578
+ SQL (0.3ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body"], ["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4579
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4580
+  (0.0ms) SAVEPOINT active_record_1
4581
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Faux corps 2"], ["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :fr], ["subject", "Faux subjet 2"], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4582
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4583
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."emailable_id" = ? AND "custom_emails_emails"."emailable_type" = ? AND "custom_emails_emails"."locale" = 'fr' [["emailable_id", 1], ["emailable_type", "Example"]]
4584
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (2)
4585
+  (0.1ms) rollback transaction
4586
+  (0.0ms) begin transaction
4587
+ -----------------------------------------------------------
4588
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
4589
+ -----------------------------------------------------------
4590
+  (0.0ms) rollback transaction
4591
+  (0.0ms) begin transaction
4592
+ -------------------------------------------------------------------------------------
4593
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
4594
+ -------------------------------------------------------------------------------------
4595
+  (0.0ms) SAVEPOINT active_record_1
4596
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4597
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4598
+  (0.0ms) SAVEPOINT active_record_1
4599
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4600
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4601
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4602
+  (0.0ms) SAVEPOINT active_record_1
4603
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4604
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["name", :kind_2], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4606
+  (0.0ms) SAVEPOINT active_record_1
4607
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body"], ["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4608
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4609
+  (0.0ms) SAVEPOINT active_record_1
4610
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body 2"], ["created_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :en], ["subject", "Fake subject 2"], ["updated_at", Tue, 24 Dec 2013 10:01:13 UTC +00:00]]
4611
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4612
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."emailable_id" = ? AND "custom_emails_emails"."emailable_type" = ? [["emailable_id", 1], ["emailable_type", "Example"]]
4613
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (1, 2)
4614
+  (0.1ms) rollback transaction
4615
+  (0.3ms) begin transaction
4616
+ ----------------------------------------------------------------------------------
4617
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
4618
+ ----------------------------------------------------------------------------------
4619
+
4620
+ Sent mail to foo@bar.org (4.5ms)
4621
+ Date: Tue, 24 Dec 2013 12:15:37 +0100
4622
+ From: sender@example.org
4623
+ To: foo@bar.org
4624
+ Message-ID: <52b96cd969e22_33e03f9ac1e33e74756a7@chocapic.mail>
4625
+ Subject:
4626
+ Mime-Version: 1.0
4627
+ Content-Type: text/plain;
4628
+ charset=UTF-8
4629
+ Content-Transfer-Encoding: 7bit
4630
+
4631
+
4632
+  (0.1ms) rollback transaction
4633
+  (0.0ms) begin transaction
4634
+ ----------------------------------------------------------------------------------------------------------
4635
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
4636
+ ----------------------------------------------------------------------------------------------------------
4637
+  (0.0ms) rollback transaction
4638
+  (0.0ms) begin transaction
4639
+ -------------------------------------------------------------------
4640
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
4641
+ -------------------------------------------------------------------
4642
+  (0.0ms) rollback transaction
4643
+  (0.0ms) begin transaction
4644
+ --------------------------------------------------------------------------------------------
4645
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
4646
+ --------------------------------------------------------------------------------------------
4647
+  (0.1ms) rollback transaction
4648
+  (0.0ms) begin transaction
4649
+ ------------------------------------------------------------------------------------------
4650
+ CustomEmails::ShortMessageTest: test_Short_message_has_interpolation_via_liquid_on_content
4651
+ ------------------------------------------------------------------------------------------
4652
+  (0.0ms) rollback transaction
4653
+  (0.0ms) begin transaction
4654
+ ------------------------------------------------------------------------------------
4655
+ CustomEmails::ShortMessageTest: test_short_message_is_scoped_to_an_messageable_model
4656
+ ------------------------------------------------------------------------------------
4657
+  (0.0ms) rollback transaction
4658
+  (0.0ms) begin transaction
4659
+ ---------------------------------------------------------------------------------------------
4660
+ CustomEmails::ShortMessageTest: test_short_message_needs_kind,_locale_and_content_to_be_valid
4661
+ ---------------------------------------------------------------------------------------------
4662
+  (0.0ms) rollback transaction
4663
+  (0.0ms) begin transaction
4664
+ ----------------------------
4665
+ CustomEmailsTest: test_truth
4666
+ ----------------------------
4667
+  (0.0ms) rollback transaction
4668
+  (0.0ms) begin transaction
4669
+ ----------------------------------------------------------------------------------
4670
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
4671
+ ----------------------------------------------------------------------------------
4672
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4673
+  (0.0ms) SAVEPOINT active_record_1
4674
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4675
+ SQL (0.7ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4676
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4677
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4678
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4679
+  (0.0ms) SAVEPOINT active_record_1
4680
+ SQL (0.3ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_text", "Good luck..."], ["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["kind_id", 1], ["locale", :fr], ["subject", "Hello world!"], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4681
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4682
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4683
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4684
+  (0.1ms) rollback transaction
4685
+  (0.0ms) begin transaction
4686
+ --------------------------------------------------------------------------------------
4687
+ MailerTest: test_email_interpolated_attributes_are_used_when_custom_email_to_is_called
4688
+ --------------------------------------------------------------------------------------
4689
+  (0.0ms) SAVEPOINT active_record_1
4690
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4691
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4692
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4693
+  (0.0ms) SAVEPOINT active_record_1
4694
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_text", "Good luck {{ name }}..."], ["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["kind_id", 1], ["locale", :en], ["subject", "Hello {{ name }}!"], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4695
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4696
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4697
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4698
+
4699
+ Sent mail to test@example.com (3.6ms)
4700
+ Date: Tue, 24 Dec 2013 12:15:37 +0100
4701
+ From: sender@example.org
4702
+ To: test@example.com
4703
+ Message-ID: <52b96cd974263_33e03f9ac1e33e74757a8@chocapic.mail>
4704
+ Subject: Hello Luc!
4705
+ Mime-Version: 1.0
4706
+ Content-Type: text/plain;
4707
+ charset=UTF-8
4708
+ Content-Transfer-Encoding: 7bit
4709
+
4710
+ Good luck Luc...
4711
+  (0.1ms) rollback transaction
4712
+  (0.0ms) begin transaction
4713
+ -----------------------------------------------------------------------------------
4714
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
4715
+ -----------------------------------------------------------------------------------
4716
+  (0.0ms) rollback transaction
4717
+  (0.0ms) begin transaction
4718
+ -----------------------------------------------------------------------------
4719
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
4720
+ -----------------------------------------------------------------------------
4721
+  (0.0ms) rollback transaction
4722
+  (0.0ms) begin transaction
4723
+ --------------------------------------------------------------------------------------------
4724
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
4725
+ --------------------------------------------------------------------------------------------
4726
+  (0.0ms) SAVEPOINT active_record_1
4727
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4728
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4729
+  (0.0ms) SAVEPOINT active_record_1
4730
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4731
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4732
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4733
+  (0.0ms) SAVEPOINT active_record_1
4734
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4735
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["name", :kind_2], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4736
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4737
+  (0.1ms) SAVEPOINT active_record_1
4738
+ SQL (0.2ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body"], ["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4739
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4740
+  (0.0ms) SAVEPOINT active_record_1
4741
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Faux corps 2"], ["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :fr], ["subject", "Faux subjet 2"], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4742
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4743
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."emailable_id" = ? AND "custom_emails_emails"."emailable_type" = ? AND "custom_emails_emails"."locale" = 'fr' [["emailable_id", 1], ["emailable_type", "Example"]]
4744
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (2)
4745
+  (0.1ms) rollback transaction
4746
+  (0.1ms) begin transaction
4747
+ -----------------------------------------------------------
4748
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
4749
+ -----------------------------------------------------------
4750
+  (0.0ms) rollback transaction
4751
+  (0.0ms) begin transaction
4752
+ -------------------------------------------------------------------------------------
4753
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
4754
+ -------------------------------------------------------------------------------------
4755
+  (0.0ms) SAVEPOINT active_record_1
4756
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4757
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4758
+  (0.0ms) SAVEPOINT active_record_1
4759
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4760
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4761
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4762
+  (0.0ms) SAVEPOINT active_record_1
4763
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4764
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["name", :kind_2], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4765
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4766
+  (0.0ms) SAVEPOINT active_record_1
4767
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body"], ["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4768
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4769
+  (0.0ms) SAVEPOINT active_record_1
4770
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body 2"], ["created_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :en], ["subject", "Fake subject 2"], ["updated_at", Tue, 24 Dec 2013 11:15:37 UTC +00:00]]
4771
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4772
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."emailable_id" = ? AND "custom_emails_emails"."emailable_type" = ? [["emailable_id", 1], ["emailable_type", "Example"]]
4773
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (1, 2)
4774
+  (0.1ms) rollback transaction
4775
+  (0.3ms) begin transaction
4776
+ ----------------------------------------------------------------------------------
4777
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
4778
+ ----------------------------------------------------------------------------------
4779
+
4780
+ Sent mail to foo@bar.org (4.8ms)
4781
+ Date: Tue, 24 Dec 2013 12:16:47 +0100
4782
+ From: sender@example.org
4783
+ To: foo@bar.org
4784
+ Message-ID: <52b96d1fb2eb9_343b3fbfebb9de7c97351@chocapic.mail>
4785
+ Subject:
4786
+ Mime-Version: 1.0
4787
+ Content-Type: text/plain;
4788
+ charset=UTF-8
4789
+ Content-Transfer-Encoding: 7bit
4790
+
4791
+
4792
+  (0.1ms) rollback transaction
4793
+  (0.0ms) begin transaction
4794
+ ----------------------------------------------------------------------------------------------------------
4795
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
4796
+ ----------------------------------------------------------------------------------------------------------
4797
+  (0.0ms) rollback transaction
4798
+  (0.0ms) begin transaction
4799
+ -------------------------------------------------------------------
4800
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
4801
+ -------------------------------------------------------------------
4802
+  (0.0ms) rollback transaction
4803
+  (0.0ms) begin transaction
4804
+ --------------------------------------------------------------------------------------------
4805
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
4806
+ --------------------------------------------------------------------------------------------
4807
+  (0.1ms) rollback transaction
4808
+  (0.0ms) begin transaction
4809
+ ------------------------------------------------------------------------------------------
4810
+ CustomEmails::ShortMessageTest: test_Short_message_has_interpolation_via_liquid_on_content
4811
+ ------------------------------------------------------------------------------------------
4812
+  (0.0ms) rollback transaction
4813
+  (0.0ms) begin transaction
4814
+ ------------------------------------------------------------------------------------
4815
+ CustomEmails::ShortMessageTest: test_short_message_is_scoped_to_an_messageable_model
4816
+ ------------------------------------------------------------------------------------
4817
+  (0.0ms) rollback transaction
4818
+  (0.0ms) begin transaction
4819
+ ---------------------------------------------------------------------------------------------
4820
+ CustomEmails::ShortMessageTest: test_short_message_needs_kind,_locale_and_content_to_be_valid
4821
+ ---------------------------------------------------------------------------------------------
4822
+  (0.0ms) rollback transaction
4823
+  (0.0ms) begin transaction
4824
+ ----------------------------
4825
+ CustomEmailsTest: test_truth
4826
+ ----------------------------
4827
+  (0.0ms) rollback transaction
4828
+  (0.0ms) begin transaction
4829
+ ----------------------------------------------------------------------------------
4830
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
4831
+ ----------------------------------------------------------------------------------
4832
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4833
+  (0.0ms) SAVEPOINT active_record_1
4834
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4835
+ SQL (0.7ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4836
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4837
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4838
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4839
+  (0.0ms) SAVEPOINT active_record_1
4840
+ SQL (0.2ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_text", "Good luck..."], ["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["kind_id", 1], ["locale", :fr], ["subject", "Hello world!"], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4841
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4842
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4843
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4844
+  (0.1ms) rollback transaction
4845
+  (0.1ms) begin transaction
4846
+ --------------------------------------------------------------------------------------
4847
+ MailerTest: test_email_interpolated_attributes_are_used_when_custom_email_to_is_called
4848
+ --------------------------------------------------------------------------------------
4849
+  (0.0ms) SAVEPOINT active_record_1
4850
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4851
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4852
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4853
+  (0.0ms) SAVEPOINT active_record_1
4854
+ SQL (0.2ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_text", "Good luck {{ name }}..."], ["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["kind_id", 1], ["locale", :en], ["subject", "Hello {{ name }}!"], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4855
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4856
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4857
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."kind_id" = 1 AND "custom_emails_emails"."emailable_id" IS NULL AND "custom_emails_emails"."locale" = 'en' LIMIT 1
4858
+
4859
+ Sent mail to test@example.com (3.6ms)
4860
+ Date: Tue, 24 Dec 2013 12:16:47 +0100
4861
+ From: sender@example.org
4862
+ To: test@example.com
4863
+ Message-ID: <52b96d1fbd526_343b3fbfebb9de7c97459@chocapic.mail>
4864
+ Subject: Hello Luc!
4865
+ Mime-Version: 1.0
4866
+ Content-Type: text/plain;
4867
+ charset=UTF-8
4868
+ Content-Transfer-Encoding: 7bit
4869
+
4870
+ Good luck Luc...
4871
+  (0.1ms) rollback transaction
4872
+  (0.0ms) begin transaction
4873
+ -----------------------------------------------------------------------------------
4874
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
4875
+ -----------------------------------------------------------------------------------
4876
+  (0.1ms) rollback transaction
4877
+  (0.0ms) begin transaction
4878
+ -----------------------------------------------------------------------------
4879
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
4880
+ -----------------------------------------------------------------------------
4881
+  (0.0ms) rollback transaction
4882
+  (0.0ms) begin transaction
4883
+ --------------------------------------------------------------------------------------------
4884
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
4885
+ --------------------------------------------------------------------------------------------
4886
+  (0.0ms) SAVEPOINT active_record_1
4887
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4888
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4889
+  (0.0ms) SAVEPOINT active_record_1
4890
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4891
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4892
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4893
+  (0.0ms) SAVEPOINT active_record_1
4894
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4895
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["name", :kind_2], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4896
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4897
+  (0.1ms) SAVEPOINT active_record_1
4898
+ SQL (0.2ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body"], ["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4899
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4900
+  (0.0ms) SAVEPOINT active_record_1
4901
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Faux corps 2"], ["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :fr], ["subject", "Faux subjet 2"], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4902
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4903
+ CustomEmails::Email Load (0.2ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."emailable_id" = ? AND "custom_emails_emails"."emailable_type" = ? AND "custom_emails_emails"."locale" = 'fr' [["emailable_id", 1], ["emailable_type", "Example"]]
4904
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (2)
4905
+  (0.1ms) rollback transaction
4906
+  (0.0ms) begin transaction
4907
+ -----------------------------------------------------------
4908
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
4909
+ -----------------------------------------------------------
4910
+  (0.0ms) rollback transaction
4911
+  (0.0ms) begin transaction
4912
+ -------------------------------------------------------------------------------------
4913
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
4914
+ -------------------------------------------------------------------------------------
4915
+  (0.0ms) SAVEPOINT active_record_1
4916
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4917
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4918
+  (0.0ms) SAVEPOINT active_record_1
4919
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4920
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["name", :kind_1], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4921
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4922
+  (0.0ms) SAVEPOINT active_record_1
4923
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4924
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["name", :kind_2], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4925
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4926
+  (0.0ms) SAVEPOINT active_record_1
4927
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body"], ["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4928
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4929
+  (0.0ms) SAVEPOINT active_record_1
4930
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "emailable_id", "emailable_type", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content_text", "Fake body 2"], ["created_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :en], ["subject", "Fake subject 2"], ["updated_at", Tue, 24 Dec 2013 11:16:47 UTC +00:00]]
4931
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4932
+ CustomEmails::Email Load (0.1ms) SELECT "custom_emails_emails".* FROM "custom_emails_emails" WHERE "custom_emails_emails"."emailable_id" = ? AND "custom_emails_emails"."emailable_type" = ? [["emailable_id", 1], ["emailable_type", "Example"]]
4933
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (1, 2)
4934
+  (0.1ms) rollback transaction