clark_kent 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -50387,3 +50387,2616 @@ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing
50387
50387
   (0.0ms) SAVEPOINT active_record_1
50388
50388
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
50389
50389
   (0.0ms) rollback transaction
50390
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
50391
+  (1.2ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
50392
+  (0.5ms) select sqlite_version(*)
50393
+  (0.9ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
50394
+  (0.9ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
50395
+  (0.9ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
50396
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
50397
+  (0.1ms)  SELECT sql
50398
+ FROM sqlite_master
50399
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
50400
+ UNION ALL
50401
+ SELECT sql
50402
+ FROM sqlite_temp_master
50403
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
50404
+ 
50405
+  (1.0ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
50406
+  (1.1ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
50407
+  (1.0ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
50408
+  (0.1ms)  SELECT sql
50409
+ FROM sqlite_master
50410
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
50411
+ UNION ALL
50412
+ SELECT sql
50413
+ FROM sqlite_temp_master
50414
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
50415
+ 
50416
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
50417
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
50418
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
50419
+  (1.0ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
50420
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
50421
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
50422
+  (0.5ms) SELECT version FROM "schema_migrations"
50423
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
50424
+  (0.9ms) INSERT INTO schema_migrations (version) VALUES
50425
+ ('20131226170042'),
50426
+ ('20131226170112'),
50427
+ ('20140114010048'),
50428
+ ('20140129051754'),
50429
+ ('20150304233739');
50430
+
50431
+ 
50432
+  (1.4ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
50433
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
50434
+  (0.2ms) begin transaction
50435
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-21 17:08:09 UTC], ["updated_at", 2017-02-21 17:08:09 UTC]]
50436
+  (0.6ms) commit transaction
50437
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
50438
+  (0.0ms) begin transaction
50439
+  (0.0ms) commit transaction
50440
+  (0.1ms) begin transaction
50441
+ SQL (1.2ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-21 17:08:09 UTC], ["updated_at", 2017-02-21 17:08:09 UTC]]
50442
+  (1.4ms) commit transaction
50443
+  (0.1ms) begin transaction
50444
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50445
+  (0.1ms) commit transaction
50446
+  (0.0ms) begin transaction
50447
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50448
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
50449
+  (1.0ms) commit transaction
50450
+  (0.1ms) begin transaction
50451
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50452
+ SQL (0.6ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
50453
+  (0.9ms) commit transaction
50454
+  (0.0ms) begin transaction
50455
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50456
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
50457
+  (1.1ms) commit transaction
50458
+  (0.1ms) begin transaction
50459
+ SQL (1.1ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
50460
+  (0.9ms) commit transaction
50461
+  (0.1ms) begin transaction
50462
+ SQL (0.4ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
50463
+  (0.8ms) commit transaction
50464
+  (0.1ms) begin transaction
50465
+ SQL (0.4ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-21 17:08:09 UTC], ["updated_at", 2017-02-21 17:08:09 UTC]]
50466
+  (0.8ms) commit transaction
50467
+  (0.1ms) begin transaction
50468
+ --------------------------------------------------------------------------
50469
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
50470
+ --------------------------------------------------------------------------
50471
+  (0.0ms) SAVEPOINT active_record_1
50472
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-21 17:08:09 UTC], ["updated_at", 2017-02-21 17:08:09 UTC]]
50473
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50474
+  (0.1ms) SAVEPOINT active_record_1
50475
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
50476
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50477
+ ClarkKent::ReportColumn Load (0.3ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
50478
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
50479
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
50480
+  (0.9ms) rollback transaction
50481
+  (0.1ms) begin transaction
50482
+ ------------------------------------------------------------------------
50483
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
50484
+ ------------------------------------------------------------------------
50485
+  (0.0ms) SAVEPOINT active_record_1
50486
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-02-21 17:08:09 UTC], ["updated_at", 2017-02-21 17:08:09 UTC]]
50487
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50488
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
50489
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
50490
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
50491
+  (0.4ms) rollback transaction
50492
+  (0.1ms) begin transaction
50493
+ --------------------------------------------------------------------------
50494
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
50495
+ --------------------------------------------------------------------------
50496
+  (0.1ms) SAVEPOINT active_record_1
50497
+ SQL (0.5ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-21 17:08:09 UTC], ["updated_at", 2017-02-21 17:08:09 UTC]]
50498
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50499
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
50500
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
50501
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
50502
+  (0.4ms) rollback transaction
50503
+  (0.1ms) begin transaction
50504
+ ------------------------------------------------------------------------------------------------
50505
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
50506
+ ------------------------------------------------------------------------------------------------
50507
+  (0.0ms) SAVEPOINT active_record_1
50508
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
50509
+  (0.1ms) rollback transaction
50510
+  (0.0ms) begin transaction
50511
+ --------------------------------------------------------------------------------
50512
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
50513
+ --------------------------------------------------------------------------------
50514
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50515
+  (0.1ms) SAVEPOINT active_record_1
50516
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50517
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50518
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50519
+ Processing by ClarkKent::ReportsController#create as HTML
50520
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
50521
+  (0.1ms) SAVEPOINT active_record_1
50522
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
50523
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
50524
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
50525
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50526
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (49.9ms)
50527
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (58.0ms)
50528
+ Completed 409 Conflict in 247ms (Views: 244.3ms | ActiveRecord: 0.4ms)
50529
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
50530
+  (0.5ms) rollback transaction
50531
+  (0.1ms) begin transaction
50532
+ ------------------------------------------------------------
50533
+ ClarkKent::ReportsControllerTest: test_0001_should get index
50534
+ ------------------------------------------------------------
50535
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50536
+  (0.0ms) SAVEPOINT active_record_1
50537
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50538
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50539
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50540
+ Processing by ClarkKent::ReportsController#index as HTML
50541
+ Parameters: {"current_user_id"=>"1"}
50542
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
50543
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
50544
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "User"], ["LIMIT", 1]]
50545
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50546
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["LIMIT", 1]]
50547
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
50548
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
50549
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (15.4ms)
50550
+ Completed 200 OK in 20ms (Views: 16.9ms | ActiveRecord: 0.5ms)
50551
+  (0.5ms) rollback transaction
50552
+  (0.1ms) begin transaction
50553
+ -------------------------------------------------------------------------
50554
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
50555
+ -------------------------------------------------------------------------
50556
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50557
+  (0.0ms) SAVEPOINT active_record_1
50558
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50559
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50560
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50561
+ Processing by ClarkKent::ReportsController#show as HTML
50562
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
50563
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
50564
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
50565
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50566
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
50567
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
50568
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.1ms)
50569
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50570
+ User Load (0.2ms) SELECT "users".* FROM "users"
50571
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.5ms)
50572
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.9ms)
50573
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.7ms)
50574
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (22.0ms)
50575
+ Completed 200 OK in 39ms (Views: 24.2ms | ActiveRecord: 1.0ms)
50576
+  (0.5ms) rollback transaction
50577
+  (0.1ms) begin transaction
50578
+ ----------------------------------------------------------
50579
+ ClarkKent::ReportsControllerTest: test_0002_should get new
50580
+ ----------------------------------------------------------
50581
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50582
+  (0.1ms) SAVEPOINT active_record_1
50583
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50584
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50585
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50586
+ Processing by ClarkKent::ReportsController#new as HTML
50587
+ Parameters: {"current_user_id"=>"1"}
50588
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
50589
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
50590
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50591
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (6.5ms)
50592
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (7.0ms)
50593
+ Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.1ms)
50594
+  (0.7ms) rollback transaction
50595
+  (0.1ms) begin transaction
50596
+ -----------------------------------------------------------
50597
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
50598
+ -----------------------------------------------------------
50599
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50600
+  (0.1ms) SAVEPOINT active_record_1
50601
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50602
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50603
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50604
+ Processing by ClarkKent::ReportsController#edit as HTML
50605
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
50606
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50607
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
50608
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.8ms)
50609
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50610
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (4.4ms)
50611
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
50612
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
50613
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (5.0ms)
50614
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
50615
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
50616
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
50617
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
50618
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (11.7ms)
50619
+ ClarkKent::ReportEmail Load (0.2ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
50620
+ ClarkKent::ReportDateFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
50621
+ User Load (0.3ms) SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
50622
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (27.1ms)
50623
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (31.1ms)
50624
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (37.6ms)
50625
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (71.8ms)
50626
+ Completed 200 OK in 78ms (Views: 73.0ms | ActiveRecord: 0.9ms)
50627
+  (0.5ms) rollback transaction
50628
+  (0.1ms) begin transaction
50629
+ ----------------------------------------------------------------------
50630
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
50631
+ ----------------------------------------------------------------------
50632
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50633
+  (0.0ms) SAVEPOINT active_record_1
50634
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50635
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50636
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50637
+ Processing by ClarkKent::ReportsController#show as HTML
50638
+ Parameters: {"created_at_from"=>"2017-02-20", "created_at_until"=>"2017-02-21", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
50639
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
50640
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
50641
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50642
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
50643
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
50644
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
50645
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50646
+ User Load (0.0ms) SELECT "users".* FROM "users"
50647
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.2ms)
50648
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
50649
+  (0.2ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
50650
+  (0.2ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ?) subquery_for_count [["LIMIT", 10], ["OFFSET", 0]]
50651
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.6ms)
50652
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
50653
+ Order Load (0.1ms) SELECT "orders".* FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
50654
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50655
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50656
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50657
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.2ms)
50658
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (30.0ms)
50659
+ Completed 200 OK in 41ms (Views: 31.5ms | ActiveRecord: 1.5ms)
50660
+  (0.5ms) rollback transaction
50661
+  (0.1ms) begin transaction
50662
+ ----------------------------------------------------------------
50663
+ ClarkKent::ReportsControllerTest: test_0003_should create report
50664
+ ----------------------------------------------------------------
50665
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50666
+  (0.1ms) SAVEPOINT active_record_1
50667
+ SQL (0.7ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50668
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50669
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50670
+ Processing by ClarkKent::ReportsController#create as HTML
50671
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
50672
+  (0.1ms) SAVEPOINT active_record_1
50673
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-02-21 17:08:10 UTC], ["updated_at", 2017-02-21 17:08:10 UTC]]
50674
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50675
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
50676
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.0ms)
50677
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
50678
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.4ms)
50679
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
50680
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.8ms)
50681
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
50682
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.3ms)
50683
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (8.5ms)
50684
+ Completed 200 OK in 14ms (Views: 10.3ms | ActiveRecord: 0.6ms)
50685
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
50686
+  (0.0ms) SAVEPOINT active_record_1
50687
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
50688
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
50689
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
50690
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
50691
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50692
+  (0.5ms) rollback transaction
50693
+  (0.1ms) begin transaction
50694
+ -----------------------------------------------------------------
50695
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
50696
+ -----------------------------------------------------------------
50697
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50698
+  (0.1ms) SAVEPOINT active_record_1
50699
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50700
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50701
+  (0.0ms) SAVEPOINT active_record_1
50702
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-02-21 17:08:10 UTC], ["updated_at", 2017-02-21 17:08:10 UTC]]
50703
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50704
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
50705
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50706
+ Processing by ClarkKent::ReportsController#destroy as HTML
50707
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
50708
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
50709
+  (0.1ms) SAVEPOINT active_record_1
50710
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
50711
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
50712
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
50713
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
50714
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50715
+ Redirected to http://test.host/reports/reports
50716
+ Completed 302 Found in 6ms (ActiveRecord: 0.5ms)
50717
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
50718
+  (1.0ms) rollback transaction
50719
+  (0.1ms) begin transaction
50720
+ --------------------------------------------------------------
50721
+ ClarkKent::ReportsControllerTest: test_0005_should show report
50722
+ --------------------------------------------------------------
50723
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50724
+  (0.0ms) SAVEPOINT active_record_1
50725
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50726
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50727
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50728
+ Processing by ClarkKent::ReportsController#show as HTML
50729
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
50730
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
50731
+ ClarkKent::ReportColumn Load (0.3ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
50732
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
50733
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50734
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50735
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50736
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.4ms)
50737
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50738
+ User Load (0.0ms) SELECT "users".* FROM "users"
50739
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.7ms)
50740
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.3ms)
50741
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
50742
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (8.8ms)
50743
+ Completed 200 OK in 40ms (Views: 11.8ms | ActiveRecord: 0.7ms)
50744
+  (0.5ms) rollback transaction
50745
+  (0.1ms) begin transaction
50746
+ ----------------------------------------------------------------
50747
+ ClarkKent::ReportsControllerTest: test_0009_should update report
50748
+ ----------------------------------------------------------------
50749
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50750
+  (0.0ms) SAVEPOINT active_record_1
50751
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50752
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50753
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50754
+ Processing by ClarkKent::ReportsController#update as HTML
50755
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
50756
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50757
+  (0.0ms) SAVEPOINT active_record_1
50758
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-02-21 17:08:10 UTC], ["id", 1]]
50759
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50760
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.2ms)
50761
+ Completed 200 OK in 7ms (Views: 3.3ms | ActiveRecord: 0.3ms)
50762
+  (0.6ms) rollback transaction
50763
+  (0.1ms) begin transaction
50764
+ --------------------------------------------------------------------------
50765
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
50766
+ --------------------------------------------------------------------------
50767
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50768
+  (0.1ms) SAVEPOINT active_record_1
50769
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50770
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50771
+  (0.1ms) rollback transaction
50772
+  (0.0ms) begin transaction
50773
+ -----------------------------------------------------------------------------------------
50774
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
50775
+ -----------------------------------------------------------------------------------------
50776
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
50777
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50778
+ SQL (0.4ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
50779
+  (0.0ms) SAVEPOINT active_record_1
50780
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
50781
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50782
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50783
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50784
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50785
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50786
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50787
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
50788
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50789
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
50790
+ ClarkKent::ReportColumn Load (0.6ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
50791
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
50792
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50793
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50794
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
50795
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (0.5ms)
50796
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 169.4ms
50797
+ Sent mail to taproot@gmail.com (8.1ms)
50798
+ Date: Tue, 21 Feb 2017 10:08:11 -0700
50799
+ From: reservations@invitedhome.com
50800
+ To: taproot@gmail.com
50801
+ Message-ID: <58ac73fb3bafd_86c53ff2c3401a14819d0@Erics-MacBook-Pro.local.mail>
50802
+ Subject: Your report has a problem
50803
+ Mime-Version: 1.0
50804
+ Content-Type: text/html;
50805
+ charset=UTF-8
50806
+ Content-Transfer-Encoding: 7bit
50807
+
50808
+ Your report could not be created due to the following problem:
50809
+ <strong>At least one date range is required.</strong>
50810
+  (0.4ms) rollback transaction
50811
+  (0.1ms) begin transaction
50812
+ ---------------------------------------------------
50813
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
50814
+ ---------------------------------------------------
50815
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
50816
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50817
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
50818
+  (0.0ms) SAVEPOINT active_record_1
50819
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
50820
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50821
+  (0.1ms) SAVEPOINT active_record_1
50822
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
50823
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50824
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50825
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50826
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50827
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50828
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50829
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
50830
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
50831
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
50832
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
50833
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
50834
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
50835
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
50836
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
50837
+  (0.7ms) rollback transaction
50838
+  (0.1ms) begin transaction
50839
+ -------------------------
50840
+ ClarkKentTest: test_truth
50841
+ -------------------------
50842
+  (0.4ms) rollback transaction
50843
+  (0.1ms) begin transaction
50844
+ ----------------------------------------------------------------------------------
50845
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
50846
+ ----------------------------------------------------------------------------------
50847
+ ClarkKent::Report Load (0.3ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50848
+  (0.1ms) SAVEPOINT active_record_1
50849
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50850
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50851
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50852
+ Processing by ClarkKent::ReportFiltersController#create as HTML
50853
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
50854
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50855
+  (0.0ms) SAVEPOINT active_record_1
50856
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
50857
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50858
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50859
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.5ms)
50860
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (6.4ms)
50861
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (9.9ms)
50862
+ Completed 200 OK in 17ms (Views: 13.2ms | ActiveRecord: 0.3ms)
50863
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
50864
+  (0.5ms) rollback transaction
50865
+  (0.1ms) begin transaction
50866
+ -----------------------------------------------------------------------------
50867
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
50868
+ -----------------------------------------------------------------------------
50869
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50870
+  (0.1ms) SAVEPOINT active_record_1
50871
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50872
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50873
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50874
+ Processing by ClarkKent::ReportFiltersController#create as HTML
50875
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
50876
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50877
+  (0.1ms) SAVEPOINT active_record_1
50878
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
50879
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50880
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50881
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.4ms)
50882
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (4.9ms)
50883
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (5.1ms)
50884
+ Completed 200 OK in 17ms (Views: 5.4ms | ActiveRecord: 0.4ms)
50885
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
50886
+  (0.5ms) rollback transaction
50887
+  (0.1ms) begin transaction
50888
+ ---------------------------------------------------------------------------------------
50889
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
50890
+ ---------------------------------------------------------------------------------------
50891
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50892
+  (0.1ms) SAVEPOINT active_record_1
50893
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50894
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50895
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50896
+  (0.1ms) SAVEPOINT active_record_1
50897
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
50898
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50899
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
50900
+ Parameters: {"id"=>"1"}
50901
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50902
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50903
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50904
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (5.2ms)
50905
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (15.3ms)
50906
+ Completed 200 OK in 25ms (Views: 19.2ms | ActiveRecord: 0.3ms)
50907
+  (0.5ms) rollback transaction
50908
+  (0.1ms) begin transaction
50909
+ ------------------------------------------------------------------------------------------
50910
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
50911
+ ------------------------------------------------------------------------------------------
50912
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50913
+  (0.1ms) SAVEPOINT active_record_1
50914
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50915
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50916
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50917
+  (0.0ms) SAVEPOINT active_record_1
50918
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
50919
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50920
+ Processing by ClarkKent::ReportFiltersController#show as HTML
50921
+ Parameters: {"id"=>"1"}
50922
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50923
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50924
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50925
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50926
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (1.5ms)
50927
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (6.3ms)
50928
+ Completed 200 OK in 9ms (Views: 6.6ms | ActiveRecord: 0.2ms)
50929
+  (0.5ms) rollback transaction
50930
+  (0.1ms) begin transaction
50931
+ -------------------------------------------------------------------------------------
50932
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
50933
+ -------------------------------------------------------------------------------------
50934
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50935
+  (0.1ms) SAVEPOINT active_record_1
50936
+ SQL (0.5ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50937
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50938
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50939
+ Processing by ClarkKent::ReportFiltersController#create as HTML
50940
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
50941
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50942
+  (0.1ms) SAVEPOINT active_record_1
50943
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
50944
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50945
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50946
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50947
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.5ms)
50948
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.6ms)
50949
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.8ms)
50950
+ Completed 200 OK in 9ms (Views: 3.2ms | ActiveRecord: 0.6ms)
50951
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
50952
+  (0.4ms) rollback transaction
50953
+  (0.1ms) begin transaction
50954
+ -----------------------------------------------------------------------------------------
50955
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
50956
+ -----------------------------------------------------------------------------------------
50957
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50958
+  (0.0ms) SAVEPOINT active_record_1
50959
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50960
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50961
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50962
+  (0.0ms) SAVEPOINT active_record_1
50963
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
50964
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50965
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
50966
+ Parameters: {"id"=>"1"}
50967
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50968
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50969
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50970
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.3ms)
50971
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (7.4ms)
50972
+ Completed 200 OK in 10ms (Views: 7.7ms | ActiveRecord: 0.2ms)
50973
+  (0.6ms) rollback transaction
50974
+  (0.1ms) begin transaction
50975
+ ------------------------------------------------------------------------------------------
50976
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
50977
+ ------------------------------------------------------------------------------------------
50978
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
50979
+  (0.0ms) SAVEPOINT active_record_1
50980
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
50981
+  (0.0ms) RELEASE SAVEPOINT active_record_1
50982
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
50983
+  (0.0ms) SAVEPOINT active_record_1
50984
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
50985
+  (0.1ms) RELEASE SAVEPOINT active_record_1
50986
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
50987
+ Parameters: {"id"=>"1"}
50988
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50989
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50990
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
50991
+ User Load (0.1ms) SELECT "users".* FROM "users"
50992
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (3.9ms)
50993
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (12.4ms)
50994
+ Completed 200 OK in 15ms (Views: 12.8ms | ActiveRecord: 0.2ms)
50995
+  (0.5ms) rollback transaction
50996
+  (0.1ms) begin transaction
50997
+ ---------------------------------------------------------------------------------------
50998
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
50999
+ ---------------------------------------------------------------------------------------
51000
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51001
+  (0.1ms) SAVEPOINT active_record_1
51002
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51003
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51004
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51005
+  (0.1ms) SAVEPOINT active_record_1
51006
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
51007
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51008
+ Processing by ClarkKent::ReportFiltersController#show as HTML
51009
+ Parameters: {"id"=>"1"}
51010
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51011
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51012
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51013
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
51014
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.5ms)
51015
+ Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.1ms)
51016
+  (0.5ms) rollback transaction
51017
+  (0.1ms) begin transaction
51018
+ -----------------------------------------------------------------------------------------
51019
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
51020
+ -----------------------------------------------------------------------------------------
51021
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51022
+  (0.0ms) SAVEPOINT active_record_1
51023
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51024
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51025
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51026
+  (0.1ms) SAVEPOINT active_record_1
51027
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:08:11 UTC], ["updated_at", 2017-02-21 17:08:11 UTC]]
51028
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51029
+ Processing by ClarkKent::ReportFiltersController#show as HTML
51030
+ Parameters: {"id"=>"1"}
51031
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51032
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51033
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51034
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.0ms)
51035
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.6ms)
51036
+ Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.1ms)
51037
+  (0.5ms) rollback transaction
51038
+  (0.1ms) begin transaction
51039
+ -----------------------------------------------------
51040
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
51041
+ -----------------------------------------------------
51042
+  (0.1ms) rollback transaction
51043
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
51044
+  (1.8ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
51045
+  (0.1ms) select sqlite_version(*)
51046
+  (0.8ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
51047
+  (0.7ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
51048
+  (0.7ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
51049
+  (0.7ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
51050
+  (0.1ms)  SELECT sql
51051
+ FROM sqlite_master
51052
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
51053
+ UNION ALL
51054
+ SELECT sql
51055
+ FROM sqlite_temp_master
51056
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
51057
+ 
51058
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
51059
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
51060
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
51061
+  (0.1ms)  SELECT sql
51062
+ FROM sqlite_master
51063
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
51064
+ UNION ALL
51065
+ SELECT sql
51066
+ FROM sqlite_temp_master
51067
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
51068
+ 
51069
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
51070
+  (0.7ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
51071
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
51072
+  (0.8ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
51073
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
51074
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
51075
+  (0.1ms) SELECT version FROM "schema_migrations"
51076
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
51077
+  (0.7ms) INSERT INTO schema_migrations (version) VALUES
51078
+ ('20131226170042'),
51079
+ ('20131226170112'),
51080
+ ('20140114010048'),
51081
+ ('20140129051754'),
51082
+ ('20150304233739');
51083
+
51084
+ 
51085
+  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
51086
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
51087
+  (0.1ms) begin transaction
51088
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-21 17:09:59 UTC], ["updated_at", 2017-02-21 17:09:59 UTC]]
51089
+  (0.6ms) commit transaction
51090
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
51091
+  (0.1ms) begin transaction
51092
+  (0.0ms) commit transaction
51093
+  (0.1ms) begin transaction
51094
+ SQL (0.5ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-21 17:09:59 UTC], ["updated_at", 2017-02-21 17:09:59 UTC]]
51095
+  (0.8ms) commit transaction
51096
+  (0.1ms) begin transaction
51097
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51098
+  (0.1ms) commit transaction
51099
+  (0.0ms) begin transaction
51100
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51101
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
51102
+  (0.8ms) commit transaction
51103
+  (0.1ms) begin transaction
51104
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51105
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
51106
+  (0.8ms) commit transaction
51107
+  (0.0ms) begin transaction
51108
+ ClarkKent::Report Load (0.4ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51109
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
51110
+  (0.8ms) commit transaction
51111
+  (0.1ms) begin transaction
51112
+ SQL (0.4ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
51113
+  (0.8ms) commit transaction
51114
+  (0.0ms) begin transaction
51115
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
51116
+  (0.7ms) commit transaction
51117
+  (0.1ms) begin transaction
51118
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-21 17:09:59 UTC], ["updated_at", 2017-02-21 17:09:59 UTC]]
51119
+  (0.7ms) commit transaction
51120
+  (0.1ms) begin transaction
51121
+ ----------------------------------------------------------------
51122
+ ClarkKent::ReportsControllerTest: test_0009_should update report
51123
+ ----------------------------------------------------------------
51124
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51125
+  (0.0ms) SAVEPOINT active_record_1
51126
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51127
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51128
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51129
+ Processing by ClarkKent::ReportsController#update as HTML
51130
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
51131
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51132
+  (0.1ms) SAVEPOINT active_record_1
51133
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-02-21 17:09:59 UTC], ["id", 1]]
51134
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51135
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (6.9ms)
51136
+ Completed 200 OK in 17ms (Views: 12.0ms | ActiveRecord: 0.5ms)
51137
+  (0.6ms) rollback transaction
51138
+  (0.1ms) begin transaction
51139
+ -----------------------------------------------------------
51140
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
51141
+ -----------------------------------------------------------
51142
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51143
+  (0.1ms) SAVEPOINT active_record_1
51144
+ SQL (1.0ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51145
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51146
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51147
+ Processing by ClarkKent::ReportsController#edit as HTML
51148
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
51149
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51150
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
51151
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.9ms)
51152
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51153
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (8.1ms)
51154
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
51155
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.8ms)
51156
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.6ms)
51157
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.2ms)
51158
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
51159
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
51160
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
51161
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (12.0ms)
51162
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
51163
+ ClarkKent::ReportDateFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
51164
+ User Load (0.1ms) SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
51165
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (19.6ms)
51166
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (22.3ms)
51167
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (27.1ms)
51168
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (58.1ms)
51169
+ Completed 200 OK in 221ms (Views: 214.2ms | ActiveRecord: 1.2ms)
51170
+  (1.0ms) rollback transaction
51171
+  (0.2ms) begin transaction
51172
+ --------------------------------------------------------------------------------
51173
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
51174
+ --------------------------------------------------------------------------------
51175
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51176
+  (0.1ms) SAVEPOINT active_record_1
51177
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51179
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51180
+ Processing by ClarkKent::ReportsController#create as HTML
51181
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
51182
+  (0.0ms) SAVEPOINT active_record_1
51183
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
51184
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
51185
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51186
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51187
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (43.4ms)
51188
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (46.8ms)
51189
+ Completed 409 Conflict in 58ms (Views: 51.1ms | ActiveRecord: 0.4ms)
51190
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
51191
+  (0.6ms) rollback transaction
51192
+  (0.1ms) begin transaction
51193
+ -----------------------------------------------------------------
51194
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
51195
+ -----------------------------------------------------------------
51196
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51197
+  (0.1ms) SAVEPOINT active_record_1
51198
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51199
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51200
+  (0.0ms) SAVEPOINT active_record_1
51201
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51202
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51203
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
51204
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51205
+ Processing by ClarkKent::ReportsController#destroy as HTML
51206
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
51207
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
51208
+  (0.1ms) SAVEPOINT active_record_1
51209
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51210
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51211
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
51212
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
51213
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51214
+ Redirected to http://test.host/reports/reports
51215
+ Completed 302 Found in 6ms (ActiveRecord: 0.5ms)
51216
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
51217
+  (0.5ms) rollback transaction
51218
+  (0.1ms) begin transaction
51219
+ ----------------------------------------------------------------
51220
+ ClarkKent::ReportsControllerTest: test_0003_should create report
51221
+ ----------------------------------------------------------------
51222
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51223
+  (0.0ms) SAVEPOINT active_record_1
51224
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51225
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51226
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51227
+ Processing by ClarkKent::ReportsController#create as HTML
51228
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
51229
+  (0.0ms) SAVEPOINT active_record_1
51230
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51231
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51232
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
51233
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.1ms)
51234
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51235
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.6ms)
51236
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51237
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.7ms)
51238
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
51239
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.4ms)
51240
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (7.6ms)
51241
+ Completed 200 OK in 13ms (Views: 10.2ms | ActiveRecord: 0.5ms)
51242
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
51243
+  (0.1ms) SAVEPOINT active_record_1
51244
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51245
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51246
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
51247
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
51248
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51249
+  (0.5ms) rollback transaction
51250
+  (0.1ms) begin transaction
51251
+ -------------------------------------------------------------------------
51252
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
51253
+ -------------------------------------------------------------------------
51254
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51255
+  (0.1ms) SAVEPOINT active_record_1
51256
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51257
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51258
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51259
+ Processing by ClarkKent::ReportsController#show as HTML
51260
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
51261
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51262
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
51263
+ ClarkKent::ReportFilter Load (0.5ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51264
+ ClarkKent::ReportColumn Load (0.6ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51265
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
51266
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
51267
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51268
+ User Load (0.1ms) SELECT "users".* FROM "users"
51269
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.9ms)
51270
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
51271
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.7ms)
51272
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (16.7ms)
51273
+ Completed 200 OK in 40ms (Views: 18.7ms | ActiveRecord: 1.5ms)
51274
+  (0.9ms) rollback transaction
51275
+  (0.1ms) begin transaction
51276
+ ----------------------------------------------------------
51277
+ ClarkKent::ReportsControllerTest: test_0002_should get new
51278
+ ----------------------------------------------------------
51279
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51280
+  (0.0ms) SAVEPOINT active_record_1
51281
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51282
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51283
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51284
+ Processing by ClarkKent::ReportsController#new as HTML
51285
+ Parameters: {"current_user_id"=>"1"}
51286
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
51287
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51288
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51289
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (6.2ms)
51290
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (6.8ms)
51291
+ Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.1ms)
51292
+  (0.5ms) rollback transaction
51293
+  (0.1ms) begin transaction
51294
+ ----------------------------------------------------------------------
51295
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
51296
+ ----------------------------------------------------------------------
51297
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51298
+  (0.1ms) SAVEPOINT active_record_1
51299
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51300
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51301
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51302
+ Processing by ClarkKent::ReportsController#show as HTML
51303
+ Parameters: {"created_at_from"=>"2017-02-20", "created_at_until"=>"2017-02-21", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
51304
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51305
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
51306
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51307
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51308
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
51309
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
51310
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51311
+ User Load (0.2ms) SELECT "users".* FROM "users"
51312
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (3.2ms)
51313
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.4ms)
51314
+  (0.4ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
51315
+  (0.2ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ?) subquery_for_count [["LIMIT", 10], ["OFFSET", 0]]
51316
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (8.9ms)
51317
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
51318
+ Order Load (0.1ms) SELECT "orders".* FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
51319
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51320
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51321
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51322
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.1ms)
51323
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (34.1ms)
51324
+ Completed 200 OK in 44ms (Views: 35.9ms | ActiveRecord: 1.9ms)
51325
+  (0.5ms) rollback transaction
51326
+  (0.1ms) begin transaction
51327
+ --------------------------------------------------------------
51328
+ ClarkKent::ReportsControllerTest: test_0005_should show report
51329
+ --------------------------------------------------------------
51330
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51331
+  (0.0ms) SAVEPOINT active_record_1
51332
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51333
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51334
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51335
+ Processing by ClarkKent::ReportsController#show as HTML
51336
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
51337
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51338
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
51339
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
51340
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51341
+  (0.2ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51342
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51343
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.5ms)
51344
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51345
+ User Load (0.2ms) SELECT "users".* FROM "users"
51346
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (3.7ms)
51347
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.3ms)
51348
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
51349
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (12.9ms)
51350
+ Completed 200 OK in 19ms (Views: 15.6ms | ActiveRecord: 1.1ms)
51351
+  (0.4ms) rollback transaction
51352
+  (0.1ms) begin transaction
51353
+ ------------------------------------------------------------
51354
+ ClarkKent::ReportsControllerTest: test_0001_should get index
51355
+ ------------------------------------------------------------
51356
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51357
+  (0.1ms) SAVEPOINT active_record_1
51358
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51359
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51360
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51361
+ Processing by ClarkKent::ReportsController#index as HTML
51362
+ Parameters: {"current_user_id"=>"1"}
51363
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
51364
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51365
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "User"], ["LIMIT", 1]]
51366
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51367
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["LIMIT", 1]]
51368
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
51369
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
51370
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (37.5ms)
51371
+ Completed 200 OK in 43ms (Views: 39.3ms | ActiveRecord: 0.6ms)
51372
+  (0.6ms) rollback transaction
51373
+  (0.1ms) begin transaction
51374
+ ------------------------------------------------------------------------
51375
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
51376
+ ------------------------------------------------------------------------
51377
+  (0.0ms) SAVEPOINT active_record_1
51378
+ SQL (0.5ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51379
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51380
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51381
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51382
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
51383
+  (0.4ms) rollback transaction
51384
+  (0.0ms) begin transaction
51385
+ --------------------------------------------------------------------------
51386
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
51387
+ --------------------------------------------------------------------------
51388
+  (0.0ms) SAVEPOINT active_record_1
51389
+ SQL (1.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51390
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51391
+  (0.1ms) SAVEPOINT active_record_1
51392
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
51393
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51394
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51395
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51396
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
51397
+  (0.4ms) rollback transaction
51398
+  (0.0ms) begin transaction
51399
+ --------------------------------------------------------------------------
51400
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
51401
+ --------------------------------------------------------------------------
51402
+  (0.0ms) SAVEPOINT active_record_1
51403
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51404
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51405
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51406
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51407
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
51408
+  (0.3ms) rollback transaction
51409
+  (0.0ms) begin transaction
51410
+ -----------------------------------------------------------------------------------------
51411
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
51412
+ -----------------------------------------------------------------------------------------
51413
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51414
+  (0.0ms) SAVEPOINT active_record_1
51415
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51416
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51417
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51418
+  (0.1ms) SAVEPOINT active_record_1
51419
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51420
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51421
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
51422
+ Parameters: {"id"=>"1"}
51423
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51424
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51425
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51426
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.3ms)
51427
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (11.2ms)
51428
+ Completed 200 OK in 17ms (Views: 14.2ms | ActiveRecord: 0.3ms)
51429
+  (0.5ms) rollback transaction
51430
+  (0.1ms) begin transaction
51431
+ ---------------------------------------------------------------------------------------
51432
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
51433
+ ---------------------------------------------------------------------------------------
51434
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51435
+  (0.0ms) SAVEPOINT active_record_1
51436
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51437
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51438
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51439
+  (0.0ms) SAVEPOINT active_record_1
51440
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51441
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51442
+ Processing by ClarkKent::ReportFiltersController#show as HTML
51443
+ Parameters: {"id"=>"1"}
51444
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51445
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51446
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51447
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.7ms)
51448
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.7ms)
51449
+ Completed 200 OK in 10ms (Views: 8.2ms | ActiveRecord: 0.2ms)
51450
+  (0.4ms) rollback transaction
51451
+  (0.1ms) begin transaction
51452
+ -----------------------------------------------------------------------------
51453
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
51454
+ -----------------------------------------------------------------------------
51455
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51456
+  (0.0ms) SAVEPOINT active_record_1
51457
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51458
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51459
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51460
+ Processing by ClarkKent::ReportFiltersController#create as HTML
51461
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
51462
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51463
+  (0.1ms) SAVEPOINT active_record_1
51464
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51465
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51466
+ ClarkKent::Report Load (0.4ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51467
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.4ms)
51468
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (8.1ms)
51469
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (8.9ms)
51470
+ Completed 200 OK in 16ms (Views: 11.8ms | ActiveRecord: 0.8ms)
51471
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
51472
+  (0.4ms) rollback transaction
51473
+  (0.1ms) begin transaction
51474
+ ----------------------------------------------------------------------------------
51475
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
51476
+ ----------------------------------------------------------------------------------
51477
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51478
+  (0.1ms) SAVEPOINT active_record_1
51479
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51480
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51481
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51482
+ Processing by ClarkKent::ReportFiltersController#create as HTML
51483
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
51484
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51485
+  (0.1ms) SAVEPOINT active_record_1
51486
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51487
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51488
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51489
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
51490
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.0ms)
51491
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.2ms)
51492
+ Completed 200 OK in 6ms (Views: 2.5ms | ActiveRecord: 0.4ms)
51493
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
51494
+  (0.5ms) rollback transaction
51495
+  (0.1ms) begin transaction
51496
+ -----------------------------------------------------------------------------------------
51497
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
51498
+ -----------------------------------------------------------------------------------------
51499
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51500
+  (0.0ms) SAVEPOINT active_record_1
51501
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51502
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51503
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51504
+  (0.0ms) SAVEPOINT active_record_1
51505
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51506
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51507
+ Processing by ClarkKent::ReportFiltersController#show as HTML
51508
+ Parameters: {"id"=>"1"}
51509
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51510
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51511
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51512
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.1ms)
51513
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.4ms)
51514
+ Completed 200 OK in 6ms (Views: 2.8ms | ActiveRecord: 0.2ms)
51515
+  (0.6ms) rollback transaction
51516
+  (0.1ms) begin transaction
51517
+ ---------------------------------------------------------------------------------------
51518
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
51519
+ ---------------------------------------------------------------------------------------
51520
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51521
+  (0.1ms) SAVEPOINT active_record_1
51522
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51523
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51524
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51525
+  (0.1ms) SAVEPOINT active_record_1
51526
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51527
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51528
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
51529
+ Parameters: {"id"=>"1"}
51530
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51531
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51532
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51533
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (5.1ms)
51534
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (12.4ms)
51535
+ Completed 200 OK in 19ms (Views: 12.7ms | ActiveRecord: 0.3ms)
51536
+  (0.6ms) rollback transaction
51537
+  (0.1ms) begin transaction
51538
+ ------------------------------------------------------------------------------------------
51539
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
51540
+ ------------------------------------------------------------------------------------------
51541
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51542
+  (0.0ms) SAVEPOINT active_record_1
51543
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51544
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51545
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51546
+  (0.1ms) SAVEPOINT active_record_1
51547
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51548
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51549
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
51550
+ Parameters: {"id"=>"1"}
51551
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51552
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51553
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51554
+ User Load (0.1ms) SELECT "users".* FROM "users"
51555
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (2.4ms)
51556
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (11.5ms)
51557
+ Completed 200 OK in 16ms (Views: 11.9ms | ActiveRecord: 0.3ms)
51558
+  (0.6ms) rollback transaction
51559
+  (0.1ms) begin transaction
51560
+ ------------------------------------------------------------------------------------------
51561
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
51562
+ ------------------------------------------------------------------------------------------
51563
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51564
+  (0.1ms) SAVEPOINT active_record_1
51565
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51566
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51567
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51568
+  (0.0ms) SAVEPOINT active_record_1
51569
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51570
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51571
+ Processing by ClarkKent::ReportFiltersController#show as HTML
51572
+ Parameters: {"id"=>"1"}
51573
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51574
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51575
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51576
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51577
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (1.8ms)
51578
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (6.2ms)
51579
+ Completed 200 OK in 9ms (Views: 6.4ms | ActiveRecord: 0.3ms)
51580
+  (0.4ms) rollback transaction
51581
+  (0.1ms) begin transaction
51582
+ -------------------------------------------------------------------------------------
51583
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
51584
+ -------------------------------------------------------------------------------------
51585
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51586
+  (0.0ms) SAVEPOINT active_record_1
51587
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51588
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51589
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51590
+ Processing by ClarkKent::ReportFiltersController#create as HTML
51591
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
51592
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51593
+  (0.0ms) SAVEPOINT active_record_1
51594
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51595
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51596
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51597
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51598
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.6ms)
51599
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.8ms)
51600
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (3.0ms)
51601
+ Completed 200 OK in 7ms (Views: 3.3ms | ActiveRecord: 0.4ms)
51602
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
51603
+  (0.5ms) rollback transaction
51604
+  (0.1ms) begin transaction
51605
+ -------------------------
51606
+ ClarkKentTest: test_truth
51607
+ -------------------------
51608
+  (0.0ms) rollback transaction
51609
+  (0.1ms) begin transaction
51610
+ ---------------------------------------------------
51611
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
51612
+ ---------------------------------------------------
51613
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
51614
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51615
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
51616
+  (0.0ms) SAVEPOINT active_record_1
51617
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
51618
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51619
+  (0.0ms) SAVEPOINT active_record_1
51620
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-02-21 17:10:00 UTC], ["updated_at", 2017-02-21 17:10:00 UTC]]
51621
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51622
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51623
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51624
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51625
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51626
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51627
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
51628
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51629
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
51630
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51631
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51632
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51633
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51634
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
51635
+  (1.2ms) rollback transaction
51636
+  (0.1ms) begin transaction
51637
+ -----------------------------------------------------------------------------------------
51638
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
51639
+ -----------------------------------------------------------------------------------------
51640
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
51641
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51642
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
51643
+  (0.0ms) SAVEPOINT active_record_1
51644
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
51645
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51646
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51647
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51648
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51649
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51650
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51651
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
51652
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51653
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
51654
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51655
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51656
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51657
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51658
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
51659
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (0.4ms)
51660
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 155.0ms
51661
+ Sent mail to taproot@gmail.com (5.0ms)
51662
+ Date: Tue, 21 Feb 2017 10:10:01 -0700
51663
+ From: reservations@invitedhome.com
51664
+ To: taproot@gmail.com
51665
+ Message-ID: <58ac74694db79_874f3fcf0503fa0c355b3@Erics-MacBook-Pro.local.mail>
51666
+ Subject: Your report has a problem
51667
+ Mime-Version: 1.0
51668
+ Content-Type: text/html;
51669
+ charset=UTF-8
51670
+ Content-Transfer-Encoding: 7bit
51671
+
51672
+ Your report could not be created due to the following problem:
51673
+ <strong>At least one date range is required.</strong>
51674
+  (1.1ms) rollback transaction
51675
+  (0.1ms) begin transaction
51676
+ -----------------------------------------------------
51677
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
51678
+ -----------------------------------------------------
51679
+  (0.1ms) rollback transaction
51680
+  (0.1ms) begin transaction
51681
+ --------------------------------------------------------------------------
51682
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
51683
+ --------------------------------------------------------------------------
51684
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51685
+  (0.0ms) SAVEPOINT active_record_1
51686
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51687
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51688
+  (0.1ms) rollback transaction
51689
+  (0.1ms) begin transaction
51690
+ ------------------------------------------------------------------------------------------------
51691
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
51692
+ ------------------------------------------------------------------------------------------------
51693
+  (0.0ms) SAVEPOINT active_record_1
51694
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
51695
+  (0.0ms) rollback transaction
51696
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
51697
+  (1.9ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
51698
+  (0.1ms) select sqlite_version(*)
51699
+  (0.9ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
51700
+  (0.9ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
51701
+  (1.1ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
51702
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
51703
+  (0.1ms)  SELECT sql
51704
+ FROM sqlite_master
51705
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
51706
+ UNION ALL
51707
+ SELECT sql
51708
+ FROM sqlite_temp_master
51709
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
51710
+ 
51711
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
51712
+  (0.9ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
51713
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
51714
+  (0.2ms)  SELECT sql
51715
+ FROM sqlite_master
51716
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
51717
+ UNION ALL
51718
+ SELECT sql
51719
+ FROM sqlite_temp_master
51720
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
51721
+ 
51722
+  (1.0ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
51723
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
51724
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
51725
+  (0.9ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
51726
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
51727
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
51728
+  (0.1ms) SELECT version FROM "schema_migrations"
51729
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
51730
+  (0.7ms) INSERT INTO schema_migrations (version) VALUES
51731
+ ('20131226170042'),
51732
+ ('20131226170112'),
51733
+ ('20140114010048'),
51734
+ ('20140129051754'),
51735
+ ('20150304233739');
51736
+
51737
+ 
51738
+  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
51739
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
51740
+  (0.1ms) begin transaction
51741
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-21 17:10:30 UTC], ["updated_at", 2017-02-21 17:10:30 UTC]]
51742
+  (1.0ms) commit transaction
51743
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
51744
+  (0.1ms) begin transaction
51745
+  (0.1ms) commit transaction
51746
+  (0.1ms) begin transaction
51747
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-21 17:10:30 UTC], ["updated_at", 2017-02-21 17:10:30 UTC]]
51748
+  (1.0ms) commit transaction
51749
+  (0.1ms) begin transaction
51750
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51751
+  (0.1ms) commit transaction
51752
+  (0.0ms) begin transaction
51753
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51754
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
51755
+  (0.8ms) commit transaction
51756
+  (0.1ms) begin transaction
51757
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51758
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
51759
+  (0.8ms) commit transaction
51760
+  (0.1ms) begin transaction
51761
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51762
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
51763
+  (0.7ms) commit transaction
51764
+  (0.1ms) begin transaction
51765
+ SQL (0.4ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
51766
+  (0.7ms) commit transaction
51767
+  (0.1ms) begin transaction
51768
+ SQL (0.4ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
51769
+  (0.8ms) commit transaction
51770
+  (0.1ms) begin transaction
51771
+ SQL (0.4ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-21 17:10:30 UTC], ["updated_at", 2017-02-21 17:10:30 UTC]]
51772
+  (0.8ms) commit transaction
51773
+  (0.1ms) begin transaction
51774
+ -------------------------
51775
+ ClarkKentTest: test_truth
51776
+ -------------------------
51777
+  (0.0ms) rollback transaction
51778
+  (0.0ms) begin transaction
51779
+ --------------------------------------------------------------------------
51780
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
51781
+ --------------------------------------------------------------------------
51782
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51783
+  (0.0ms) SAVEPOINT active_record_1
51784
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51785
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51786
+  (0.1ms) rollback transaction
51787
+  (0.0ms) begin transaction
51788
+ ----------------------------------------------------------------
51789
+ ClarkKent::ReportsControllerTest: test_0003_should create report
51790
+ ----------------------------------------------------------------
51791
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51792
+  (0.1ms) SAVEPOINT active_record_1
51793
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51794
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51795
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51796
+ Processing by ClarkKent::ReportsController#create as HTML
51797
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
51798
+  (0.4ms) SAVEPOINT active_record_1
51799
+ SQL (0.7ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-02-21 17:10:30 UTC], ["updated_at", 2017-02-21 17:10:30 UTC]]
51800
+  (0.2ms) RELEASE SAVEPOINT active_record_1
51801
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
51802
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.2ms)
51803
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51804
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (7.3ms)
51805
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51806
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.4ms)
51807
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
51808
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (2.3ms)
51809
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (29.6ms)
51810
+ Completed 200 OK in 205ms (Views: 194.1ms | ActiveRecord: 2.0ms)
51811
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
51812
+  (0.1ms) SAVEPOINT active_record_1
51813
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51814
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51815
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
51816
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
51817
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51818
+  (1.1ms) rollback transaction
51819
+  (0.1ms) begin transaction
51820
+ --------------------------------------------------------------
51821
+ ClarkKent::ReportsControllerTest: test_0005_should show report
51822
+ --------------------------------------------------------------
51823
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51824
+  (0.1ms) SAVEPOINT active_record_1
51825
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51826
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51827
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51828
+ Processing by ClarkKent::ReportsController#show as HTML
51829
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
51830
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51831
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
51832
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
51833
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51834
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51835
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51836
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.5ms)
51837
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51838
+ User Load (0.1ms) SELECT "users".* FROM "users"
51839
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.7ms)
51840
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
51841
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.6ms)
51842
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (21.1ms)
51843
+ Completed 200 OK in 30ms (Views: 23.3ms | ActiveRecord: 0.6ms)
51844
+  (0.5ms) rollback transaction
51845
+  (0.1ms) begin transaction
51846
+ ----------------------------------------------------------------------
51847
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
51848
+ ----------------------------------------------------------------------
51849
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51850
+  (0.1ms) SAVEPOINT active_record_1
51851
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51852
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51853
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51854
+ Processing by ClarkKent::ReportsController#show as HTML
51855
+ Parameters: {"created_at_from"=>"2017-02-20", "created_at_until"=>"2017-02-21", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
51856
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51857
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
51858
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51859
+ ClarkKent::ReportColumn Load (0.6ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51860
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
51861
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
51862
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51863
+ User Load (0.0ms) SELECT "users".* FROM "users"
51864
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
51865
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
51866
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
51867
+  (0.1ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ?) subquery_for_count [["LIMIT", 10], ["OFFSET", 0]]
51868
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.9ms)
51869
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
51870
+ Order Load (0.1ms) SELECT "orders".* FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
51871
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51872
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51873
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51874
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (0.9ms)
51875
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (20.2ms)
51876
+ Completed 200 OK in 32ms (Views: 22.5ms | ActiveRecord: 1.7ms)
51877
+  (0.5ms) rollback transaction
51878
+  (0.1ms) begin transaction
51879
+ ----------------------------------------------------------
51880
+ ClarkKent::ReportsControllerTest: test_0002_should get new
51881
+ ----------------------------------------------------------
51882
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51883
+  (0.1ms) SAVEPOINT active_record_1
51884
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51885
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51886
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51887
+ Processing by ClarkKent::ReportsController#new as HTML
51888
+ Parameters: {"current_user_id"=>"1"}
51889
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
51890
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51891
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51892
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (59.8ms)
51893
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (63.4ms)
51894
+ Completed 200 OK in 69ms (Views: 65.3ms | ActiveRecord: 0.2ms)
51895
+  (0.6ms) rollback transaction
51896
+  (0.1ms) begin transaction
51897
+ -----------------------------------------------------------
51898
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
51899
+ -----------------------------------------------------------
51900
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51901
+  (0.1ms) SAVEPOINT active_record_1
51902
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51903
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51904
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51905
+ Processing by ClarkKent::ReportsController#edit as HTML
51906
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
51907
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51908
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
51909
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.0ms)
51910
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51911
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.6ms)
51912
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
51913
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
51914
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (4.5ms)
51915
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
51916
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
51917
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
51918
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
51919
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (11.2ms)
51920
+ ClarkKent::ReportEmail Load (0.2ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
51921
+ ClarkKent::ReportDateFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
51922
+ User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
51923
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (24.8ms)
51924
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (27.4ms)
51925
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (31.8ms)
51926
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (48.6ms)
51927
+ Completed 200 OK in 52ms (Views: 50.1ms | ActiveRecord: 0.8ms)
51928
+  (0.4ms) rollback transaction
51929
+  (0.1ms) begin transaction
51930
+ -----------------------------------------------------------------
51931
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
51932
+ -----------------------------------------------------------------
51933
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51934
+  (0.0ms) SAVEPOINT active_record_1
51935
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51936
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51937
+  (0.0ms) SAVEPOINT active_record_1
51938
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-02-21 17:10:31 UTC], ["updated_at", 2017-02-21 17:10:31 UTC]]
51939
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51940
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
51941
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51942
+ Processing by ClarkKent::ReportsController#destroy as HTML
51943
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
51944
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
51945
+  (0.1ms) SAVEPOINT active_record_1
51946
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
51947
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
51948
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
51949
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
51950
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51951
+ Redirected to http://test.host/reports/reports
51952
+ Completed 302 Found in 6ms (ActiveRecord: 0.5ms)
51953
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
51954
+  (0.4ms) rollback transaction
51955
+  (0.1ms) begin transaction
51956
+ -------------------------------------------------------------------------
51957
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
51958
+ -------------------------------------------------------------------------
51959
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51960
+  (0.1ms) SAVEPOINT active_record_1
51961
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51962
+  (0.0ms) RELEASE SAVEPOINT active_record_1
51963
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51964
+ Processing by ClarkKent::ReportsController#show as HTML
51965
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
51966
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
51967
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
51968
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
51969
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
51970
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
51971
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
51972
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51973
+ User Load (0.0ms) SELECT "users".* FROM "users"
51974
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.1ms)
51975
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
51976
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
51977
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (2.6ms)
51978
+ Completed 200 OK in 10ms (Views: 4.5ms | ActiveRecord: 0.5ms)
51979
+  (0.4ms) rollback transaction
51980
+  (0.1ms) begin transaction
51981
+ ----------------------------------------------------------------
51982
+ ClarkKent::ReportsControllerTest: test_0009_should update report
51983
+ ----------------------------------------------------------------
51984
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
51985
+  (0.1ms) SAVEPOINT active_record_1
51986
+ SQL (0.6ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
51987
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51988
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
51989
+ Processing by ClarkKent::ReportsController#update as HTML
51990
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
51991
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
51992
+  (0.1ms) SAVEPOINT active_record_1
51993
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-02-21 17:10:31 UTC], ["id", 1]]
51994
+  (0.1ms) RELEASE SAVEPOINT active_record_1
51995
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.4ms)
51996
+ Completed 200 OK in 31ms (Views: 2.2ms | ActiveRecord: 0.4ms)
51997
+  (1.0ms) rollback transaction
51998
+  (0.2ms) begin transaction
51999
+ ------------------------------------------------------------
52000
+ ClarkKent::ReportsControllerTest: test_0001_should get index
52001
+ ------------------------------------------------------------
52002
+ ClarkKent::Report Load (0.3ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52003
+  (0.1ms) SAVEPOINT active_record_1
52004
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52005
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52006
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52007
+ Processing by ClarkKent::ReportsController#index as HTML
52008
+ Parameters: {"current_user_id"=>"1"}
52009
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
52010
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
52011
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "User"], ["LIMIT", 1]]
52012
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52013
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["LIMIT", 1]]
52014
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
52015
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
52016
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (10.1ms)
52017
+ Completed 200 OK in 16ms (Views: 12.0ms | ActiveRecord: 0.5ms)
52018
+  (0.5ms) rollback transaction
52019
+  (0.1ms) begin transaction
52020
+ --------------------------------------------------------------------------------
52021
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
52022
+ --------------------------------------------------------------------------------
52023
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52024
+  (0.1ms) SAVEPOINT active_record_1
52025
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52026
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52027
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52028
+ Processing by ClarkKent::ReportsController#create as HTML
52029
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
52030
+  (0.1ms) SAVEPOINT active_record_1
52031
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
52032
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
52033
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
52034
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52035
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (6.4ms)
52036
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (7.0ms)
52037
+ Completed 409 Conflict in 15ms (Views: 12.9ms | ActiveRecord: 0.3ms)
52038
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
52039
+  (0.4ms) rollback transaction
52040
+  (0.1ms) begin transaction
52041
+ -----------------------------------------------------
52042
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
52043
+ -----------------------------------------------------
52044
+  (0.1ms) rollback transaction
52045
+  (0.1ms) begin transaction
52046
+ ------------------------------------------------------------------------------------------------
52047
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
52048
+ ------------------------------------------------------------------------------------------------
52049
+  (0.1ms) SAVEPOINT active_record_1
52050
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
52051
+  (0.1ms) rollback transaction
52052
+  (0.1ms) begin transaction
52053
+ ------------------------------------------------------------------------
52054
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
52055
+ ------------------------------------------------------------------------
52056
+  (0.1ms) SAVEPOINT active_record_1
52057
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-02-21 17:10:31 UTC], ["updated_at", 2017-02-21 17:10:31 UTC]]
52058
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52059
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52060
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
52061
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
52062
+  (0.5ms) rollback transaction
52063
+  (0.2ms) begin transaction
52064
+ --------------------------------------------------------------------------
52065
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
52066
+ --------------------------------------------------------------------------
52067
+  (0.0ms) SAVEPOINT active_record_1
52068
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-21 17:10:31 UTC], ["updated_at", 2017-02-21 17:10:31 UTC]]
52069
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52070
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52071
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
52072
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
52073
+  (0.5ms) rollback transaction
52074
+  (0.1ms) begin transaction
52075
+ --------------------------------------------------------------------------
52076
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
52077
+ --------------------------------------------------------------------------
52078
+  (0.0ms) SAVEPOINT active_record_1
52079
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-21 17:10:31 UTC], ["updated_at", 2017-02-21 17:10:31 UTC]]
52080
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52081
+  (0.0ms) SAVEPOINT active_record_1
52082
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
52083
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52084
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52085
+ ClarkKent::ReportFilter Load (0.3ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
52086
+ ClarkKent::ReportColumn Load (0.3ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
52087
+  (0.4ms) rollback transaction
52088
+  (0.1ms) begin transaction
52089
+ ---------------------------------------------------
52090
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
52091
+ ---------------------------------------------------
52092
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
52093
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52094
+ SQL (0.5ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
52095
+  (0.1ms) SAVEPOINT active_record_1
52096
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
52097
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52098
+  (0.1ms) SAVEPOINT active_record_1
52099
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-02-21 17:10:31 UTC], ["updated_at", 2017-02-21 17:10:31 UTC]]
52100
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52101
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52102
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52103
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52104
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52105
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52106
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
52107
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52108
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
52109
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52110
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52111
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52112
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52113
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
52114
+  (1.2ms) rollback transaction
52115
+  (0.1ms) begin transaction
52116
+ -----------------------------------------------------------------------------------------
52117
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
52118
+ -----------------------------------------------------------------------------------------
52119
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
52120
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52121
+ SQL (0.4ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
52122
+  (0.0ms) SAVEPOINT active_record_1
52123
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
52124
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52125
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52126
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52127
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52128
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52129
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52130
+ ClarkKent::ReportColumn Load (0.4ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
52131
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52132
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
52133
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52134
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52135
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52136
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52137
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
52138
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (0.4ms)
52139
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 135.1ms
52140
+ Sent mail to taproot@gmail.com (4.8ms)
52141
+ Date: Tue, 21 Feb 2017 10:10:31 -0700
52142
+ From: reservations@invitedhome.com
52143
+ To: taproot@gmail.com
52144
+ Message-ID: <58ac7487d81bd_87813fc1db03ba248393e@Erics-MacBook-Pro.local.mail>
52145
+ Subject: Your report has a problem
52146
+ Mime-Version: 1.0
52147
+ Content-Type: text/html;
52148
+ charset=UTF-8
52149
+ Content-Transfer-Encoding: 7bit
52150
+
52151
+ Your report could not be created due to the following problem:
52152
+ <strong>At least one date range is required.</strong>
52153
+  (1.1ms) rollback transaction
52154
+  (0.1ms) begin transaction
52155
+ ----------------------------------------------------------------------------------
52156
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
52157
+ ----------------------------------------------------------------------------------
52158
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52159
+  (0.1ms) SAVEPOINT active_record_1
52160
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52161
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52162
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52163
+ Processing by ClarkKent::ReportFiltersController#create as HTML
52164
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
52165
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52166
+  (0.1ms) SAVEPOINT active_record_1
52167
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:10:31 UTC], ["updated_at", 2017-02-21 17:10:31 UTC]]
52168
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52169
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52170
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.3ms)
52171
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (6.0ms)
52172
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (8.8ms)
52173
+ Completed 200 OK in 16ms (Views: 12.0ms | ActiveRecord: 0.5ms)
52174
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
52175
+  (0.4ms) rollback transaction
52176
+  (0.1ms) begin transaction
52177
+ -----------------------------------------------------------------------------
52178
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
52179
+ -----------------------------------------------------------------------------
52180
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52181
+  (0.1ms) SAVEPOINT active_record_1
52182
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52183
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52184
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52185
+ Processing by ClarkKent::ReportFiltersController#create as HTML
52186
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
52187
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52188
+  (0.1ms) SAVEPOINT active_record_1
52189
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:10:31 UTC], ["updated_at", 2017-02-21 17:10:31 UTC]]
52190
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52191
+ ClarkKent::Report Load (0.3ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52192
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.5ms)
52193
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (7.7ms)
52194
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (7.9ms)
52195
+ Completed 200 OK in 21ms (Views: 8.0ms | ActiveRecord: 0.6ms)
52196
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
52197
+  (0.5ms) rollback transaction
52198
+  (0.1ms) begin transaction
52199
+ -----------------------------------------------------------------------------------------
52200
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
52201
+ -----------------------------------------------------------------------------------------
52202
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52203
+  (0.0ms) SAVEPOINT active_record_1
52204
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52205
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52206
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52207
+  (0.0ms) SAVEPOINT active_record_1
52208
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:10:31 UTC], ["updated_at", 2017-02-21 17:10:31 UTC]]
52209
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52210
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
52211
+ Parameters: {"id"=>"1"}
52212
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52213
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52214
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52215
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.4ms)
52216
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (9.9ms)
52217
+ Completed 200 OK in 15ms (Views: 12.3ms | ActiveRecord: 0.2ms)
52218
+  (0.5ms) rollback transaction
52219
+  (0.1ms) begin transaction
52220
+ ------------------------------------------------------------------------------------------
52221
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
52222
+ ------------------------------------------------------------------------------------------
52223
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52224
+  (0.1ms) SAVEPOINT active_record_1
52225
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52226
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52227
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52228
+  (0.0ms) SAVEPOINT active_record_1
52229
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:10:32 UTC], ["updated_at", 2017-02-21 17:10:32 UTC]]
52230
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52231
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
52232
+ Parameters: {"id"=>"1"}
52233
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52234
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52235
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52236
+ User Load (0.0ms) SELECT "users".* FROM "users"
52237
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (2.4ms)
52238
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (10.7ms)
52239
+ Completed 200 OK in 14ms (Views: 11.0ms | ActiveRecord: 0.3ms)
52240
+  (0.7ms) rollback transaction
52241
+  (0.1ms) begin transaction
52242
+ -----------------------------------------------------------------------------------------
52243
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
52244
+ -----------------------------------------------------------------------------------------
52245
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52246
+  (0.1ms) SAVEPOINT active_record_1
52247
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52248
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52249
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52250
+  (0.1ms) SAVEPOINT active_record_1
52251
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:10:32 UTC], ["updated_at", 2017-02-21 17:10:32 UTC]]
52252
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52253
+ Processing by ClarkKent::ReportFiltersController#show as HTML
52254
+ Parameters: {"id"=>"1"}
52255
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52256
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52257
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52258
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.0ms)
52259
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.5ms)
52260
+ Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.1ms)
52261
+  (0.6ms) rollback transaction
52262
+  (0.1ms) begin transaction
52263
+ ---------------------------------------------------------------------------------------
52264
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
52265
+ ---------------------------------------------------------------------------------------
52266
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52267
+  (0.0ms) SAVEPOINT active_record_1
52268
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52269
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52270
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52271
+  (0.1ms) SAVEPOINT active_record_1
52272
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:10:32 UTC], ["updated_at", 2017-02-21 17:10:32 UTC]]
52273
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52274
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
52275
+ Parameters: {"id"=>"1"}
52276
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52277
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52278
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52279
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (5.2ms)
52280
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (12.4ms)
52281
+ Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.2ms)
52282
+  (0.5ms) rollback transaction
52283
+  (0.1ms) begin transaction
52284
+ -------------------------------------------------------------------------------------
52285
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
52286
+ -------------------------------------------------------------------------------------
52287
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52288
+  (0.0ms) SAVEPOINT active_record_1
52289
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52290
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52291
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52292
+ Processing by ClarkKent::ReportFiltersController#create as HTML
52293
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
52294
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52295
+  (0.1ms) SAVEPOINT active_record_1
52296
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:10:32 UTC], ["updated_at", 2017-02-21 17:10:32 UTC]]
52297
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52298
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52299
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52300
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (1.6ms)
52301
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (10.0ms)
52302
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (10.4ms)
52303
+ Completed 200 OK in 17ms (Views: 10.7ms | ActiveRecord: 0.6ms)
52304
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
52305
+  (0.6ms) rollback transaction
52306
+  (0.1ms) begin transaction
52307
+ ------------------------------------------------------------------------------------------
52308
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
52309
+ ------------------------------------------------------------------------------------------
52310
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52311
+  (0.1ms) SAVEPOINT active_record_1
52312
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52313
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52314
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52315
+  (0.0ms) SAVEPOINT active_record_1
52316
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:10:32 UTC], ["updated_at", 2017-02-21 17:10:32 UTC]]
52317
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52318
+ Processing by ClarkKent::ReportFiltersController#show as HTML
52319
+ Parameters: {"id"=>"1"}
52320
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52321
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52322
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52323
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52324
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.5ms)
52325
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (3.1ms)
52326
+ Completed 200 OK in 6ms (Views: 3.4ms | ActiveRecord: 0.4ms)
52327
+  (0.5ms) rollback transaction
52328
+  (0.1ms) begin transaction
52329
+ ---------------------------------------------------------------------------------------
52330
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
52331
+ ---------------------------------------------------------------------------------------
52332
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52333
+  (0.0ms) SAVEPOINT active_record_1
52334
+ SQL (0.9ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52335
+  (0.2ms) RELEASE SAVEPOINT active_record_1
52336
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52337
+  (0.1ms) SAVEPOINT active_record_1
52338
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:10:32 UTC], ["updated_at", 2017-02-21 17:10:32 UTC]]
52339
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52340
+ Processing by ClarkKent::ReportFiltersController#show as HTML
52341
+ Parameters: {"id"=>"1"}
52342
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52343
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52344
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52345
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
52346
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.9ms)
52347
+ Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.1ms)
52348
+  (0.6ms) rollback transaction
52349
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
52350
+  (1.9ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
52351
+  (0.1ms) select sqlite_version(*)
52352
+  (1.2ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
52353
+  (1.0ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
52354
+  (0.8ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
52355
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
52356
+  (0.1ms)  SELECT sql
52357
+ FROM sqlite_master
52358
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
52359
+ UNION ALL
52360
+ SELECT sql
52361
+ FROM sqlite_temp_master
52362
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
52363
+ 
52364
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
52365
+  (0.9ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
52366
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
52367
+  (0.1ms)  SELECT sql
52368
+ FROM sqlite_master
52369
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
52370
+ UNION ALL
52371
+ SELECT sql
52372
+ FROM sqlite_temp_master
52373
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
52374
+ 
52375
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
52376
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
52377
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
52378
+  (0.8ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
52379
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
52380
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
52381
+  (0.6ms) SELECT version FROM "schema_migrations"
52382
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
52383
+  (0.9ms) INSERT INTO schema_migrations (version) VALUES
52384
+ ('20131226170042'),
52385
+ ('20131226170112'),
52386
+ ('20140114010048'),
52387
+ ('20140129051754'),
52388
+ ('20150304233739');
52389
+
52390
+ 
52391
+  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
52392
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
52393
+  (0.1ms) begin transaction
52394
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-21 17:14:37 UTC], ["updated_at", 2017-02-21 17:14:37 UTC]]
52395
+  (0.7ms) commit transaction
52396
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
52397
+  (0.0ms) begin transaction
52398
+  (0.0ms) commit transaction
52399
+  (0.1ms) begin transaction
52400
+ SQL (0.6ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-21 17:14:37 UTC], ["updated_at", 2017-02-21 17:14:37 UTC]]
52401
+  (0.8ms) commit transaction
52402
+  (0.1ms) begin transaction
52403
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52404
+  (0.1ms) commit transaction
52405
+  (0.0ms) begin transaction
52406
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52407
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
52408
+  (0.8ms) commit transaction
52409
+  (0.4ms) begin transaction
52410
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52411
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
52412
+  (0.7ms) commit transaction
52413
+  (0.1ms) begin transaction
52414
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52415
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
52416
+  (0.8ms) commit transaction
52417
+  (0.1ms) begin transaction
52418
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
52419
+  (0.7ms) commit transaction
52420
+  (0.0ms) begin transaction
52421
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
52422
+  (0.8ms) commit transaction
52423
+  (0.0ms) begin transaction
52424
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-21 17:14:37 UTC], ["updated_at", 2017-02-21 17:14:37 UTC]]
52425
+  (0.7ms) commit transaction
52426
+  (0.1ms) begin transaction
52427
+ -------------------------------------------------------------------------
52428
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
52429
+ -------------------------------------------------------------------------
52430
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52431
+  (0.0ms) SAVEPOINT active_record_1
52432
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52433
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52434
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52435
+ Processing by ClarkKent::ReportsController#show as HTML
52436
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
52437
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
52438
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
52439
+ ClarkKent::ReportFilter Load (0.5ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52440
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52441
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
52442
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.8ms)
52443
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52444
+ User Load (0.1ms) SELECT "users".* FROM "users"
52445
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.7ms)
52446
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
52447
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.6ms)
52448
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (19.0ms)
52449
+ Completed 200 OK in 216ms (Views: 190.7ms | ActiveRecord: 1.9ms)
52450
+  (1.0ms) rollback transaction
52451
+  (0.1ms) begin transaction
52452
+ -----------------------------------------------------------
52453
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
52454
+ -----------------------------------------------------------
52455
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52456
+  (0.0ms) SAVEPOINT active_record_1
52457
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52458
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52459
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52460
+ Processing by ClarkKent::ReportsController#edit as HTML
52461
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
52462
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52463
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
52464
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.4ms)
52465
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52466
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.1ms)
52467
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
52468
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.0ms)
52469
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (4.6ms)
52470
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
52471
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
52472
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
52473
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
52474
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (10.4ms)
52475
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
52476
+ ClarkKent::ReportDateFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
52477
+ User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
52478
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (19.9ms)
52479
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (25.1ms)
52480
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (31.0ms)
52481
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (58.0ms)
52482
+ Completed 200 OK in 64ms (Views: 59.7ms | ActiveRecord: 0.7ms)
52483
+  (0.4ms) rollback transaction
52484
+  (0.1ms) begin transaction
52485
+ -----------------------------------------------------------------
52486
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
52487
+ -----------------------------------------------------------------
52488
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52489
+  (0.0ms) SAVEPOINT active_record_1
52490
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52491
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52492
+  (0.0ms) SAVEPOINT active_record_1
52493
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52494
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52495
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
52496
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52497
+ Processing by ClarkKent::ReportsController#destroy as HTML
52498
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
52499
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
52500
+  (0.1ms) SAVEPOINT active_record_1
52501
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
52502
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52503
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
52504
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
52505
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52506
+ Redirected to http://test.host/reports/reports
52507
+ Completed 302 Found in 5ms (ActiveRecord: 0.4ms)
52508
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
52509
+  (0.6ms) rollback transaction
52510
+  (0.1ms) begin transaction
52511
+ ----------------------------------------------------------------------
52512
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
52513
+ ----------------------------------------------------------------------
52514
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52515
+  (0.0ms) SAVEPOINT active_record_1
52516
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52517
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52518
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52519
+ Processing by ClarkKent::ReportsController#show as HTML
52520
+ Parameters: {"created_at_from"=>"2017-02-20", "created_at_until"=>"2017-02-21", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
52521
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
52522
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
52523
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52524
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52525
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
52526
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
52527
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52528
+ User Load (0.0ms) SELECT "users".* FROM "users"
52529
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.1ms)
52530
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
52531
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
52532
+  (0.2ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ?) subquery_for_count [["LIMIT", 10], ["OFFSET", 0]]
52533
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.5ms)
52534
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
52535
+ Order Load (0.1ms) SELECT "orders".* FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
52536
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52537
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52538
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52539
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.0ms)
52540
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (23.4ms)
52541
+ Completed 200 OK in 32ms (Views: 24.8ms | ActiveRecord: 1.5ms)
52542
+  (1.1ms) rollback transaction
52543
+  (0.2ms) begin transaction
52544
+ ----------------------------------------------------------------
52545
+ ClarkKent::ReportsControllerTest: test_0009_should update report
52546
+ ----------------------------------------------------------------
52547
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52548
+  (0.2ms) SAVEPOINT active_record_1
52549
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52550
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52551
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52552
+ Processing by ClarkKent::ReportsController#update as HTML
52553
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
52554
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52555
+  (0.2ms) SAVEPOINT active_record_1
52556
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-02-21 17:14:38 UTC], ["id", 1]]
52557
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52558
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.1ms)
52559
+ Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 0.5ms)
52560
+  (0.4ms) rollback transaction
52561
+  (0.1ms) begin transaction
52562
+ --------------------------------------------------------------------------------
52563
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
52564
+ --------------------------------------------------------------------------------
52565
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52566
+  (0.1ms) SAVEPOINT active_record_1
52567
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52568
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52569
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52570
+ Processing by ClarkKent::ReportsController#create as HTML
52571
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
52572
+  (0.0ms) SAVEPOINT active_record_1
52573
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
52574
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
52575
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
52576
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52577
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (43.7ms)
52578
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (47.8ms)
52579
+ Completed 409 Conflict in 57ms (Views: 51.8ms | ActiveRecord: 0.3ms)
52580
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
52581
+  (0.5ms) rollback transaction
52582
+  (0.1ms) begin transaction
52583
+ ------------------------------------------------------------
52584
+ ClarkKent::ReportsControllerTest: test_0001_should get index
52585
+ ------------------------------------------------------------
52586
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52587
+  (0.1ms) SAVEPOINT active_record_1
52588
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52589
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52590
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52591
+ Processing by ClarkKent::ReportsController#index as HTML
52592
+ Parameters: {"current_user_id"=>"1"}
52593
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
52594
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
52595
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "User"], ["LIMIT", 1]]
52596
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52597
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["LIMIT", 1]]
52598
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
52599
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
52600
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (10.3ms)
52601
+ Completed 200 OK in 15ms (Views: 11.8ms | ActiveRecord: 0.6ms)
52602
+  (0.6ms) rollback transaction
52603
+  (0.1ms) begin transaction
52604
+ ----------------------------------------------------------
52605
+ ClarkKent::ReportsControllerTest: test_0002_should get new
52606
+ ----------------------------------------------------------
52607
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52608
+  (0.0ms) SAVEPOINT active_record_1
52609
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52610
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52611
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52612
+ Processing by ClarkKent::ReportsController#new as HTML
52613
+ Parameters: {"current_user_id"=>"1"}
52614
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
52615
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
52616
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52617
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (33.1ms)
52618
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (33.6ms)
52619
+ Completed 200 OK in 37ms (Views: 36.0ms | ActiveRecord: 0.1ms)
52620
+  (0.4ms) rollback transaction
52621
+  (0.2ms) begin transaction
52622
+ --------------------------------------------------------------
52623
+ ClarkKent::ReportsControllerTest: test_0005_should show report
52624
+ --------------------------------------------------------------
52625
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52626
+  (0.0ms) SAVEPOINT active_record_1
52627
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52628
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52629
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52630
+ Processing by ClarkKent::ReportsController#show as HTML
52631
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
52632
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
52633
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
52634
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
52635
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52636
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52637
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52638
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.4ms)
52639
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52640
+ User Load (0.0ms) SELECT "users".* FROM "users"
52641
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.5ms)
52642
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
52643
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
52644
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (6.9ms)
52645
+ Completed 200 OK in 12ms (Views: 9.1ms | ActiveRecord: 0.5ms)
52646
+  (0.5ms) rollback transaction
52647
+  (0.1ms) begin transaction
52648
+ ----------------------------------------------------------------
52649
+ ClarkKent::ReportsControllerTest: test_0003_should create report
52650
+ ----------------------------------------------------------------
52651
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52652
+  (0.0ms) SAVEPOINT active_record_1
52653
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52654
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52655
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52656
+ Processing by ClarkKent::ReportsController#create as HTML
52657
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
52658
+  (0.0ms) SAVEPOINT active_record_1
52659
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52660
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52661
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
52662
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.0ms)
52663
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
52664
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.7ms)
52665
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52666
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.9ms)
52667
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
52668
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.7ms)
52669
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (8.3ms)
52670
+ Completed 200 OK in 13ms (Views: 10.3ms | ActiveRecord: 0.5ms)
52671
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
52672
+  (0.0ms) SAVEPOINT active_record_1
52673
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
52674
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52675
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
52676
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
52677
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52678
+  (0.4ms) rollback transaction
52679
+  (0.0ms) begin transaction
52680
+ ------------------------------------------------------------------------------------------------
52681
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
52682
+ ------------------------------------------------------------------------------------------------
52683
+  (0.0ms) SAVEPOINT active_record_1
52684
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
52685
+  (0.3ms) rollback transaction
52686
+  (0.1ms) begin transaction
52687
+ -----------------------------------------------------
52688
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
52689
+ -----------------------------------------------------
52690
+  (0.1ms) rollback transaction
52691
+  (0.1ms) begin transaction
52692
+ -------------------------
52693
+ ClarkKentTest: test_truth
52694
+ -------------------------
52695
+  (0.0ms) rollback transaction
52696
+  (0.0ms) begin transaction
52697
+ --------------------------------------------------------------------------
52698
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
52699
+ --------------------------------------------------------------------------
52700
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52701
+  (0.0ms) SAVEPOINT active_record_1
52702
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52703
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52704
+  (0.1ms) rollback transaction
52705
+  (0.0ms) begin transaction
52706
+ ---------------------------------------------------------------------------------------
52707
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
52708
+ ---------------------------------------------------------------------------------------
52709
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52710
+  (0.1ms) SAVEPOINT active_record_1
52711
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52712
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52713
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52714
+  (0.0ms) SAVEPOINT active_record_1
52715
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52716
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52717
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
52718
+ Parameters: {"id"=>"1"}
52719
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52720
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52721
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52722
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (5.2ms)
52723
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (15.2ms)
52724
+ Completed 200 OK in 22ms (Views: 18.2ms | ActiveRecord: 0.3ms)
52725
+  (0.5ms) rollback transaction
52726
+  (0.1ms) begin transaction
52727
+ ------------------------------------------------------------------------------------------
52728
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
52729
+ ------------------------------------------------------------------------------------------
52730
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52731
+  (0.1ms) SAVEPOINT active_record_1
52732
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52733
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52734
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52735
+  (0.0ms) SAVEPOINT active_record_1
52736
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52737
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52738
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
52739
+ Parameters: {"id"=>"1"}
52740
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52741
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52742
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52743
+ User Load (0.0ms) SELECT "users".* FROM "users"
52744
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (3.2ms)
52745
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (11.7ms)
52746
+ Completed 200 OK in 14ms (Views: 12.0ms | ActiveRecord: 0.2ms)
52747
+  (0.5ms) rollback transaction
52748
+  (0.1ms) begin transaction
52749
+ ------------------------------------------------------------------------------------------
52750
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
52751
+ ------------------------------------------------------------------------------------------
52752
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52753
+  (0.1ms) SAVEPOINT active_record_1
52754
+ SQL (0.6ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52755
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52756
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52757
+  (0.6ms) SAVEPOINT active_record_1
52758
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52759
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52760
+ Processing by ClarkKent::ReportFiltersController#show as HTML
52761
+ Parameters: {"id"=>"1"}
52762
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52763
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52764
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52765
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52766
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (1.4ms)
52767
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (6.5ms)
52768
+ Completed 200 OK in 18ms (Views: 9.3ms | ActiveRecord: 0.3ms)
52769
+  (0.5ms) rollback transaction
52770
+  (0.1ms) begin transaction
52771
+ -----------------------------------------------------------------------------------------
52772
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
52773
+ -----------------------------------------------------------------------------------------
52774
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52775
+  (0.1ms) SAVEPOINT active_record_1
52776
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52777
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52778
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52779
+  (0.1ms) SAVEPOINT active_record_1
52780
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52781
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52782
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
52783
+ Parameters: {"id"=>"1"}
52784
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52785
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52786
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52787
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.4ms)
52788
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (10.1ms)
52789
+ Completed 200 OK in 14ms (Views: 10.5ms | ActiveRecord: 0.2ms)
52790
+  (0.6ms) rollback transaction
52791
+  (0.1ms) begin transaction
52792
+ ----------------------------------------------------------------------------------
52793
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
52794
+ ----------------------------------------------------------------------------------
52795
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52796
+  (0.0ms) SAVEPOINT active_record_1
52797
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52798
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52799
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52800
+ Processing by ClarkKent::ReportFiltersController#create as HTML
52801
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
52802
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52803
+  (0.1ms) SAVEPOINT active_record_1
52804
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52805
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52806
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52807
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.3ms)
52808
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.6ms)
52809
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (6.4ms)
52810
+ Completed 200 OK in 14ms (Views: 9.6ms | ActiveRecord: 0.4ms)
52811
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
52812
+  (0.5ms) rollback transaction
52813
+  (0.1ms) begin transaction
52814
+ ---------------------------------------------------------------------------------------
52815
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
52816
+ ---------------------------------------------------------------------------------------
52817
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52818
+  (0.0ms) SAVEPOINT active_record_1
52819
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52820
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52821
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52822
+  (0.0ms) SAVEPOINT active_record_1
52823
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52824
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52825
+ Processing by ClarkKent::ReportFiltersController#show as HTML
52826
+ Parameters: {"id"=>"1"}
52827
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52828
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52829
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52830
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
52831
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.1ms)
52832
+ Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.2ms)
52833
+  (0.5ms) rollback transaction
52834
+  (0.1ms) begin transaction
52835
+ -----------------------------------------------------------------------------------------
52836
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
52837
+ -----------------------------------------------------------------------------------------
52838
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52839
+  (0.1ms) SAVEPOINT active_record_1
52840
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52841
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52842
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52843
+  (0.0ms) SAVEPOINT active_record_1
52844
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52845
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52846
+ Processing by ClarkKent::ReportFiltersController#show as HTML
52847
+ Parameters: {"id"=>"1"}
52848
+ ClarkKent::ReportFilter Load (0.4ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52849
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52850
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52851
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.4ms)
52852
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.2ms)
52853
+ Completed 200 OK in 9ms (Views: 5.5ms | ActiveRecord: 0.5ms)
52854
+  (0.7ms) rollback transaction
52855
+  (0.1ms) begin transaction
52856
+ -------------------------------------------------------------------------------------
52857
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
52858
+ -------------------------------------------------------------------------------------
52859
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52860
+  (0.1ms) SAVEPOINT active_record_1
52861
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52862
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52863
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52864
+ Processing by ClarkKent::ReportFiltersController#create as HTML
52865
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
52866
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52867
+  (0.0ms) SAVEPOINT active_record_1
52868
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52869
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52870
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52871
+ User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52872
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.9ms)
52873
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (3.4ms)
52874
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (3.6ms)
52875
+ Completed 200 OK in 8ms (Views: 3.4ms | ActiveRecord: 0.8ms)
52876
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
52877
+  (0.5ms) rollback transaction
52878
+  (0.1ms) begin transaction
52879
+ -----------------------------------------------------------------------------
52880
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
52881
+ -----------------------------------------------------------------------------
52882
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52883
+  (0.1ms) SAVEPOINT active_record_1
52884
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
52885
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52886
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
52887
+ Processing by ClarkKent::ReportFiltersController#create as HTML
52888
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
52889
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52890
+  (0.0ms) SAVEPOINT active_record_1
52891
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52892
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52893
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52894
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.0ms)
52895
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.4ms)
52896
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.6ms)
52897
+ Completed 200 OK in 8ms (Views: 3.3ms | ActiveRecord: 0.4ms)
52898
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
52899
+  (0.6ms) rollback transaction
52900
+  (0.1ms) begin transaction
52901
+ ---------------------------------------------------
52902
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
52903
+ ---------------------------------------------------
52904
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
52905
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52906
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
52907
+  (0.0ms) SAVEPOINT active_record_1
52908
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
52909
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52910
+  (0.0ms) SAVEPOINT active_record_1
52911
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-02-21 17:14:38 UTC], ["updated_at", 2017-02-21 17:14:38 UTC]]
52912
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52913
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52914
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52915
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52916
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52917
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52918
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
52919
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52920
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
52921
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52922
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52923
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52924
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52925
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
52926
+  (1.1ms) rollback transaction
52927
+  (0.2ms) begin transaction
52928
+ -----------------------------------------------------------------------------------------
52929
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
52930
+ -----------------------------------------------------------------------------------------
52931
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
52932
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
52933
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
52934
+  (0.0ms) SAVEPOINT active_record_1
52935
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
52936
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52937
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52938
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52939
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52940
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52941
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52942
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
52943
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
52944
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
52945
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52946
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
52947
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52948
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
52949
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
52950
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (0.5ms)
52951
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 154.6ms
52952
+ Sent mail to taproot@gmail.com (4.7ms)
52953
+ Date: Tue, 21 Feb 2017 10:14:39 -0700
52954
+ From: reservations@invitedhome.com
52955
+ To: taproot@gmail.com
52956
+ Message-ID: <58ac757f2c0c9_88ad3fd33143fa14975f4@Erics-MacBook-Pro.local.mail>
52957
+ Subject: Your report has a problem
52958
+ Mime-Version: 1.0
52959
+ Content-Type: text/html;
52960
+ charset=UTF-8
52961
+ Content-Transfer-Encoding: 7bit
52962
+
52963
+ Your report could not be created due to the following problem:
52964
+ <strong>At least one date range is required.</strong>
52965
+  (1.2ms) rollback transaction
52966
+  (0.1ms) begin transaction
52967
+ --------------------------------------------------------------------------
52968
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
52969
+ --------------------------------------------------------------------------
52970
+  (0.0ms) SAVEPOINT active_record_1
52971
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-21 17:14:39 UTC], ["updated_at", 2017-02-21 17:14:39 UTC]]
52972
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52973
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52974
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
52975
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
52976
+  (0.5ms) rollback transaction
52977
+  (0.1ms) begin transaction
52978
+ --------------------------------------------------------------------------
52979
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
52980
+ --------------------------------------------------------------------------
52981
+  (0.0ms) SAVEPOINT active_record_1
52982
+ SQL (0.5ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-21 17:14:39 UTC], ["updated_at", 2017-02-21 17:14:39 UTC]]
52983
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52984
+  (0.1ms) SAVEPOINT active_record_1
52985
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
52986
+  (0.1ms) RELEASE SAVEPOINT active_record_1
52987
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52988
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
52989
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
52990
+  (0.4ms) rollback transaction
52991
+  (0.1ms) begin transaction
52992
+ ------------------------------------------------------------------------
52993
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
52994
+ ------------------------------------------------------------------------
52995
+  (0.0ms) SAVEPOINT active_record_1
52996
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-02-21 17:14:39 UTC], ["updated_at", 2017-02-21 17:14:39 UTC]]
52997
+  (0.0ms) RELEASE SAVEPOINT active_record_1
52998
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
52999
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
53000
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53001
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53002
+  (0.5ms) rollback transaction