custom_emails 0.0.1 → 0.0.2

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.
@@ -3165,3 +3165,1305 @@ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by
3165
3165
  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"]]
3166
3166
  CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (1, 2)
3167
3167
   (0.1ms) rollback transaction
3168
+  (0.3ms) begin transaction
3169
+ ----------------------------------------------------------------------------------
3170
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
3171
+ ----------------------------------------------------------------------------------
3172
+  (0.1ms) rollback transaction
3173
+  (0.0ms) begin transaction
3174
+ ----------------------------------------------------------------------------------------------------------
3175
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
3176
+ ----------------------------------------------------------------------------------------------------------
3177
+  (0.0ms) rollback transaction
3178
+  (0.0ms) begin transaction
3179
+ -------------------------------------------------------------------
3180
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
3181
+ -------------------------------------------------------------------
3182
+  (0.0ms) rollback transaction
3183
+  (0.0ms) begin transaction
3184
+ --------------------------------------------------------------------------------------------
3185
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
3186
+ --------------------------------------------------------------------------------------------
3187
+  (0.1ms) rollback transaction
3188
+  (0.0ms) begin transaction
3189
+ ----------------------------
3190
+ CustomEmailsTest: test_truth
3191
+ ----------------------------
3192
+  (0.0ms) rollback transaction
3193
+  (0.0ms) begin transaction
3194
+ ----------------------------------------------------------------------------------
3195
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
3196
+ ----------------------------------------------------------------------------------
3197
+ 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
3198
+  (0.0ms) SAVEPOINT active_record_1
3199
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3200
+ SQL (1.4ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00]]
3201
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3202
+ 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
3203
+ 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
3204
+  (0.0ms) SAVEPOINT active_record_1
3205
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3206
+  (0.1ms) rollback transaction
3207
+  (0.0ms) begin transaction
3208
+ --------------------------------------------------------------------------
3209
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
3210
+ --------------------------------------------------------------------------
3211
+  (0.0ms) SAVEPOINT active_record_1
3212
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3213
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00]]
3214
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3215
+  (0.0ms) SAVEPOINT active_record_1
3216
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3217
+  (0.1ms) rollback transaction
3218
+  (0.0ms) begin transaction
3219
+ -----------------------------------------------------------------------------------
3220
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
3221
+ -----------------------------------------------------------------------------------
3222
+  (0.0ms) rollback transaction
3223
+  (0.0ms) begin transaction
3224
+ -----------------------------------------------------------------------------
3225
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
3226
+ -----------------------------------------------------------------------------
3227
+  (0.0ms) rollback transaction
3228
+  (0.0ms) begin transaction
3229
+ --------------------------------------------------------------------------------------------
3230
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
3231
+ --------------------------------------------------------------------------------------------
3232
+  (0.0ms) SAVEPOINT active_record_1
3233
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3234
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3235
+  (0.0ms) SAVEPOINT active_record_1
3236
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3237
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00]]
3238
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3239
+  (0.0ms) SAVEPOINT active_record_1
3240
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3241
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00]]
3242
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3243
+  (0.1ms) SAVEPOINT active_record_1
3244
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3245
+  (0.1ms) rollback transaction
3246
+  (0.0ms) begin transaction
3247
+ -----------------------------------------------------------
3248
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
3249
+ -----------------------------------------------------------
3250
+  (0.0ms) rollback transaction
3251
+  (0.0ms) begin transaction
3252
+ -------------------------------------------------------------------------------------
3253
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
3254
+ -------------------------------------------------------------------------------------
3255
+  (0.0ms) SAVEPOINT active_record_1
3256
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3257
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3258
+  (0.0ms) SAVEPOINT active_record_1
3259
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3260
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00]]
3261
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3262
+  (0.0ms) SAVEPOINT active_record_1
3263
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3264
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:43:36 UTC +00:00]]
3265
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3266
+  (0.0ms) SAVEPOINT active_record_1
3267
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3268
+  (0.1ms) rollback transaction
3269
+  (0.3ms) begin transaction
3270
+ ----------------------------------------------------------------------------------
3271
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
3272
+ ----------------------------------------------------------------------------------
3273
+  (0.1ms) rollback transaction
3274
+  (0.0ms) begin transaction
3275
+ ----------------------------------------------------------------------------------------------------------
3276
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
3277
+ ----------------------------------------------------------------------------------------------------------
3278
+  (0.0ms) rollback transaction
3279
+  (0.0ms) begin transaction
3280
+ -------------------------------------------------------------------
3281
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
3282
+ -------------------------------------------------------------------
3283
+  (0.0ms) rollback transaction
3284
+  (0.0ms) begin transaction
3285
+ --------------------------------------------------------------------------------------------
3286
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
3287
+ --------------------------------------------------------------------------------------------
3288
+  (0.1ms) rollback transaction
3289
+  (0.0ms) begin transaction
3290
+ ----------------------------
3291
+ CustomEmailsTest: test_truth
3292
+ ----------------------------
3293
+  (0.0ms) rollback transaction
3294
+  (0.0ms) begin transaction
3295
+ ----------------------------------------------------------------------------------
3296
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
3297
+ ----------------------------------------------------------------------------------
3298
+ 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
3299
+  (0.0ms) SAVEPOINT active_record_1
3300
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3301
+ SQL (1.6ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00]]
3302
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3303
+ 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
3304
+ 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
3305
+  (0.0ms) SAVEPOINT active_record_1
3306
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3307
+  (0.1ms) rollback transaction
3308
+  (0.0ms) begin transaction
3309
+ --------------------------------------------------------------------------
3310
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
3311
+ --------------------------------------------------------------------------
3312
+  (0.1ms) SAVEPOINT active_record_1
3313
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3314
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00]]
3315
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3316
+  (0.0ms) SAVEPOINT active_record_1
3317
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3318
+  (0.1ms) rollback transaction
3319
+  (0.0ms) begin transaction
3320
+ -----------------------------------------------------------------------------------
3321
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
3322
+ -----------------------------------------------------------------------------------
3323
+  (0.0ms) rollback transaction
3324
+  (0.0ms) begin transaction
3325
+ -----------------------------------------------------------------------------
3326
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
3327
+ -----------------------------------------------------------------------------
3328
+  (0.0ms) rollback transaction
3329
+  (0.0ms) begin transaction
3330
+ --------------------------------------------------------------------------------------------
3331
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
3332
+ --------------------------------------------------------------------------------------------
3333
+  (0.0ms) SAVEPOINT active_record_1
3334
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3335
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3336
+  (0.0ms) SAVEPOINT active_record_1
3337
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3338
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00]]
3339
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3340
+  (0.0ms) SAVEPOINT active_record_1
3341
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3342
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00]]
3343
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3344
+  (0.1ms) SAVEPOINT active_record_1
3345
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3346
+  (0.1ms) rollback transaction
3347
+  (0.0ms) begin transaction
3348
+ -----------------------------------------------------------
3349
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
3350
+ -----------------------------------------------------------
3351
+  (0.0ms) rollback transaction
3352
+  (0.0ms) begin transaction
3353
+ -------------------------------------------------------------------------------------
3354
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
3355
+ -------------------------------------------------------------------------------------
3356
+  (0.0ms) SAVEPOINT active_record_1
3357
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3358
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3359
+  (0.0ms) SAVEPOINT active_record_1
3360
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3361
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00]]
3362
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3363
+  (0.0ms) SAVEPOINT active_record_1
3364
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3365
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:44:06 UTC +00:00]]
3366
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3367
+  (0.0ms) SAVEPOINT active_record_1
3368
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3369
+  (0.1ms) rollback transaction
3370
+  (0.3ms) begin transaction
3371
+ ----------------------------------------------------------------------------------
3372
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
3373
+ ----------------------------------------------------------------------------------
3374
+  (0.1ms) rollback transaction
3375
+  (0.0ms) begin transaction
3376
+ ----------------------------------------------------------------------------------------------------------
3377
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
3378
+ ----------------------------------------------------------------------------------------------------------
3379
+  (0.0ms) rollback transaction
3380
+  (0.0ms) begin transaction
3381
+ -------------------------------------------------------------------
3382
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
3383
+ -------------------------------------------------------------------
3384
+  (0.0ms) rollback transaction
3385
+  (0.0ms) begin transaction
3386
+ --------------------------------------------------------------------------------------------
3387
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
3388
+ --------------------------------------------------------------------------------------------
3389
+  (0.1ms) rollback transaction
3390
+  (0.0ms) begin transaction
3391
+ ----------------------------
3392
+ CustomEmailsTest: test_truth
3393
+ ----------------------------
3394
+  (0.0ms) rollback transaction
3395
+  (0.0ms) begin transaction
3396
+ ----------------------------------------------------------------------------------
3397
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
3398
+ ----------------------------------------------------------------------------------
3399
+ 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
3400
+  (0.0ms) SAVEPOINT active_record_1
3401
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3402
+ SQL (1.4ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00]]
3403
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3404
+ 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
3405
+ 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
3406
+  (0.0ms) SAVEPOINT active_record_1
3407
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3408
+  (0.1ms) rollback transaction
3409
+  (0.0ms) begin transaction
3410
+ --------------------------------------------------------------------------
3411
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
3412
+ --------------------------------------------------------------------------
3413
+  (0.0ms) SAVEPOINT active_record_1
3414
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3415
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00]]
3416
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3417
+  (0.0ms) SAVEPOINT active_record_1
3418
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3419
+  (0.1ms) rollback transaction
3420
+  (0.0ms) begin transaction
3421
+ -----------------------------------------------------------------------------------
3422
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
3423
+ -----------------------------------------------------------------------------------
3424
+  (0.0ms) rollback transaction
3425
+  (0.0ms) begin transaction
3426
+ -----------------------------------------------------------------------------
3427
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
3428
+ -----------------------------------------------------------------------------
3429
+  (0.0ms) rollback transaction
3430
+  (0.0ms) begin transaction
3431
+ --------------------------------------------------------------------------------------------
3432
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
3433
+ --------------------------------------------------------------------------------------------
3434
+  (0.0ms) SAVEPOINT active_record_1
3435
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3436
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3437
+  (0.0ms) SAVEPOINT active_record_1
3438
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3439
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00]]
3440
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3441
+  (0.0ms) SAVEPOINT active_record_1
3442
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3443
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00]]
3444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3445
+  (0.1ms) SAVEPOINT active_record_1
3446
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3447
+  (0.1ms) rollback transaction
3448
+  (0.0ms) begin transaction
3449
+ -----------------------------------------------------------
3450
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
3451
+ -----------------------------------------------------------
3452
+  (0.0ms) rollback transaction
3453
+  (0.0ms) begin transaction
3454
+ -------------------------------------------------------------------------------------
3455
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
3456
+ -------------------------------------------------------------------------------------
3457
+  (0.0ms) SAVEPOINT active_record_1
3458
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3459
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3460
+  (0.0ms) SAVEPOINT active_record_1
3461
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3462
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00]]
3463
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3464
+  (0.0ms) SAVEPOINT active_record_1
3465
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3466
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:44:48 UTC +00:00]]
3467
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3468
+  (0.0ms) SAVEPOINT active_record_1
3469
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3470
+  (0.1ms) rollback transaction
3471
+  (0.3ms) begin transaction
3472
+ ----------------------------------------------------------------------------------
3473
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
3474
+ ----------------------------------------------------------------------------------
3475
+  (0.1ms) rollback transaction
3476
+  (0.0ms) begin transaction
3477
+ ----------------------------------------------------------------------------------------------------------
3478
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
3479
+ ----------------------------------------------------------------------------------------------------------
3480
+  (0.0ms) rollback transaction
3481
+  (0.0ms) begin transaction
3482
+ -------------------------------------------------------------------
3483
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
3484
+ -------------------------------------------------------------------
3485
+  (0.0ms) rollback transaction
3486
+  (0.0ms) begin transaction
3487
+ --------------------------------------------------------------------------------------------
3488
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
3489
+ --------------------------------------------------------------------------------------------
3490
+  (0.1ms) rollback transaction
3491
+  (0.0ms) begin transaction
3492
+ ----------------------------
3493
+ CustomEmailsTest: test_truth
3494
+ ----------------------------
3495
+  (0.0ms) rollback transaction
3496
+  (0.0ms) begin transaction
3497
+ ----------------------------------------------------------------------------------
3498
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
3499
+ ----------------------------------------------------------------------------------
3500
+ 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
3501
+  (0.0ms) SAVEPOINT active_record_1
3502
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3503
+ SQL (1.6ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00]]
3504
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3505
+ 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
3506
+ 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
3507
+  (0.0ms) SAVEPOINT active_record_1
3508
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3509
+  (0.1ms) rollback transaction
3510
+  (0.0ms) begin transaction
3511
+ --------------------------------------------------------------------------
3512
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
3513
+ --------------------------------------------------------------------------
3514
+  (0.0ms) SAVEPOINT active_record_1
3515
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3516
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00]]
3517
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3518
+  (0.0ms) SAVEPOINT active_record_1
3519
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3520
+  (0.1ms) rollback transaction
3521
+  (0.0ms) begin transaction
3522
+ -----------------------------------------------------------------------------------
3523
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
3524
+ -----------------------------------------------------------------------------------
3525
+  (0.0ms) rollback transaction
3526
+  (0.0ms) begin transaction
3527
+ -----------------------------------------------------------------------------
3528
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
3529
+ -----------------------------------------------------------------------------
3530
+  (0.0ms) rollback transaction
3531
+  (0.0ms) begin transaction
3532
+ --------------------------------------------------------------------------------------------
3533
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
3534
+ --------------------------------------------------------------------------------------------
3535
+  (0.0ms) SAVEPOINT active_record_1
3536
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3537
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3538
+  (0.0ms) SAVEPOINT active_record_1
3539
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3540
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00]]
3541
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3542
+  (0.1ms) SAVEPOINT active_record_1
3543
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3544
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00]]
3545
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3546
+  (0.1ms) SAVEPOINT active_record_1
3547
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3548
+  (0.1ms) rollback transaction
3549
+  (0.0ms) begin transaction
3550
+ -----------------------------------------------------------
3551
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
3552
+ -----------------------------------------------------------
3553
+  (0.0ms) rollback transaction
3554
+  (0.0ms) begin transaction
3555
+ -------------------------------------------------------------------------------------
3556
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
3557
+ -------------------------------------------------------------------------------------
3558
+  (0.0ms) SAVEPOINT active_record_1
3559
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3560
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3561
+  (0.0ms) SAVEPOINT active_record_1
3562
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3563
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00]]
3564
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3565
+  (0.0ms) SAVEPOINT active_record_1
3566
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3567
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:46:29 UTC +00:00]]
3568
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3569
+  (0.0ms) SAVEPOINT active_record_1
3570
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3571
+  (0.1ms) rollback transaction
3572
+  (0.3ms) begin transaction
3573
+ ----------------------------------------------------------------------------------
3574
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
3575
+ ----------------------------------------------------------------------------------
3576
+  (0.1ms) rollback transaction
3577
+  (0.0ms) begin transaction
3578
+ ----------------------------------------------------------------------------------------------------------
3579
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
3580
+ ----------------------------------------------------------------------------------------------------------
3581
+  (0.0ms) rollback transaction
3582
+  (0.0ms) begin transaction
3583
+ -------------------------------------------------------------------
3584
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
3585
+ -------------------------------------------------------------------
3586
+  (0.0ms) rollback transaction
3587
+  (0.0ms) begin transaction
3588
+ --------------------------------------------------------------------------------------------
3589
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
3590
+ --------------------------------------------------------------------------------------------
3591
+  (0.1ms) rollback transaction
3592
+  (0.0ms) begin transaction
3593
+ ----------------------------
3594
+ CustomEmailsTest: test_truth
3595
+ ----------------------------
3596
+  (0.0ms) rollback transaction
3597
+  (0.0ms) begin transaction
3598
+ ----------------------------------------------------------------------------------
3599
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
3600
+ ----------------------------------------------------------------------------------
3601
+ 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
3602
+  (0.0ms) SAVEPOINT active_record_1
3603
+ CustomEmails::EmailKind Exists (0.5ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3604
+ SQL (1.6ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00]]
3605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3606
+ 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
3607
+ 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
3608
+  (0.0ms) SAVEPOINT active_record_1
3609
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3610
+  (0.1ms) rollback transaction
3611
+  (0.0ms) begin transaction
3612
+ --------------------------------------------------------------------------
3613
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
3614
+ --------------------------------------------------------------------------
3615
+  (0.0ms) SAVEPOINT active_record_1
3616
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3617
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00]]
3618
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3619
+  (0.0ms) SAVEPOINT active_record_1
3620
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3621
+  (0.1ms) rollback transaction
3622
+  (0.0ms) begin transaction
3623
+ -----------------------------------------------------------------------------------
3624
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
3625
+ -----------------------------------------------------------------------------------
3626
+  (0.0ms) rollback transaction
3627
+  (0.0ms) begin transaction
3628
+ -----------------------------------------------------------------------------
3629
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
3630
+ -----------------------------------------------------------------------------
3631
+  (0.0ms) rollback transaction
3632
+  (0.0ms) begin transaction
3633
+ --------------------------------------------------------------------------------------------
3634
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
3635
+ --------------------------------------------------------------------------------------------
3636
+  (0.0ms) SAVEPOINT active_record_1
3637
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3638
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3639
+  (0.0ms) SAVEPOINT active_record_1
3640
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3641
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00]]
3642
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3643
+  (0.0ms) SAVEPOINT active_record_1
3644
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3645
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00]]
3646
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3647
+  (0.1ms) SAVEPOINT active_record_1
3648
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3649
+  (0.1ms) rollback transaction
3650
+  (0.0ms) begin transaction
3651
+ -----------------------------------------------------------
3652
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
3653
+ -----------------------------------------------------------
3654
+  (0.0ms) rollback transaction
3655
+  (0.0ms) begin transaction
3656
+ -------------------------------------------------------------------------------------
3657
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
3658
+ -------------------------------------------------------------------------------------
3659
+  (0.0ms) SAVEPOINT active_record_1
3660
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3661
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3662
+  (0.0ms) SAVEPOINT active_record_1
3663
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3664
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00]]
3665
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3666
+  (0.0ms) SAVEPOINT active_record_1
3667
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3668
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:47:58 UTC +00:00]]
3669
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3670
+  (0.0ms) SAVEPOINT active_record_1
3671
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3672
+  (0.1ms) rollback transaction
3673
+  (0.3ms) begin transaction
3674
+ ----------------------------------------------------------------------------------
3675
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
3676
+ ----------------------------------------------------------------------------------
3677
+
3678
+ Sent mail to foo@bar.org (5.6ms)
3679
+ Date: Mon, 21 Oct 2013 17:51:16 +0200
3680
+ From: sender@example.org
3681
+ To: foo@bar.org
3682
+ Message-ID: <52654d74b4cfe_695d6158003375f@chocapic.mail>
3683
+ Subject:
3684
+ Mime-Version: 1.0
3685
+ Content-Type: text/plain;
3686
+ charset=UTF-8
3687
+ Content-Transfer-Encoding: 7bit
3688
+
3689
+
3690
+  (0.1ms) rollback transaction
3691
+  (0.0ms) begin transaction
3692
+ ----------------------------------------------------------------------------------------------------------
3693
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
3694
+ ----------------------------------------------------------------------------------------------------------
3695
+  (0.0ms) rollback transaction
3696
+  (0.0ms) begin transaction
3697
+ -------------------------------------------------------------------
3698
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
3699
+ -------------------------------------------------------------------
3700
+  (0.0ms) rollback transaction
3701
+  (0.0ms) begin transaction
3702
+ --------------------------------------------------------------------------------------------
3703
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
3704
+ --------------------------------------------------------------------------------------------
3705
+  (0.1ms) rollback transaction
3706
+  (0.0ms) begin transaction
3707
+ ----------------------------
3708
+ CustomEmailsTest: test_truth
3709
+ ----------------------------
3710
+  (0.0ms) rollback transaction
3711
+  (0.0ms) begin transaction
3712
+ ----------------------------------------------------------------------------------
3713
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
3714
+ ----------------------------------------------------------------------------------
3715
+ 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
3716
+  (0.0ms) SAVEPOINT active_record_1
3717
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3718
+ SQL (1.4ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00]]
3719
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3720
+ 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
3721
+ 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
3722
+  (0.0ms) SAVEPOINT active_record_1
3723
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3724
+  (0.1ms) rollback transaction
3725
+  (0.0ms) begin transaction
3726
+ --------------------------------------------------------------------------
3727
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
3728
+ --------------------------------------------------------------------------
3729
+  (0.0ms) SAVEPOINT active_record_1
3730
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3731
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00]]
3732
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3733
+  (0.0ms) SAVEPOINT active_record_1
3734
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3735
+  (0.1ms) rollback transaction
3736
+  (0.0ms) begin transaction
3737
+ -----------------------------------------------------------------------------------
3738
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
3739
+ -----------------------------------------------------------------------------------
3740
+  (0.0ms) rollback transaction
3741
+  (0.0ms) begin transaction
3742
+ -----------------------------------------------------------------------------
3743
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
3744
+ -----------------------------------------------------------------------------
3745
+  (0.0ms) rollback transaction
3746
+  (0.0ms) begin transaction
3747
+ --------------------------------------------------------------------------------------------
3748
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
3749
+ --------------------------------------------------------------------------------------------
3750
+  (0.0ms) SAVEPOINT active_record_1
3751
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3752
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3753
+  (0.0ms) SAVEPOINT active_record_1
3754
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3755
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00]]
3756
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3757
+  (0.0ms) SAVEPOINT active_record_1
3758
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3759
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00]]
3760
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3761
+  (0.1ms) SAVEPOINT active_record_1
3762
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3763
+  (0.1ms) rollback transaction
3764
+  (0.0ms) begin transaction
3765
+ -----------------------------------------------------------
3766
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
3767
+ -----------------------------------------------------------
3768
+  (0.0ms) rollback transaction
3769
+  (0.0ms) begin transaction
3770
+ -------------------------------------------------------------------------------------
3771
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
3772
+ -------------------------------------------------------------------------------------
3773
+  (0.0ms) SAVEPOINT active_record_1
3774
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3775
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3776
+  (0.0ms) SAVEPOINT active_record_1
3777
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3778
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00]]
3779
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3780
+  (0.0ms) SAVEPOINT active_record_1
3781
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3782
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:51:16 UTC +00:00]]
3783
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3784
+  (0.0ms) SAVEPOINT active_record_1
3785
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3786
+  (0.1ms) rollback transaction
3787
+  (0.3ms) begin transaction
3788
+ ----------------------------------------------------------------------------------
3789
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
3790
+ ----------------------------------------------------------------------------------
3791
+
3792
+ Sent mail to foo@bar.org (5.8ms)
3793
+ Date: Mon, 21 Oct 2013 17:51:39 +0200
3794
+ From: sender@example.org
3795
+ To: foo@bar.org
3796
+ Message-ID: <52654d8b5696d_6986138580092664@chocapic.mail>
3797
+ Subject:
3798
+ Mime-Version: 1.0
3799
+ Content-Type: text/plain;
3800
+ charset=UTF-8
3801
+ Content-Transfer-Encoding: 7bit
3802
+
3803
+
3804
+  (0.1ms) rollback transaction
3805
+  (0.0ms) begin transaction
3806
+ ----------------------------------------------------------------------------------------------------------
3807
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
3808
+ ----------------------------------------------------------------------------------------------------------
3809
+  (0.0ms) rollback transaction
3810
+  (0.0ms) begin transaction
3811
+ -------------------------------------------------------------------
3812
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
3813
+ -------------------------------------------------------------------
3814
+  (0.0ms) rollback transaction
3815
+  (0.0ms) begin transaction
3816
+ --------------------------------------------------------------------------------------------
3817
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
3818
+ --------------------------------------------------------------------------------------------
3819
+  (0.1ms) rollback transaction
3820
+  (0.0ms) begin transaction
3821
+ ----------------------------
3822
+ CustomEmailsTest: test_truth
3823
+ ----------------------------
3824
+  (0.0ms) rollback transaction
3825
+  (0.0ms) begin transaction
3826
+ ----------------------------------------------------------------------------------
3827
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
3828
+ ----------------------------------------------------------------------------------
3829
+ 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
3830
+  (0.0ms) SAVEPOINT active_record_1
3831
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3832
+ SQL (1.5ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00]]
3833
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3834
+ 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
3835
+ 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
3836
+  (0.0ms) SAVEPOINT active_record_1
3837
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3838
+ 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
3839
+ 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
3840
+  (0.1ms) rollback transaction
3841
+  (0.0ms) begin transaction
3842
+ --------------------------------------------------------------------------
3843
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
3844
+ --------------------------------------------------------------------------
3845
+  (0.0ms) SAVEPOINT active_record_1
3846
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3847
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00]]
3848
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3849
+  (0.0ms) SAVEPOINT active_record_1
3850
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3851
+ 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
3852
+ 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
3853
+  (0.1ms) rollback transaction
3854
+  (0.0ms) begin transaction
3855
+ -----------------------------------------------------------------------------------
3856
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
3857
+ -----------------------------------------------------------------------------------
3858
+  (0.0ms) rollback transaction
3859
+  (0.0ms) begin transaction
3860
+ -----------------------------------------------------------------------------
3861
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
3862
+ -----------------------------------------------------------------------------
3863
+  (0.0ms) rollback transaction
3864
+  (0.0ms) begin transaction
3865
+ --------------------------------------------------------------------------------------------
3866
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
3867
+ --------------------------------------------------------------------------------------------
3868
+  (0.0ms) SAVEPOINT active_record_1
3869
+ SQL (0.2ms) INSERT INTO "examples" DEFAULT VALUES
3870
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3871
+  (0.0ms) SAVEPOINT active_record_1
3872
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3873
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00]]
3874
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3875
+  (0.0ms) SAVEPOINT active_record_1
3876
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3877
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00]]
3878
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3879
+  (0.1ms) SAVEPOINT active_record_1
3880
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3881
+  (0.0ms) SAVEPOINT active_record_1
3882
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3883
+ 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"]]
3884
+  (0.1ms) rollback transaction
3885
+  (0.0ms) begin transaction
3886
+ -----------------------------------------------------------
3887
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
3888
+ -----------------------------------------------------------
3889
+  (0.0ms) rollback transaction
3890
+  (0.0ms) begin transaction
3891
+ -------------------------------------------------------------------------------------
3892
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
3893
+ -------------------------------------------------------------------------------------
3894
+  (0.0ms) SAVEPOINT active_record_1
3895
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
3896
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3897
+  (0.0ms) SAVEPOINT active_record_1
3898
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3899
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00]]
3900
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3901
+  (0.0ms) SAVEPOINT active_record_1
3902
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
3903
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:51:39 UTC +00:00]]
3904
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3905
+  (0.0ms) SAVEPOINT active_record_1
3906
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3907
+  (0.0ms) SAVEPOINT active_record_1
3908
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3909
+ 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"]]
3910
+  (0.1ms) rollback transaction
3911
+  (0.3ms) begin transaction
3912
+ ----------------------------------------------------------------------------------
3913
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
3914
+ ----------------------------------------------------------------------------------
3915
+
3916
+ Sent mail to foo@bar.org (6.7ms)
3917
+ Date: Mon, 21 Oct 2013 17:53:17 +0200
3918
+ From: sender@example.org
3919
+ To: foo@bar.org
3920
+ Message-ID: <52654dedd854_69bc8eb7f09564d@chocapic.mail>
3921
+ Subject:
3922
+ Mime-Version: 1.0
3923
+ Content-Type: text/plain;
3924
+ charset=UTF-8
3925
+ Content-Transfer-Encoding: 7bit
3926
+
3927
+
3928
+  (0.1ms) rollback transaction
3929
+  (0.0ms) begin transaction
3930
+ ----------------------------------------------------------------------------------------------------------
3931
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
3932
+ ----------------------------------------------------------------------------------------------------------
3933
+  (0.0ms) rollback transaction
3934
+  (0.0ms) begin transaction
3935
+ -------------------------------------------------------------------
3936
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
3937
+ -------------------------------------------------------------------
3938
+  (0.0ms) rollback transaction
3939
+  (0.0ms) begin transaction
3940
+ --------------------------------------------------------------------------------------------
3941
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
3942
+ --------------------------------------------------------------------------------------------
3943
+  (0.1ms) rollback transaction
3944
+  (0.0ms) begin transaction
3945
+ ----------------------------
3946
+ CustomEmailsTest: test_truth
3947
+ ----------------------------
3948
+  (0.0ms) rollback transaction
3949
+  (0.0ms) begin transaction
3950
+ ----------------------------------------------------------------------------------
3951
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
3952
+ ----------------------------------------------------------------------------------
3953
+ 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
3954
+  (0.0ms) SAVEPOINT active_record_1
3955
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3956
+ SQL (1.3ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:17 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:53:17 UTC +00:00]]
3957
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3958
+ 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
3959
+ 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
3960
+  (0.1ms) SAVEPOINT active_record_1
3961
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3962
+ 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
3963
+ 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
3964
+  (0.1ms) rollback transaction
3965
+  (0.0ms) begin transaction
3966
+ --------------------------------------------------------------------------
3967
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
3968
+ --------------------------------------------------------------------------
3969
+  (0.0ms) SAVEPOINT active_record_1
3970
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3971
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:17 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:53:17 UTC +00:00]]
3972
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3973
+  (0.0ms) SAVEPOINT active_record_1
3974
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
3975
+ CustomEmails::EmailKind Load (0.2ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3976
+ CustomEmails::Email Load (0.2ms) 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
3977
+  (0.2ms) rollback transaction
3978
+  (0.1ms) begin transaction
3979
+ -----------------------------------------------------------------------------------
3980
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
3981
+ -----------------------------------------------------------------------------------
3982
+  (0.1ms) rollback transaction
3983
+  (0.1ms) begin transaction
3984
+ -----------------------------------------------------------------------------
3985
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
3986
+ -----------------------------------------------------------------------------
3987
+  (0.1ms) rollback transaction
3988
+  (0.1ms) begin transaction
3989
+ --------------------------------------------------------------------------------------------
3990
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
3991
+ --------------------------------------------------------------------------------------------
3992
+  (0.1ms) SAVEPOINT active_record_1
3993
+ SQL (0.3ms) INSERT INTO "examples" DEFAULT VALUES
3994
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3995
+  (0.1ms) SAVEPOINT active_record_1
3996
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
3997
+ SQL (0.3ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:43 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:53:43 UTC +00:00]]
3998
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3999
+  (0.0ms) SAVEPOINT active_record_1
4000
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4001
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:43 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:53:43 UTC +00:00]]
4002
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4003
+  (0.1ms) SAVEPOINT active_record_1
4004
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4005
+  (0.0ms) SAVEPOINT active_record_1
4006
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4007
+ 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"]]
4008
+  (0.1ms) rollback transaction
4009
+  (0.0ms) begin transaction
4010
+ -----------------------------------------------------------
4011
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
4012
+ -----------------------------------------------------------
4013
+  (0.0ms) rollback transaction
4014
+  (0.0ms) begin transaction
4015
+ -------------------------------------------------------------------------------------
4016
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
4017
+ -------------------------------------------------------------------------------------
4018
+  (0.0ms) SAVEPOINT active_record_1
4019
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4020
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4021
+  (0.1ms) SAVEPOINT active_record_1
4022
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4023
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:43 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:53:43 UTC +00:00]]
4024
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4025
+  (0.0ms) SAVEPOINT active_record_1
4026
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4027
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:43 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:53:43 UTC +00:00]]
4028
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4029
+  (0.0ms) SAVEPOINT active_record_1
4030
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4031
+  (0.0ms) SAVEPOINT active_record_1
4032
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4033
+ 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"]]
4034
+  (0.1ms) rollback transaction
4035
+  (0.3ms) begin transaction
4036
+ ----------------------------------------------------------------------------------
4037
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
4038
+ ----------------------------------------------------------------------------------
4039
+
4040
+ Sent mail to foo@bar.org (5.9ms)
4041
+ Date: Mon, 21 Oct 2013 17:53:47 +0200
4042
+ From: sender@example.org
4043
+ To: foo@bar.org
4044
+ Message-ID: <52654e0b5e753_69f68bbff0309d@chocapic.mail>
4045
+ Subject:
4046
+ Mime-Version: 1.0
4047
+ Content-Type: text/plain;
4048
+ charset=UTF-8
4049
+ Content-Transfer-Encoding: 7bit
4050
+
4051
+
4052
+  (0.1ms) rollback transaction
4053
+  (0.0ms) begin transaction
4054
+ ----------------------------------------------------------------------------------------------------------
4055
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
4056
+ ----------------------------------------------------------------------------------------------------------
4057
+  (0.0ms) rollback transaction
4058
+  (0.0ms) begin transaction
4059
+ -------------------------------------------------------------------
4060
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
4061
+ -------------------------------------------------------------------
4062
+  (0.0ms) rollback transaction
4063
+  (0.0ms) begin transaction
4064
+ --------------------------------------------------------------------------------------------
4065
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
4066
+ --------------------------------------------------------------------------------------------
4067
+  (0.1ms) rollback transaction
4068
+  (0.0ms) begin transaction
4069
+ ----------------------------
4070
+ CustomEmailsTest: test_truth
4071
+ ----------------------------
4072
+  (0.0ms) rollback transaction
4073
+  (0.0ms) begin transaction
4074
+ ----------------------------------------------------------------------------------
4075
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
4076
+ ----------------------------------------------------------------------------------
4077
+ 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
4078
+  (0.0ms) SAVEPOINT active_record_1
4079
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4080
+ SQL (1.3ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:47 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:53:47 UTC +00:00]]
4081
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4082
+ 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
4083
+ 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
4084
+  (0.0ms) SAVEPOINT active_record_1
4085
+ 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", Mon, 21 Oct 2013 15:53:47 UTC +00:00], ["kind_id", 1], ["locale", :fr], ["subject", "Hello world!"], ["updated_at", Mon, 21 Oct 2013 15:53:47 UTC +00:00]]
4086
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4087
+ 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
4088
+ 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
4089
+  (0.1ms) rollback transaction
4090
+  (0.0ms) begin transaction
4091
+ --------------------------------------------------------------------------
4092
+ MailerTest: test_email_content_text_is_used_when_custom_email_to_is_called
4093
+ --------------------------------------------------------------------------
4094
+  (0.0ms) SAVEPOINT active_record_1
4095
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4096
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:47 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:53:47 UTC +00:00]]
4097
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4098
+  (0.0ms) SAVEPOINT active_record_1
4099
+ SQL (0.1ms) INSERT INTO "custom_emails_emails" ("content_text", "created_at", "kind_id", "locale", "subject", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_text", "Good luck..."], ["created_at", Mon, 21 Oct 2013 15:53:47 UTC +00:00], ["kind_id", 1], ["locale", :en], ["subject", "Hello world!"], ["updated_at", Mon, 21 Oct 2013 15:53:47 UTC +00:00]]
4100
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4101
+ CustomEmails::EmailKind Load (0.2ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4102
+ CustomEmails::Email Load (0.2ms) 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
4103
+
4104
+ Sent mail to test@example.com (7.3ms)
4105
+ Date: Mon, 21 Oct 2013 17:53:55 +0200
4106
+ From: sender@example.org
4107
+ To: test@example.com
4108
+ Message-ID: <52654e13298ed_69f68bbff03162@chocapic.mail>
4109
+ Subject: Hello world!
4110
+ Mime-Version: 1.0
4111
+ Content-Type: text/plain;
4112
+ charset=UTF-8
4113
+ Content-Transfer-Encoding: 7bit
4114
+
4115
+ Good luck...
4116
+  (0.2ms) rollback transaction
4117
+  (0.0ms) begin transaction
4118
+ -----------------------------------------------------------------------------------
4119
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
4120
+ -----------------------------------------------------------------------------------
4121
+  (0.0ms) rollback transaction
4122
+  (0.0ms) begin transaction
4123
+ -----------------------------------------------------------------------------
4124
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
4125
+ -----------------------------------------------------------------------------
4126
+  (0.0ms) rollback transaction
4127
+  (0.0ms) begin transaction
4128
+ --------------------------------------------------------------------------------------------
4129
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
4130
+ --------------------------------------------------------------------------------------------
4131
+  (0.0ms) SAVEPOINT active_record_1
4132
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4133
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4134
+  (0.0ms) SAVEPOINT active_record_1
4135
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4136
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00]]
4137
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4138
+  (0.0ms) SAVEPOINT active_record_1
4139
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4140
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00]]
4141
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4142
+  (0.1ms) SAVEPOINT active_record_1
4143
+ 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", Mon, 21 Oct 2013 15:53:55 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00]]
4144
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4145
+  (0.0ms) SAVEPOINT active_record_1
4146
+ 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", Mon, 21 Oct 2013 15:53:55 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :fr], ["subject", "Faux subjet 2"], ["updated_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00]]
4147
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4148
+ 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"]]
4149
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (2)
4150
+  (0.1ms) rollback transaction
4151
+  (0.0ms) begin transaction
4152
+ -----------------------------------------------------------
4153
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
4154
+ -----------------------------------------------------------
4155
+  (0.0ms) rollback transaction
4156
+  (0.0ms) begin transaction
4157
+ -------------------------------------------------------------------------------------
4158
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
4159
+ -------------------------------------------------------------------------------------
4160
+  (0.0ms) SAVEPOINT active_record_1
4161
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4162
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4163
+  (0.0ms) SAVEPOINT active_record_1
4164
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4165
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00]]
4166
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4167
+  (0.0ms) SAVEPOINT active_record_1
4168
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4169
+ SQL (15.9ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00]]
4170
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4171
+  (0.0ms) SAVEPOINT active_record_1
4172
+ 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", Mon, 21 Oct 2013 15:53:55 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00]]
4173
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4174
+  (0.0ms) SAVEPOINT active_record_1
4175
+ 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", Mon, 21 Oct 2013 15:53:55 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :en], ["subject", "Fake subject 2"], ["updated_at", Mon, 21 Oct 2013 15:53:55 UTC +00:00]]
4176
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4177
+ 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"]]
4178
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (1, 2)
4179
+  (0.1ms) rollback transaction
4180
+  (0.6ms) begin transaction
4181
+ ----------------------------------------------------------------------------------
4182
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
4183
+ ----------------------------------------------------------------------------------
4184
+
4185
+ Sent mail to foo@bar.org (5.6ms)
4186
+ Date: Mon, 21 Oct 2013 17:56:15 +0200
4187
+ From: sender@example.org
4188
+ To: foo@bar.org
4189
+ Message-ID: <52654e9f5653e_6a36f517fc4339a@chocapic.mail>
4190
+ Subject:
4191
+ Mime-Version: 1.0
4192
+ Content-Type: text/plain;
4193
+ charset=UTF-8
4194
+ Content-Transfer-Encoding: 7bit
4195
+
4196
+
4197
+  (0.1ms) rollback transaction
4198
+  (0.0ms) begin transaction
4199
+ ----------------------------------------------------------------------------------------------------------
4200
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
4201
+ ----------------------------------------------------------------------------------------------------------
4202
+  (0.0ms) rollback transaction
4203
+  (0.0ms) begin transaction
4204
+ -------------------------------------------------------------------
4205
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
4206
+ -------------------------------------------------------------------
4207
+  (0.0ms) rollback transaction
4208
+  (0.0ms) begin transaction
4209
+ --------------------------------------------------------------------------------------------
4210
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
4211
+ --------------------------------------------------------------------------------------------
4212
+  (0.1ms) rollback transaction
4213
+  (0.0ms) begin transaction
4214
+ ----------------------------
4215
+ CustomEmailsTest: test_truth
4216
+ ----------------------------
4217
+  (0.0ms) rollback transaction
4218
+  (0.0ms) begin transaction
4219
+ ----------------------------------------------------------------------------------
4220
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
4221
+ ----------------------------------------------------------------------------------
4222
+ 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
4223
+  (0.0ms) SAVEPOINT active_record_1
4224
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4225
+ SQL (1.4ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4226
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4227
+ 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
4228
+ 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
4229
+  (0.0ms) SAVEPOINT active_record_1
4230
+ 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", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["kind_id", 1], ["locale", :fr], ["subject", "Hello world!"], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4231
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4232
+ 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
4233
+ 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
4234
+  (0.1ms) rollback transaction
4235
+  (0.0ms) begin transaction
4236
+ ---------------------------------------------------------------------------------------
4237
+ MailerTest: test_email_interpolated_content_text_is_used_when_custom_email_to_is_called
4238
+ ---------------------------------------------------------------------------------------
4239
+  (0.0ms) SAVEPOINT active_record_1
4240
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4241
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4242
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4243
+  (0.0ms) SAVEPOINT active_record_1
4244
+ 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", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["kind_id", 1], ["locale", :en], ["subject", "Hello world!"], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4245
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4246
+ 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
4247
+ 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
4248
+
4249
+ Sent mail to test@example.com (3.4ms)
4250
+ Date: Mon, 21 Oct 2013 17:56:15 +0200
4251
+ From: sender@example.org
4252
+ To: test@example.com
4253
+ Message-ID: <52654e9f69802_6a36f517fc43498@chocapic.mail>
4254
+ Subject: Hello world!
4255
+ Mime-Version: 1.0
4256
+ Content-Type: text/plain;
4257
+ charset=UTF-8
4258
+ Content-Transfer-Encoding: 7bit
4259
+
4260
+ Good luck Luc...
4261
+  (0.1ms) rollback transaction
4262
+  (0.0ms) begin transaction
4263
+ -----------------------------------------------------------------------------------
4264
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
4265
+ -----------------------------------------------------------------------------------
4266
+  (0.0ms) rollback transaction
4267
+  (0.0ms) begin transaction
4268
+ -----------------------------------------------------------------------------
4269
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
4270
+ -----------------------------------------------------------------------------
4271
+  (0.0ms) rollback transaction
4272
+  (0.0ms) begin transaction
4273
+ --------------------------------------------------------------------------------------------
4274
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
4275
+ --------------------------------------------------------------------------------------------
4276
+  (0.0ms) SAVEPOINT active_record_1
4277
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4278
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4279
+  (0.0ms) SAVEPOINT active_record_1
4280
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4281
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4282
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4283
+  (0.0ms) SAVEPOINT active_record_1
4284
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4285
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4286
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4287
+  (0.1ms) SAVEPOINT active_record_1
4288
+ 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", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4289
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4290
+  (0.0ms) SAVEPOINT active_record_1
4291
+ 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", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :fr], ["subject", "Faux subjet 2"], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4292
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4293
+ 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"]]
4294
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (2)
4295
+  (0.1ms) rollback transaction
4296
+  (0.1ms) begin transaction
4297
+ -----------------------------------------------------------
4298
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
4299
+ -----------------------------------------------------------
4300
+  (0.1ms) rollback transaction
4301
+  (0.0ms) begin transaction
4302
+ -------------------------------------------------------------------------------------
4303
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
4304
+ -------------------------------------------------------------------------------------
4305
+  (0.0ms) SAVEPOINT active_record_1
4306
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4307
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4308
+  (0.0ms) SAVEPOINT active_record_1
4309
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4310
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4311
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4312
+  (0.0ms) SAVEPOINT active_record_1
4313
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4314
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4315
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4316
+  (0.0ms) SAVEPOINT active_record_1
4317
+ 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", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4318
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4319
+  (0.0ms) SAVEPOINT active_record_1
4320
+ 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", Mon, 21 Oct 2013 15:56:15 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :en], ["subject", "Fake subject 2"], ["updated_at", Mon, 21 Oct 2013 15:56:15 UTC +00:00]]
4321
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4322
+ 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"]]
4323
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (1, 2)
4324
+  (0.1ms) rollback transaction
4325
+  (0.3ms) begin transaction
4326
+ ----------------------------------------------------------------------------------
4327
+ CustomEmails::EmailTest: test_email_has_a_#to_method_that_produces_a_Mail::Message
4328
+ ----------------------------------------------------------------------------------
4329
+
4330
+ Sent mail to foo@bar.org (5.9ms)
4331
+ Date: Mon, 21 Oct 2013 17:56:59 +0200
4332
+ From: sender@example.org
4333
+ To: foo@bar.org
4334
+ Message-ID: <52654ecb24391_6a65c35000800c5@chocapic.mail>
4335
+ Subject:
4336
+ Mime-Version: 1.0
4337
+ Content-Type: text/plain;
4338
+ charset=UTF-8
4339
+ Content-Transfer-Encoding: 7bit
4340
+
4341
+
4342
+  (0.1ms) rollback transaction
4343
+  (0.0ms) begin transaction
4344
+ ----------------------------------------------------------------------------------------------------------
4345
+ CustomEmails::EmailTest: test_email_has_interpolation_via_liquid_on_subject,_content_text_and_content_html
4346
+ ----------------------------------------------------------------------------------------------------------
4347
+  (0.0ms) rollback transaction
4348
+  (0.0ms) begin transaction
4349
+ -------------------------------------------------------------------
4350
+ CustomEmails::EmailTest: test_email_is_scoped_to_an_emailable_model
4351
+ -------------------------------------------------------------------
4352
+  (0.0ms) rollback transaction
4353
+  (0.0ms) begin transaction
4354
+ --------------------------------------------------------------------------------------------
4355
+ CustomEmails::EmailTest: test_email_needs_kind,_locale,_subject_and_content_text_to_be_valid
4356
+ --------------------------------------------------------------------------------------------
4357
+  (0.1ms) rollback transaction
4358
+  (0.0ms) begin transaction
4359
+ ----------------------------
4360
+ CustomEmailsTest: test_truth
4361
+ ----------------------------
4362
+  (0.0ms) rollback transaction
4363
+  (0.0ms) begin transaction
4364
+ ----------------------------------------------------------------------------------
4365
+ MailerTest: test_custom_email_to_raises_an_exception_if_there_is_no_matching_email
4366
+ ----------------------------------------------------------------------------------
4367
+ 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
4368
+  (0.0ms) SAVEPOINT active_record_1
4369
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4370
+ SQL (1.4ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4371
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4372
+ 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
4373
+ 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
4374
+  (0.0ms) SAVEPOINT active_record_1
4375
+ 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", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["kind_id", 1], ["locale", :fr], ["subject", "Hello world!"], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4376
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4377
+ 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
4378
+ 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
4379
+  (0.1ms) rollback transaction
4380
+  (0.0ms) begin transaction
4381
+ --------------------------------------------------------------------------------------
4382
+ MailerTest: test_email_interpolated_attributes_are_used_when_custom_email_to_is_called
4383
+ --------------------------------------------------------------------------------------
4384
+  (0.0ms) SAVEPOINT active_record_1
4385
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4386
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4387
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4388
+  (0.0ms) SAVEPOINT active_record_1
4389
+ 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", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["kind_id", 1], ["locale", :en], ["subject", "Hello {{ name }}!"], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4390
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4391
+ 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
4392
+ 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
4393
+
4394
+ Sent mail to test@example.com (3.5ms)
4395
+ Date: Mon, 21 Oct 2013 17:56:59 +0200
4396
+ From: sender@example.org
4397
+ To: test@example.com
4398
+ Message-ID: <52654ecb3797d_6a65c350008012@chocapic.mail>
4399
+ Subject: Hello Luc!
4400
+ Mime-Version: 1.0
4401
+ Content-Type: text/plain;
4402
+ charset=UTF-8
4403
+ Content-Transfer-Encoding: 7bit
4404
+
4405
+ Good luck Luc...
4406
+  (0.1ms) rollback transaction
4407
+  (0.0ms) begin transaction
4408
+ -----------------------------------------------------------------------------------
4409
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_#emails_by_kind_method
4410
+ -----------------------------------------------------------------------------------
4411
+  (0.0ms) rollback transaction
4412
+  (0.0ms) begin transaction
4413
+ -----------------------------------------------------------------------------
4414
+ ModelsTest: test_models_using_has_custom_emails_ends_with_an_:emails_relation
4415
+ -----------------------------------------------------------------------------
4416
+  (0.0ms) rollback transaction
4417
+  (0.0ms) begin transaction
4418
+ --------------------------------------------------------------------------------------------
4419
+ ModelsTest: test_the_#emails_by_kind_method_accepts_an_optional_argument_to_filter_by_locale
4420
+ --------------------------------------------------------------------------------------------
4421
+  (0.0ms) SAVEPOINT active_record_1
4422
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4423
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4424
+  (0.0ms) SAVEPOINT active_record_1
4425
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4426
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4427
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4428
+  (0.0ms) SAVEPOINT active_record_1
4429
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4430
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4431
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4432
+  (0.1ms) SAVEPOINT active_record_1
4433
+ 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", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4434
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4435
+  (0.0ms) SAVEPOINT active_record_1
4436
+ 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", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :fr], ["subject", "Faux subjet 2"], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4437
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4438
+ 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"]]
4439
+ CustomEmails::EmailKind Load (0.1ms) SELECT "custom_emails_email_kinds".* FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."id" IN (2)
4440
+  (0.1ms) rollback transaction
4441
+  (0.0ms) begin transaction
4442
+ -----------------------------------------------------------
4443
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash
4444
+ -----------------------------------------------------------
4445
+  (0.1ms) rollback transaction
4446
+  (0.0ms) begin transaction
4447
+ -------------------------------------------------------------------------------------
4448
+ ModelsTest: test_the_#emails_by_kind_method_returns_an_Hash_of_emails_grouped_by_kind
4449
+ -------------------------------------------------------------------------------------
4450
+  (0.0ms) SAVEPOINT active_record_1
4451
+ SQL (0.1ms) INSERT INTO "examples" DEFAULT VALUES
4452
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4453
+  (0.0ms) SAVEPOINT active_record_1
4454
+ CustomEmails::EmailKind Exists (0.1ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_1' LIMIT 1
4455
+ SQL (0.2ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["name", :kind_1], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4456
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4457
+  (0.0ms) SAVEPOINT active_record_1
4458
+ CustomEmails::EmailKind Exists (0.0ms) SELECT 1 AS one FROM "custom_emails_email_kinds" WHERE "custom_emails_email_kinds"."name" = 'kind_2' LIMIT 1
4459
+ SQL (0.1ms) INSERT INTO "custom_emails_email_kinds" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["name", :kind_2], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4460
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4461
+  (0.0ms) SAVEPOINT active_record_1
4462
+ 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", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 1], ["locale", :en], ["subject", "Fake subject"], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4463
+  (0.0ms) RELEASE SAVEPOINT active_record_1
4464
+  (0.0ms) SAVEPOINT active_record_1
4465
+ 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", Mon, 21 Oct 2013 15:56:59 UTC +00:00], ["emailable_id", 1], ["emailable_type", "Example"], ["kind_id", 2], ["locale", :en], ["subject", "Fake subject 2"], ["updated_at", Mon, 21 Oct 2013 15:56:59 UTC +00:00]]
4466
+  (0.0ms) RELEASE SAVEPOINT active_record_1
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
+ 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
+  (0.1ms) rollback transaction