clark_kent 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/clark_kent/report.rb +3 -3
- data/app/models/clark_kent/report_email.rb +1 -1
- data/lib/clark_kent/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +3674 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1dmI5Zo2mcXAfKVp6s6Y3ITZex2nf6M6ba87fZW3-HE.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/2VXuw1t1XOVi5kuVjvemRwSnlQWo0cZP_Ial5evYROc.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/5k7OtUEslUWi1MkCA5Kmc7rHAU0hWPFaSUcq7j8-doc.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/7cvHRyXeQa3tRwdNOGrBZHOjELOJ4kopXU9eCd4GvVE.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9xZnfP3LysRg28xPYEclacGlxgUrof8V_jYLmG4iJko.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/HuyKNAYEnPs4OFAHZ6YQZ3VSrTaxZe0Ra_fNZLbeXDw.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/IwcHpmWHtyrIj83pFTlHGdyK5GSO3M0FtJd09CB88uE.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/JbcAACpMmVlknG104wCtLY73aNeelGB5NNPiF4uDf5s.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Mcau95NHKdhNbIQcmeAMI9dpJu0QmBrXgYBMR7dosQI.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/O8akbUwAbmIKY-AhITimq-JDQ6IgsO3Hvq2v5etufFw.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UwMFS8rJmeOVTOPUAsy5rBsPqe-mwJgvTSCg-8xwSK8.cache +3 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/YyF0e1zDQF3_KsNy35VwTXCAZDObuR--UKKjiH9Ugs4.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/c0fZzpmetAbdlEG8jam5O6N3N3wiVzKXR_lCIY6kCTA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/gbQ-9rbnxd-XmF785qDyhZk5H-HJvNbffkuHrzAos-I.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/gfx6mgjf1Gygt3bclLKW8zeiMIdAUtlfAzmOraiAO0c.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hWadad6CRv-QW0lZ5DKckYD_umPsy2_WbigRqL3bjv0.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hj8Ir9wcVSy1KYrnWu9bpD24vDhCG3tvt-nKbNxb1Wg.cache +3 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/jQKNn92UMva5Q4nbPoJ_zjf7-gS2Z6_8IArZpjm90UA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oCsZTGZyV4kH8Y4OeSDUdrwfkJFPzTODZjuBKZB8oGQ.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/tPF6H9NRpGO3whu2y5_e_R_1EACKdCwu5437D83qJT0.cache +3 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/x1pNHYQUCVLQm2-2eBri2T7gxgLTBDez3d7ao8etFX4.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ye0s0eVe7TGf1M78y4llhk6PqlHaHZQIJ-_GeKxHvCE.cache +0 -0
- data/test/test_helper.rb +1 -0
- metadata +89 -3
data/test/dummy/log/test.log
CHANGED
@@ -24413,3 +24413,3677 @@ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing
|
|
24413
24413
|
------------------------------------------------------------------------------------------------
|
24414
24414
|
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24415
24415
|
[1m[35m (0.1ms)[0m rollback transaction
|
24416
|
+
[1m[36m (1.1ms)[0m [1mCREATE 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) [0m
|
24417
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
24418
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
24419
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
|
24420
|
+
[1m[36m (1.0ms)[0m [1mCREATE 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) [0m
|
24421
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
24422
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
24423
|
+
FROM sqlite_master
|
24424
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
24425
|
+
UNION ALL
|
24426
|
+
SELECT sql
|
24427
|
+
FROM sqlite_temp_master
|
24428
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
24429
|
+
[0m
|
24430
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
24431
|
+
[1m[36m (0.9ms)[0m [1mCREATE 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) [0m
|
24432
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
24433
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
24434
|
+
FROM sqlite_master
|
24435
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
24436
|
+
UNION ALL
|
24437
|
+
SELECT sql
|
24438
|
+
FROM sqlite_temp_master
|
24439
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
24440
|
+
[0m
|
24441
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
24442
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
24443
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
|
24444
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
24445
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
|
24446
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
24447
|
+
[1m[35m (1.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
24448
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
24449
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
24450
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
24451
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
24452
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
24453
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
24454
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
24455
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24456
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["resource_type", "Order"], ["created_at", "2015-10-05 16:17:31.429145"], ["updated_at", "2015-10-05 16:17:31.429145"]]
|
24457
|
+
[1m[35m (0.7ms)[0m commit transaction
|
24458
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24459
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
24460
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24461
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24462
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
24463
|
+
[1m[35m (0.8ms)[0m commit transaction
|
24464
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24465
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
24466
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24467
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24468
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
24469
|
+
[1m[35m (0.7ms)[0m commit transaction
|
24470
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24471
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
24472
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24473
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24474
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?)[0m [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
|
24475
|
+
[1m[35m (0.6ms)[0m commit transaction
|
24476
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24477
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2015-10-05 16:17:31.483252"], ["updated_at", "2015-10-05 16:17:31.483252"]]
|
24478
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
24479
|
+
-------------------------------------------------------------------
|
24480
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
24481
|
+
-------------------------------------------------------------------
|
24482
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24483
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["name", "test one"], ["resource_type", "Order"], ["created_at", "2015-10-05 16:17:31.536557"], ["updated_at", "2015-10-05 16:17:31.536557"]]
|
24484
|
+
[1m[35m (0.8ms)[0m commit transaction
|
24485
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
24486
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m 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"]]
|
24487
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 2]]
|
24488
|
+
---------------------------------------------------------------------
|
24489
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
24490
|
+
---------------------------------------------------------------------
|
24491
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24492
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", "2015-10-05 16:17:31.548046"], ["updated_at", "2015-10-05 16:17:31.548046"]]
|
24493
|
+
[1m[35m (0.7ms)[0m commit transaction
|
24494
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
24495
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 3], ["filterable_type", "ClarkKent::Report"]]
|
24496
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 3]]
|
24497
|
+
------------------------------------------------------------------------------------------------
|
24498
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
24499
|
+
------------------------------------------------------------------------------------------------
|
24500
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24501
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
24502
|
+
-------------------------
|
24503
|
+
ClarkKentTest: test_truth
|
24504
|
+
-------------------------
|
24505
|
+
---------------------------------------------------
|
24506
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
24507
|
+
---------------------------------------------------
|
24508
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
|
24509
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24510
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
|
24511
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24512
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
24513
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24514
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24515
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("type", "filter_name", "duration", "kind_of_day", "offset", "filterable_id", "filterable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["type", "ClarkKent::ReportDateFilter"], ["filter_name", "created_at"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["created_at", "2015-10-05 16:17:31.607771"], ["updated_at", "2015-10-05 16:17:31.607771"]]
|
24516
|
+
[1m[35m (0.7ms)[0m commit transaction
|
24517
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
24518
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24519
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
24520
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
24521
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
24522
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24523
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
24524
|
+
-----------------------------------------------------------------------------------------
|
24525
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
24526
|
+
-----------------------------------------------------------------------------------------
|
24527
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
|
24528
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24529
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
|
24530
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24531
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
24532
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24533
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
24534
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
24535
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
24536
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 2]]
|
24537
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
24538
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
24539
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 2]]
|
24540
|
+
-----------------------------------------------------------
|
24541
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
24542
|
+
-----------------------------------------------------------
|
24543
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24544
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24545
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
24546
|
+
------------------------------------------------------------
|
24547
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
24548
|
+
------------------------------------------------------------
|
24549
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
24550
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
24551
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24552
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["name", "delete me"], ["resource_type", "Order"], ["created_at", "2015-10-05 16:17:31.700648"], ["updated_at", "2015-10-05 16:17:31.700648"]]
|
24553
|
+
[1m[35m (0.6ms)[0m commit transaction
|
24554
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
24555
|
+
------------------------------------------------------
|
24556
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
24557
|
+
------------------------------------------------------
|
24558
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
24559
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
24560
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
24561
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
24562
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (4.7ms)
|
24563
|
+
Completed 500 Internal Server Error in 17ms (ActiveRecord: 0.0ms)
|
24564
|
+
-------------------------------------------------------
|
24565
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
24566
|
+
-------------------------------------------------------
|
24567
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
24568
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
24569
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
24570
|
+
Parameters: {"current_user_id"=>"1"}
|
24571
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
|
24572
|
+
[1m[36mClarkKent::Report Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
24573
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
24574
|
+
[1m[36mClarkKent::Report Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
24575
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
24576
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
24577
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
24578
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (13.0ms)
|
24579
|
+
Completed 200 OK in 576ms (Views: 574.5ms | ActiveRecord: 0.8ms)
|
24580
|
+
-----------------------------------------------------
|
24581
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
24582
|
+
-----------------------------------------------------
|
24583
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24584
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24585
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
24586
|
+
Parameters: {"current_user_id"=>"1"}
|
24587
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (4.1ms)
|
24588
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (9.2ms)
|
24589
|
+
Completed 500 Internal Server Error in 12ms (ActiveRecord: 0.0ms)
|
24590
|
+
---------------------------------------------------------
|
24591
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
24592
|
+
---------------------------------------------------------
|
24593
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24594
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24595
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
24596
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
24597
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (2.9ms)
|
24598
|
+
Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.0ms)
|
24599
|
+
-----------------------------------------------------------------
|
24600
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
24601
|
+
-----------------------------------------------------------------
|
24602
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24603
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24604
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
24605
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
24606
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (2.1ms)
|
24607
|
+
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)
|
24608
|
+
--------------------------------------------------------------------
|
24609
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
24610
|
+
--------------------------------------------------------------------
|
24611
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24612
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24613
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
24614
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
24615
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (2.0ms)
|
24616
|
+
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.0ms)
|
24617
|
+
-----------------------------------------------------------
|
24618
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
24619
|
+
-----------------------------------------------------------
|
24620
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24621
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24622
|
+
[1m[36m (2.0ms)[0m [1mCREATE 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) [0m
|
24623
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
24624
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
24625
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
|
24626
|
+
[1m[36m (1.0ms)[0m [1mCREATE 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) [0m
|
24627
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
24628
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
24629
|
+
FROM sqlite_master
|
24630
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
24631
|
+
UNION ALL
|
24632
|
+
SELECT sql
|
24633
|
+
FROM sqlite_temp_master
|
24634
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
24635
|
+
[0m
|
24636
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
24637
|
+
[1m[36m (0.9ms)[0m [1mCREATE 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) [0m
|
24638
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
24639
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
24640
|
+
FROM sqlite_master
|
24641
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
24642
|
+
UNION ALL
|
24643
|
+
SELECT sql
|
24644
|
+
FROM sqlite_temp_master
|
24645
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
24646
|
+
[0m
|
24647
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
24648
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
24649
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
|
24650
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
24651
|
+
[1m[35m (11.1ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
|
24652
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
24653
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
24654
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
24655
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
24656
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
24657
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
24658
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
24659
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
24660
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
24661
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24662
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["resource_type", "Order"], ["created_at", "2015-10-05 16:26:32.058334"], ["updated_at", "2015-10-05 16:26:32.058334"]]
|
24663
|
+
[1m[35m (1.0ms)[0m commit transaction
|
24664
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24665
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
24666
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
24667
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24668
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
24669
|
+
[1m[35m (0.9ms)[0m commit transaction
|
24670
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24671
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
24672
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
24673
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24674
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
24675
|
+
[1m[35m (0.7ms)[0m commit transaction
|
24676
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24677
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
24678
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
24679
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24680
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?)[0m [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
|
24681
|
+
[1m[35m (0.8ms)[0m commit transaction
|
24682
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24683
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2015-10-05 16:26:32.111511"], ["updated_at", "2015-10-05 16:26:32.111511"]]
|
24684
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
24685
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
24686
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
24687
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
24688
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
24689
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
24690
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
24691
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
24692
|
+
FROM sqlite_master
|
24693
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
24694
|
+
UNION ALL
|
24695
|
+
SELECT sql
|
24696
|
+
FROM sqlite_temp_master
|
24697
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
24698
|
+
[0m
|
24699
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
24700
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
24701
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
24702
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
24703
|
+
FROM sqlite_master
|
24704
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
24705
|
+
UNION ALL
|
24706
|
+
SELECT sql
|
24707
|
+
FROM sqlite_temp_master
|
24708
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
24709
|
+
[0m
|
24710
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
24711
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
24712
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
24713
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
24714
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
24715
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
24716
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
24717
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
24718
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
24719
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
24720
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
24721
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
24722
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
24723
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
24724
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24725
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 16:28:35.159464"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:28:35.159464"]]
|
24726
|
+
[1m[35m (0.7ms)[0m commit transaction
|
24727
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24728
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
24729
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24730
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24731
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
24732
|
+
[1m[35m (0.7ms)[0m commit transaction
|
24733
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24734
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
24735
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
24736
|
+
[1m[35m (0.2ms)[0m begin transaction
|
24737
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
24738
|
+
[1m[35m (0.8ms)[0m commit transaction
|
24739
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24740
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
24741
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24742
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24743
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
24744
|
+
[1m[35m (1.0ms)[0m commit transaction
|
24745
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24746
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 16:28:35.216054"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 16:28:35.216054"], ["user_id", 1]]
|
24747
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
24748
|
+
-----------------------------------------------------------
|
24749
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
24750
|
+
-----------------------------------------------------------
|
24751
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
24752
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
24753
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
24754
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
24755
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
24756
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24757
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:28:35.272242"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:28:35.272242"]]
|
24758
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24759
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.5ms)
|
24760
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24761
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (4.7ms)
|
24762
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
24763
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.0ms)
|
24764
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
24765
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (8.1ms)
|
24766
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (32.5ms)
|
24767
|
+
Completed 200 OK in 185ms (Views: 181.8ms | ActiveRecord: 1.8ms)
|
24768
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
24769
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
24770
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24771
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24772
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
24773
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
24774
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 2]]
|
24775
|
+
[1m[35m (1.3ms)[0m commit transaction
|
24776
|
+
------------------------------------------------------------
|
24777
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
24778
|
+
------------------------------------------------------------
|
24779
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24780
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24781
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24782
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:28:35.465794"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:28:35.465794"]]
|
24783
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
24784
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
24785
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
24786
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
24787
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 3]]
|
24788
|
+
[1m[35m (0.0ms)[0m begin transaction
|
24789
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
24790
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m 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", 3]]
|
24791
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 3]]
|
24792
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 3]]
|
24793
|
+
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
24794
|
+
Redirected to http://test.host/reports/reports
|
24795
|
+
Completed 302 Found in 4ms (ActiveRecord: 1.1ms)
|
24796
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
24797
|
+
------------------------------------------------------
|
24798
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
24799
|
+
------------------------------------------------------
|
24800
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24801
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24802
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
24803
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
24804
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
24805
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.8ms)
|
24806
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24807
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.1ms)
|
24808
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
24809
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
|
24810
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (5.5ms)
|
24811
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
24812
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
24813
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
24814
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
24815
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
24816
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
24817
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (10.9ms)
|
24818
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
24819
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.1ms)
|
24820
|
+
Completed 200 OK in 18ms (Views: 16.9ms | ActiveRecord: 0.3ms)
|
24821
|
+
-------------------------------------------------------
|
24822
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
24823
|
+
-------------------------------------------------------
|
24824
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24825
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24826
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
24827
|
+
Parameters: {"current_user_id"=>"1"}
|
24828
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
24829
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
24830
|
+
[1m[36mDepartment Load (0.3ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
24831
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
24832
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
24833
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
24834
|
+
Completed 200 OK in 20ms (Views: 18.6ms | ActiveRecord: 1.0ms)
|
24835
|
+
-----------------------------------------------------
|
24836
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
24837
|
+
-----------------------------------------------------
|
24838
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24839
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24840
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
24841
|
+
Parameters: {"current_user_id"=>"1"}
|
24842
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
24843
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
24844
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (39.2ms)
|
24845
|
+
Completed 200 OK in 46ms (Views: 45.4ms | ActiveRecord: 0.3ms)
|
24846
|
+
---------------------------------------------------------
|
24847
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
24848
|
+
---------------------------------------------------------
|
24849
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24850
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24851
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
24852
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
24853
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24854
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
24855
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
24856
|
+
[1m[35m (0.1ms)[0m 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"]]
|
24857
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
24858
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.7ms)
|
24859
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24860
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
24861
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.3ms)
|
24862
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
|
24863
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.4ms)
|
24864
|
+
Completed 200 OK in 23ms (Views: 18.9ms | ActiveRecord: 0.9ms)
|
24865
|
+
-----------------------------------------------------------------
|
24866
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
24867
|
+
-----------------------------------------------------------------
|
24868
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
24869
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
24870
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
24871
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
24872
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
24873
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
24874
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24875
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
24876
|
+
[1m[35m (0.1ms)[0m 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"]]
|
24877
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
24878
|
+
[1m[35m (0.1ms)[0m 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"]]
|
24879
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
24880
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
24881
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users"
|
24882
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.6ms)
|
24883
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.2ms)
|
24884
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)[0m
|
24885
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0) subquery_for_count
|
24886
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.5ms)
|
24887
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
24888
|
+
[1m[35mOrder Load (0.1ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
24889
|
+
(SELECT u.name
|
24890
|
+
FROM users u
|
24891
|
+
WHERE u.id = orders.user_id)
|
24892
|
+
as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
|
24893
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
24894
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
24895
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
24896
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
24897
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.2ms)
|
24898
|
+
Completed 200 OK in 29ms (Views: 23.5ms | ActiveRecord: 2.0ms)
|
24899
|
+
--------------------------------------------------------------------
|
24900
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
24901
|
+
--------------------------------------------------------------------
|
24902
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24903
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24904
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
24905
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
24906
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24907
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
24908
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
24909
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
24910
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
24911
|
+
[1m[35m (0.1ms)[0m 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"]]
|
24912
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
24913
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
24914
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
24915
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
24916
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
24917
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
24918
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
24919
|
+
Completed 200 OK in 10ms (Views: 5.1ms | ActiveRecord: 1.0ms)
|
24920
|
+
-----------------------------------------------------------
|
24921
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
24922
|
+
-----------------------------------------------------------
|
24923
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
24924
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
24925
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
24926
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
24927
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
24928
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24929
|
+
[1m[35m (0.0ms)[0m commit transaction
|
24930
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.8ms)
|
24931
|
+
Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.2ms)
|
24932
|
+
-------------------------
|
24933
|
+
ClarkKentTest: test_truth
|
24934
|
+
-------------------------
|
24935
|
+
-------------------------------------------------------------------
|
24936
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
24937
|
+
-------------------------------------------------------------------
|
24938
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24939
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:28:35.644304"], ["name", "test one"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:28:35.644304"]]
|
24940
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
24941
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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", 4]]
|
24942
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 4], ["filterable_type", "ClarkKent::Report"]]
|
24943
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 4]]
|
24944
|
+
---------------------------------------------------------------------
|
24945
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
24946
|
+
---------------------------------------------------------------------
|
24947
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24948
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:28:35.649137"], ["name", "test one"], ["resource_type", "TestReportable"], ["updated_at", "2015-10-05 16:28:35.649137"]]
|
24949
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
24950
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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", 5]]
|
24951
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 5], ["filterable_type", "ClarkKent::Report"]]
|
24952
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 5]]
|
24953
|
+
------------------------------------------------------------------------------------------------
|
24954
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
24955
|
+
------------------------------------------------------------------------------------------------
|
24956
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24957
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
24958
|
+
---------------------------------------------------
|
24959
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
24960
|
+
---------------------------------------------------
|
24961
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
24962
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
24963
|
+
[1m[36mSQL (0.9ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
24964
|
+
[1m[35m (0.1ms)[0m begin transaction
|
24965
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
24966
|
+
[1m[35m (0.6ms)[0m commit transaction
|
24967
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
24968
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-10-05 16:28:35.676509"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 16:28:35.676509"]]
|
24969
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
24970
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
24971
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
24972
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24973
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
24974
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
24975
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
24976
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24977
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
24978
|
+
-----------------------------------------------------------------------------------------
|
24979
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
24980
|
+
-----------------------------------------------------------------------------------------
|
24981
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
24982
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
24983
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
24984
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24985
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
24986
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
24987
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
24988
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
24989
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
24990
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
24991
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 2]]
|
24992
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
24993
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
24994
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
24995
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
24996
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
24997
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
24998
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
24999
|
+
FROM sqlite_master
|
25000
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
25001
|
+
UNION ALL
|
25002
|
+
SELECT sql
|
25003
|
+
FROM sqlite_temp_master
|
25004
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
25005
|
+
[0m
|
25006
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
25007
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
25008
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
25009
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
25010
|
+
FROM sqlite_master
|
25011
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
25012
|
+
UNION ALL
|
25013
|
+
SELECT sql
|
25014
|
+
FROM sqlite_temp_master
|
25015
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
25016
|
+
[0m
|
25017
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
25018
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
25019
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
25020
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
25021
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
25022
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
25023
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
25024
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
25025
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
25026
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
25027
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
25028
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
25029
|
+
[1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
25030
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
25031
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25032
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 16:29:52.445897"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:29:52.445897"]]
|
25033
|
+
[1m[35m (1.1ms)[0m commit transaction
|
25034
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25035
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
25036
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
25037
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25038
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
25039
|
+
[1m[35m (0.9ms)[0m commit transaction
|
25040
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25041
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
25042
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25043
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25044
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
25045
|
+
[1m[35m (0.6ms)[0m commit transaction
|
25046
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25047
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
25048
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25049
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25050
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
25051
|
+
[1m[35m (1.0ms)[0m commit transaction
|
25052
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25053
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 16:29:52.506109"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 16:29:52.506109"], ["user_id", 1]]
|
25054
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
25055
|
+
------------------------------------------------------------------------------------------------
|
25056
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
25057
|
+
------------------------------------------------------------------------------------------------
|
25058
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25059
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
25060
|
+
-----------------------------------------------------------
|
25061
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
25062
|
+
-----------------------------------------------------------
|
25063
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25064
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25065
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
25066
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
25067
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
25068
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25069
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:29:52.571191"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:29:52.571191"]]
|
25070
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
25071
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.2ms)
|
25072
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m 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"]]
|
25073
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (4.5ms)
|
25074
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
25075
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.8ms)
|
25076
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
25077
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (8.5ms)
|
25078
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (31.2ms)
|
25079
|
+
Completed 200 OK in 188ms (Views: 183.8ms | ActiveRecord: 1.9ms)
|
25080
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
25081
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
25082
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25083
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25084
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
25085
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
25086
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 2]]
|
25087
|
+
[1m[35m (1.4ms)[0m commit transaction
|
25088
|
+
------------------------------------------------------------
|
25089
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
25090
|
+
------------------------------------------------------------
|
25091
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25092
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25093
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25094
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:29:52.767323"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:29:52.767323"]]
|
25095
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25096
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
25097
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
25098
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
25099
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 3]]
|
25100
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25101
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
25102
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m 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", 3]]
|
25103
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 3]]
|
25104
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 3]]
|
25105
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25106
|
+
Redirected to http://test.host/reports/reports
|
25107
|
+
Completed 302 Found in 4ms (ActiveRecord: 1.2ms)
|
25108
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
25109
|
+
------------------------------------------------------
|
25110
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
25111
|
+
------------------------------------------------------
|
25112
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25113
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25114
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
25115
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
25116
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25117
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.7ms)
|
25118
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25119
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.1ms)
|
25120
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
25121
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.7ms)
|
25122
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.1ms)
|
25123
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
25124
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
25125
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
25126
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
25127
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
25128
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
25129
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (7.6ms)
|
25130
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
25131
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (0.9ms)
|
25132
|
+
Completed 200 OK in 14ms (Views: 12.5ms | ActiveRecord: 0.3ms)
|
25133
|
+
-------------------------------------------------------
|
25134
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
25135
|
+
-------------------------------------------------------
|
25136
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25137
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25138
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
25139
|
+
Parameters: {"current_user_id"=>"1"}
|
25140
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
25141
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
25142
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
25143
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
25144
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
25145
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
25146
|
+
Completed 200 OK in 17ms (Views: 16.0ms | ActiveRecord: 0.7ms)
|
25147
|
+
-----------------------------------------------------
|
25148
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
25149
|
+
-----------------------------------------------------
|
25150
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25151
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25152
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
25153
|
+
Parameters: {"current_user_id"=>"1"}
|
25154
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
25155
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25156
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (33.9ms)
|
25157
|
+
Completed 200 OK in 41ms (Views: 40.0ms | ActiveRecord: 0.2ms)
|
25158
|
+
---------------------------------------------------------
|
25159
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
25160
|
+
---------------------------------------------------------
|
25161
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25162
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25163
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25164
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
25165
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25166
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
25167
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25168
|
+
[1m[35m (0.1ms)[0m 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"]]
|
25169
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25170
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.7ms)
|
25171
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25172
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
25173
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
|
25174
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
|
25175
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.4ms)
|
25176
|
+
Completed 200 OK in 24ms (Views: 18.0ms | ActiveRecord: 1.0ms)
|
25177
|
+
-----------------------------------------------------------------
|
25178
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
25179
|
+
-----------------------------------------------------------------
|
25180
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25181
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25182
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25183
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
25184
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25185
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
25186
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25187
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
25188
|
+
[1m[35m (0.1ms)[0m 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"]]
|
25189
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25190
|
+
[1m[35m (0.1ms)[0m 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"]]
|
25191
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
25192
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25193
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
25194
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
|
25195
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
25196
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)[0m
|
25197
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0) subquery_for_count
|
25198
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.7ms)
|
25199
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
25200
|
+
[1m[35mOrder Load (0.1ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
25201
|
+
(SELECT u.name
|
25202
|
+
FROM users u
|
25203
|
+
WHERE u.id = orders.user_id)
|
25204
|
+
as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
|
25205
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25206
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25207
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25208
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25209
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (0.7ms)
|
25210
|
+
Completed 200 OK in 25ms (Views: 19.7ms | ActiveRecord: 1.9ms)
|
25211
|
+
--------------------------------------------------------------------
|
25212
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
25213
|
+
--------------------------------------------------------------------
|
25214
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25215
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25216
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25217
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
25218
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25219
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
25220
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25221
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
25222
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25223
|
+
[1m[35m (0.1ms)[0m 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"]]
|
25224
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25225
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
25226
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25227
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
25228
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
25229
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
25230
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
25231
|
+
Completed 200 OK in 9ms (Views: 5.2ms | ActiveRecord: 0.8ms)
|
25232
|
+
-----------------------------------------------------------
|
25233
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
25234
|
+
-----------------------------------------------------------
|
25235
|
+
[1m[35mClarkKent::Report Load (0.3ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25236
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25237
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
25238
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
25239
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25240
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25241
|
+
[1m[35m (0.0ms)[0m commit transaction
|
25242
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.9ms)
|
25243
|
+
Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.2ms)
|
25244
|
+
-------------------------------------------------------------------
|
25245
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
25246
|
+
-------------------------------------------------------------------
|
25247
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25248
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:29:52.931383"], ["name", "test one"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:29:52.931383"]]
|
25249
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
25250
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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", 4]]
|
25251
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 4], ["filterable_type", "ClarkKent::Report"]]
|
25252
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 4]]
|
25253
|
+
---------------------------------------------------------------------
|
25254
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
25255
|
+
---------------------------------------------------------------------
|
25256
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25257
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:29:52.937263"], ["name", "test one"], ["resource_type", "TestReportable"], ["updated_at", "2015-10-05 16:29:52.937263"]]
|
25258
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25259
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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", 5]]
|
25260
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 5], ["filterable_type", "ClarkKent::Report"]]
|
25261
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 5]]
|
25262
|
+
-------------------------
|
25263
|
+
ClarkKentTest: test_truth
|
25264
|
+
-------------------------
|
25265
|
+
---------------------------------------------------
|
25266
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
25267
|
+
---------------------------------------------------
|
25268
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
25269
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25270
|
+
[1m[36mSQL (0.9ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
25271
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25272
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
25273
|
+
[1m[35m (0.7ms)[0m commit transaction
|
25274
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25275
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-10-05 16:29:52.964122"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 16:29:52.964122"]]
|
25276
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
25277
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
25278
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25279
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25280
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
25281
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25282
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
25283
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25284
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
25285
|
+
-----------------------------------------------------------------------------------------
|
25286
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
25287
|
+
-----------------------------------------------------------------------------------------
|
25288
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
25289
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25290
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
25291
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
25292
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
25293
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
25294
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
25295
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25296
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25297
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
25298
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 2]]
|
25299
|
+
[1m[36m (1.1ms)[0m [1mCREATE 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) [0m
|
25300
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
25301
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
25302
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
|
25303
|
+
[1m[36m (1.0ms)[0m [1mCREATE 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) [0m
|
25304
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
25305
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
25306
|
+
FROM sqlite_master
|
25307
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
25308
|
+
UNION ALL
|
25309
|
+
SELECT sql
|
25310
|
+
FROM sqlite_temp_master
|
25311
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
25312
|
+
[0m
|
25313
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
25314
|
+
[1m[36m (1.1ms)[0m [1mCREATE 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) [0m
|
25315
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
25316
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
25317
|
+
FROM sqlite_master
|
25318
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
25319
|
+
UNION ALL
|
25320
|
+
SELECT sql
|
25321
|
+
FROM sqlite_temp_master
|
25322
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
25323
|
+
[0m
|
25324
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
25325
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
25326
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
|
25327
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime) [0m
|
25328
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
|
25329
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
25330
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
25331
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
25332
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
25333
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
25334
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
25335
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
25336
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
25337
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
25338
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25339
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["resource_type", "Order"], ["created_at", "2015-10-05 16:38:49.454713"], ["updated_at", "2015-10-05 16:38:49.454713"]]
|
25340
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25341
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25342
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
25343
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
25344
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25345
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
25346
|
+
[1m[35m (0.6ms)[0m commit transaction
|
25347
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25348
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
25349
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25350
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25351
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
25352
|
+
[1m[35m (0.7ms)[0m commit transaction
|
25353
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25354
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
25355
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25356
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25357
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?)[0m [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
|
25358
|
+
[1m[35m (0.7ms)[0m commit transaction
|
25359
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25360
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2015-10-05 16:38:49.501328"], ["updated_at", "2015-10-05 16:38:49.501328"]]
|
25361
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25362
|
+
-------------------------
|
25363
|
+
ClarkKentTest: test_truth
|
25364
|
+
-------------------------
|
25365
|
+
-------------------------------------------------------------------
|
25366
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
25367
|
+
-------------------------------------------------------------------
|
25368
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25369
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["name", "test one"], ["resource_type", "Order"], ["created_at", "2015-10-05 16:38:49.562955"], ["updated_at", "2015-10-05 16:38:49.562955"]]
|
25370
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25371
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
25372
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m 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"]]
|
25373
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 2]]
|
25374
|
+
---------------------------------------------------------------------
|
25375
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
25376
|
+
---------------------------------------------------------------------
|
25377
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25378
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", "2015-10-05 16:38:49.574388"], ["updated_at", "2015-10-05 16:38:49.574388"]]
|
25379
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25380
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
25381
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 3], ["filterable_type", "ClarkKent::Report"]]
|
25382
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 3]]
|
25383
|
+
------------------------------------------------------------------------------------------------
|
25384
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
25385
|
+
------------------------------------------------------------------------------------------------
|
25386
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25387
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
25388
|
+
---------------------------------------------------
|
25389
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
25390
|
+
---------------------------------------------------
|
25391
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
|
25392
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25393
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
|
25394
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25395
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
25396
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
25397
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25398
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("type", "filter_name", "duration", "kind_of_day", "offset", "filterable_id", "filterable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["type", "ClarkKent::ReportDateFilter"], ["filter_name", "created_at"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["created_at", "2015-10-05 16:38:49.621261"], ["updated_at", "2015-10-05 16:38:49.621261"]]
|
25399
|
+
[1m[35m (1.1ms)[0m commit transaction
|
25400
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
25401
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25402
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25403
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25404
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25405
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
25406
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25407
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
25408
|
+
-----------------------------------------------------------------------------------------
|
25409
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
25410
|
+
-----------------------------------------------------------------------------------------
|
25411
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1[0m [["email", "taproot@gmail.com"]]
|
25412
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25413
|
+
[1m[36mSQL (0.9ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ?[0m [["id", 1]]
|
25414
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25415
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
25416
|
+
[1m[35m (0.7ms)[0m commit transaction
|
25417
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
25418
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25419
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25420
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25421
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 2]]
|
25422
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
25423
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
25424
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 2]]
|
25425
|
+
-----------------------------------------------------------
|
25426
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
25427
|
+
-----------------------------------------------------------
|
25428
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25429
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25430
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
25431
|
+
------------------------------------------------------------
|
25432
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
25433
|
+
------------------------------------------------------------
|
25434
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25435
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25436
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25437
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["name", "delete me"], ["resource_type", "Order"], ["created_at", "2015-10-05 16:38:49.720486"], ["updated_at", "2015-10-05 16:38:49.720486"]]
|
25438
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25439
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
25440
|
+
------------------------------------------------------
|
25441
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
25442
|
+
------------------------------------------------------
|
25443
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25444
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25445
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
25446
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
25447
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (5.9ms)
|
25448
|
+
Completed 500 Internal Server Error in 20ms
|
25449
|
+
-------------------------------------------------------
|
25450
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
25451
|
+
-------------------------------------------------------
|
25452
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25453
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25454
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
25455
|
+
Parameters: {"current_user_id"=>"1"}
|
25456
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
|
25457
|
+
[1m[36mClarkKent::Report Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
25458
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25459
|
+
[1m[36mClarkKent::Report Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
25460
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
25461
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
25462
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
25463
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (28.2ms)
|
25464
|
+
Completed 200 OK in 166ms (Views: 165.1ms | ActiveRecord: 1.0ms)
|
25465
|
+
-----------------------------------------------------
|
25466
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
25467
|
+
-----------------------------------------------------
|
25468
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25469
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25470
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
25471
|
+
Parameters: {"current_user_id"=>"1"}
|
25472
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (3.6ms)
|
25473
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (10.3ms)
|
25474
|
+
Completed 500 Internal Server Error in 13ms
|
25475
|
+
---------------------------------------------------------
|
25476
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
25477
|
+
---------------------------------------------------------
|
25478
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25479
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25480
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25481
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
25482
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (3.2ms)
|
25483
|
+
Completed 500 Internal Server Error in 6ms
|
25484
|
+
-----------------------------------------------------------------
|
25485
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
25486
|
+
-----------------------------------------------------------------
|
25487
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25488
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25489
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25490
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
25491
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (2.1ms)
|
25492
|
+
Completed 500 Internal Server Error in 3ms
|
25493
|
+
--------------------------------------------------------------------
|
25494
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
25495
|
+
--------------------------------------------------------------------
|
25496
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25497
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25498
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25499
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
25500
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (2.3ms)
|
25501
|
+
Completed 500 Internal Server Error in 3ms
|
25502
|
+
-----------------------------------------------------------
|
25503
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
25504
|
+
-----------------------------------------------------------
|
25505
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25506
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25507
|
+
[1m[36m (1.5ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
25508
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
25509
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
25510
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
25511
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
25512
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
25513
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
25514
|
+
FROM sqlite_master
|
25515
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
25516
|
+
UNION ALL
|
25517
|
+
SELECT sql
|
25518
|
+
FROM sqlite_temp_master
|
25519
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
25520
|
+
[0m
|
25521
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
25522
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
25523
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
25524
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
25525
|
+
FROM sqlite_master
|
25526
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
25527
|
+
UNION ALL
|
25528
|
+
SELECT sql
|
25529
|
+
FROM sqlite_temp_master
|
25530
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
25531
|
+
[0m
|
25532
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
25533
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
25534
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
25535
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
25536
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
25537
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
25538
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
25539
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
25540
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
25541
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
25542
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
25543
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
25544
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
25545
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
25546
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25547
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 16:47:05.112969"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:47:05.112969"]]
|
25548
|
+
[1m[35m (0.6ms)[0m commit transaction
|
25549
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25550
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
25551
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
25552
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25553
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
25554
|
+
[1m[35m (0.9ms)[0m commit transaction
|
25555
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25556
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
25557
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
25558
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25559
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
25560
|
+
[1m[35m (0.7ms)[0m commit transaction
|
25561
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25562
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
25563
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25564
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25565
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
25566
|
+
[1m[35m (0.7ms)[0m commit transaction
|
25567
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25568
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 16:47:05.170158"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 16:47:05.170158"], ["user_id", 1]]
|
25569
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
25570
|
+
---------------------------------------------------
|
25571
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
25572
|
+
---------------------------------------------------
|
25573
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
25574
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25575
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
25576
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25577
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
25578
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
25579
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25580
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:47:05.239537"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 16:47:05.239537"]]
|
25581
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25582
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
25583
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25584
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25585
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25586
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25587
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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]]
|
25588
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25589
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
25590
|
+
-----------------------------------------------------------------------------------------
|
25591
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
25592
|
+
-----------------------------------------------------------------------------------------
|
25593
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
25594
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25595
|
+
[1m[36mSQL (0.8ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
25596
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25597
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
25598
|
+
[1m[35m (0.6ms)[0m commit transaction
|
25599
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
25600
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25601
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25602
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25603
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 2]]
|
25604
|
+
-----------------------------------------------------------
|
25605
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
25606
|
+
-----------------------------------------------------------
|
25607
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25608
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25609
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
25610
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
25611
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
25612
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25613
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-10-05 16:47:05.342815"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-10-05 16:47:05.342815"]]
|
25614
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
25615
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25616
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.9ms)
|
25617
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
25618
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.9ms)
|
25619
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
25620
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.0ms)
|
25621
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
25622
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.8ms)
|
25623
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (22.8ms)
|
25624
|
+
Completed 200 OK in 158ms (Views: 153.3ms | ActiveRecord: 1.9ms)
|
25625
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
25626
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1[0m
|
25627
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25628
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
25629
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m 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]]
|
25630
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
25631
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
25632
|
+
[1m[36m (1.5ms)[0m [1mcommit transaction[0m
|
25633
|
+
------------------------------------------------------------
|
25634
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
25635
|
+
------------------------------------------------------------
|
25636
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25637
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25638
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25639
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:47:05.507706"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:47:05.507706"]]
|
25640
|
+
[1m[35m (0.9ms)[0m commit transaction
|
25641
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
25642
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
25643
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
25644
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
25645
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25646
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 3], ["filterable_type", "ClarkKent::Report"]]
|
25647
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
25648
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 3]]
|
25649
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
25650
|
+
[1m[35m (0.7ms)[0m commit transaction
|
25651
|
+
Redirected to http://test.host/reports/reports
|
25652
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
|
25653
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
25654
|
+
------------------------------------------------------
|
25655
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
25656
|
+
------------------------------------------------------
|
25657
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25658
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25659
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
25660
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
25661
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25662
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
25663
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.8ms)
|
25664
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25665
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.2ms)
|
25666
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
25667
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.8ms)
|
25668
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.3ms)
|
25669
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
25670
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
25671
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
25672
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
25673
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
25674
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
25675
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (8.5ms)
|
25676
|
+
[1m[35mClarkKent::ReportEmail Load (0.2ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
25677
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.2ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
25678
|
+
[1m[35mUser Load (0.2ms)[0m 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]]
|
25679
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (15.8ms)
|
25680
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (19.0ms)
|
25681
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
25682
|
+
[1m[35mUser Load (0.1ms)[0m 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", 2]]
|
25683
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (2.1ms)
|
25684
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (2.3ms)
|
25685
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (26.1ms)
|
25686
|
+
Completed 200 OK in 41ms (Views: 39.1ms | ActiveRecord: 1.3ms)
|
25687
|
+
-------------------------------------------------------
|
25688
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
25689
|
+
-------------------------------------------------------
|
25690
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25691
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25692
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
25693
|
+
Parameters: {"current_user_id"=>"1"}
|
25694
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
25695
|
+
[1m[35mClarkKent::Report Exists (0.3ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
25696
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
25697
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
25698
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ?[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
25699
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
25700
|
+
Completed 200 OK in 14ms (Views: 13.0ms | ActiveRecord: 0.8ms)
|
25701
|
+
-----------------------------------------------------
|
25702
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
25703
|
+
-----------------------------------------------------
|
25704
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25705
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25706
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
25707
|
+
Parameters: {"current_user_id"=>"1"}
|
25708
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
25709
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25710
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (44.1ms)
|
25711
|
+
Completed 200 OK in 51ms (Views: 50.4ms | ActiveRecord: 0.2ms)
|
25712
|
+
---------------------------------------------------------
|
25713
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
25714
|
+
---------------------------------------------------------
|
25715
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25716
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25717
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25718
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
25719
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25720
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
25721
|
+
[1m[36m (0.2ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25722
|
+
[1m[35m (0.1ms)[0m 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"]]
|
25723
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25724
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.7ms)
|
25725
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25726
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
25727
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.6ms)
|
25728
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
|
25729
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.5ms)
|
25730
|
+
Completed 200 OK in 24ms (Views: 19.4ms | ActiveRecord: 0.9ms)
|
25731
|
+
-----------------------------------------------------------------
|
25732
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
25733
|
+
-----------------------------------------------------------------
|
25734
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25735
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25736
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25737
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
25738
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25739
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
25740
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25741
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
25742
|
+
[1m[35m (0.1ms)[0m 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"]]
|
25743
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25744
|
+
[1m[35m (0.1ms)[0m 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"]]
|
25745
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
25746
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25747
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
25748
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.9ms)
|
25749
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.3ms)
|
25750
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)[0m
|
25751
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0) subquery_for_count
|
25752
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.2ms)
|
25753
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
25754
|
+
[1m[35mOrder Load (0.2ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
25755
|
+
(SELECT u.name
|
25756
|
+
FROM users u
|
25757
|
+
WHERE u.id = orders.user_id)
|
25758
|
+
as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
|
25759
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25760
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25761
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25762
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25763
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (0.8ms)
|
25764
|
+
Completed 200 OK in 26ms (Views: 20.4ms | ActiveRecord: 1.9ms)
|
25765
|
+
--------------------------------------------------------------------
|
25766
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
25767
|
+
--------------------------------------------------------------------
|
25768
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25769
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25770
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
25771
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
25772
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25773
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
25774
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25775
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
25776
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25777
|
+
[1m[35m (0.1ms)[0m 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"]]
|
25778
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25779
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
25780
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25781
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
25782
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
25783
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
25784
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
25785
|
+
Completed 200 OK in 9ms (Views: 5.0ms | ActiveRecord: 0.8ms)
|
25786
|
+
-----------------------------------------------------------
|
25787
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
25788
|
+
-----------------------------------------------------------
|
25789
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
25790
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
25791
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
25792
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
25793
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25794
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25795
|
+
[1m[35m (0.0ms)[0m commit transaction
|
25796
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
25797
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.4ms)
|
25798
|
+
Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.2ms)
|
25799
|
+
------------------------------------------------------------------------------------------------
|
25800
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
25801
|
+
------------------------------------------------------------------------------------------------
|
25802
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25803
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
25804
|
+
-------------------------------------------------------------------
|
25805
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
25806
|
+
-------------------------------------------------------------------
|
25807
|
+
[1m[35m (0.0ms)[0m begin transaction
|
25808
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:47:05.710626"], ["name", "test one"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:47:05.710626"]]
|
25809
|
+
[1m[35m (1.4ms)[0m commit transaction
|
25810
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 4]]
|
25811
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 4], ["filterable_type", "ClarkKent::Report"]]
|
25812
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 4]]
|
25813
|
+
---------------------------------------------------------------------
|
25814
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
25815
|
+
---------------------------------------------------------------------
|
25816
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25817
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:47:05.716285"], ["name", "test one"], ["resource_type", "TestReportable"], ["updated_at", "2015-10-05 16:47:05.716285"]]
|
25818
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25819
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 5]]
|
25820
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 5], ["filterable_type", "ClarkKent::Report"]]
|
25821
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 5]]
|
25822
|
+
-------------------------
|
25823
|
+
ClarkKentTest: test_truth
|
25824
|
+
-------------------------
|
25825
|
+
[1m[36m (2.1ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
25826
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
25827
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
25828
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
25829
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
25830
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
25831
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
25832
|
+
FROM sqlite_master
|
25833
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
25834
|
+
UNION ALL
|
25835
|
+
SELECT sql
|
25836
|
+
FROM sqlite_temp_master
|
25837
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
25838
|
+
[0m
|
25839
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
25840
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
25841
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
25842
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
25843
|
+
FROM sqlite_master
|
25844
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
25845
|
+
UNION ALL
|
25846
|
+
SELECT sql
|
25847
|
+
FROM sqlite_temp_master
|
25848
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
25849
|
+
[0m
|
25850
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
25851
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
25852
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
25853
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
25854
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
25855
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
25856
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
25857
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
25858
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
25859
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
25860
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
25861
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
25862
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
25863
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
25864
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25865
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 16:52:10.503033"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:52:10.503033"]]
|
25866
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25867
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25868
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
25869
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
25870
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25871
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
25872
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25873
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25874
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
25875
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25876
|
+
[1m[35m (0.2ms)[0m begin transaction
|
25877
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
25878
|
+
[1m[35m (0.9ms)[0m commit transaction
|
25879
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25880
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
25881
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
25882
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25883
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
25884
|
+
[1m[35m (0.8ms)[0m commit transaction
|
25885
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25886
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 16:52:10.563177"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 16:52:10.563177"], ["user_id", 1]]
|
25887
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25888
|
+
-------------------------------------------------------------------
|
25889
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
25890
|
+
-------------------------------------------------------------------
|
25891
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25892
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:52:10.600915"], ["name", "test one"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:52:10.600915"]]
|
25893
|
+
[1m[35m (0.7ms)[0m commit transaction
|
25894
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
25895
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m 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"]]
|
25896
|
+
---------------------------------------------------------------------
|
25897
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
25898
|
+
---------------------------------------------------------------------
|
25899
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25900
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:52:10.610615"], ["name", "test one"], ["resource_type", "TestReportable"], ["updated_at", "2015-10-05 16:52:10.610615"]]
|
25901
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25902
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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", 3]]
|
25903
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
25904
|
+
---------------------------------------------------
|
25905
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
25906
|
+
---------------------------------------------------
|
25907
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
25908
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25909
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
25910
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25911
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
25912
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
25913
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25914
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:52:10.648867"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 16:52:10.648867"]]
|
25915
|
+
[1m[35m (1.2ms)[0m commit transaction
|
25916
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
25917
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
25918
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25919
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
25920
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25921
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
25922
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
25923
|
+
-----------------------------------------------------------------------------------------
|
25924
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
25925
|
+
-----------------------------------------------------------------------------------------
|
25926
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
25927
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25928
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
25929
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25930
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
25931
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
25932
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
25933
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
25934
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25935
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
25936
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 2]]
|
25937
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
25938
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
25939
|
+
------------------------------------------------------------------------------------------------
|
25940
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
25941
|
+
------------------------------------------------------------------------------------------------
|
25942
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25943
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
25944
|
+
-------------------------
|
25945
|
+
ClarkKentTest: test_truth
|
25946
|
+
-------------------------
|
25947
|
+
-----------------------------------------------------------
|
25948
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
25949
|
+
-----------------------------------------------------------
|
25950
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25951
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25952
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
25953
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
25954
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
25955
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25956
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:52:10.759137"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-10-05 16:52:10.759137"]]
|
25957
|
+
[1m[35m (1.0ms)[0m commit transaction
|
25958
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
25959
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.1ms)
|
25960
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 4], ["filterable_type", "ClarkKent::Report"]]
|
25961
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.9ms)
|
25962
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 4]]
|
25963
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.0ms)
|
25964
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 4]]
|
25965
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.4ms)
|
25966
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (20.5ms)
|
25967
|
+
Completed 200 OK in 156ms (Views: 152.6ms | ActiveRecord: 1.8ms)
|
25968
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
25969
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
25970
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25971
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 4], ["filterable_type", "ClarkKent::Report"]]
|
25972
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 4]]
|
25973
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 4]]
|
25974
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 4]]
|
25975
|
+
[1m[35m (1.3ms)[0m commit transaction
|
25976
|
+
------------------------------------------------------------
|
25977
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
25978
|
+
------------------------------------------------------------
|
25979
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
25980
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
25981
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
25982
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:52:10.921841"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:52:10.921841"]]
|
25983
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25984
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
25985
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
25986
|
+
Parameters: {"current_user_id"=>"1", "id"=>"5"}
|
25987
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 5]]
|
25988
|
+
[1m[35m (0.1ms)[0m begin transaction
|
25989
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 5], ["filterable_type", "ClarkKent::Report"]]
|
25990
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m 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", 5]]
|
25991
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 5]]
|
25992
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 5]]
|
25993
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
25994
|
+
Redirected to http://test.host/reports/reports
|
25995
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
|
25996
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
25997
|
+
------------------------------------------------------
|
25998
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
25999
|
+
------------------------------------------------------
|
26000
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26001
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26002
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
26003
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
26004
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26005
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26006
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.3ms)
|
26007
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26008
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.0ms)
|
26009
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
26010
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.8ms)
|
26011
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.7ms)
|
26012
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26013
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
26014
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.2ms)
|
26015
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
26016
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26017
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
26018
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (8.3ms)
|
26019
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 1]]
|
26020
|
+
[1m[35mClarkKent::ReportDateFilter Load (0.2ms)[0m 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"]]
|
26021
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "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" = ?[0m [["report_email_id", 1]]
|
26022
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (15.9ms)
|
26023
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (18.3ms)
|
26024
|
+
[1m[35mClarkKent::ReportDateFilter Load (0.1ms)[0m 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", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
26025
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "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" = ?[0m [["report_email_id", 2]]
|
26026
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (2.1ms)
|
26027
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (2.3ms)
|
26028
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (23.7ms)
|
26029
|
+
Completed 200 OK in 37ms (Views: 35.6ms | ActiveRecord: 1.1ms)
|
26030
|
+
-------------------------------------------------------
|
26031
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
26032
|
+
-------------------------------------------------------
|
26033
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26034
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26035
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
26036
|
+
Parameters: {"current_user_id"=>"1"}
|
26037
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
|
26038
|
+
[1m[36mClarkKent::Report Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
26039
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26040
|
+
[1m[36mClarkKent::Report Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
26041
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
26042
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
26043
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
26044
|
+
Completed 200 OK in 13ms (Views: 11.8ms | ActiveRecord: 0.7ms)
|
26045
|
+
-----------------------------------------------------
|
26046
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
26047
|
+
-----------------------------------------------------
|
26048
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26049
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26050
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
26051
|
+
Parameters: {"current_user_id"=>"1"}
|
26052
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
26053
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26054
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (37.4ms)
|
26055
|
+
Completed 200 OK in 44ms (Views: 43.3ms | ActiveRecord: 0.2ms)
|
26056
|
+
---------------------------------------------------------
|
26057
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
26058
|
+
---------------------------------------------------------
|
26059
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26060
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26061
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26062
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
26063
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26064
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
26065
|
+
[1m[36m (0.2ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26066
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26067
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26068
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.7ms)
|
26069
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26070
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
26071
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
|
26072
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.4ms)
|
26073
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.9ms)
|
26074
|
+
Completed 200 OK in 23ms (Views: 18.5ms | ActiveRecord: 0.9ms)
|
26075
|
+
-----------------------------------------------------------------
|
26076
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
26077
|
+
-----------------------------------------------------------------
|
26078
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26079
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26080
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26081
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
26082
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26083
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
26084
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26085
|
+
Completed 500 Internal Server Error in 3ms
|
26086
|
+
--------------------------------------------------------------------
|
26087
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
26088
|
+
--------------------------------------------------------------------
|
26089
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26090
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26091
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26092
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
26093
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26094
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
26095
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26096
|
+
Completed 500 Internal Server Error in 4ms
|
26097
|
+
-----------------------------------------------------------
|
26098
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
26099
|
+
-----------------------------------------------------------
|
26100
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26101
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26102
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
26103
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
26104
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26105
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26106
|
+
[1m[35m (0.0ms)[0m commit transaction
|
26107
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26108
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.5ms)
|
26109
|
+
Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.3ms)
|
26110
|
+
[1m[36m (1.6ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
26111
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
26112
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
26113
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
26114
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
26115
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
26116
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26117
|
+
FROM sqlite_master
|
26118
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
26119
|
+
UNION ALL
|
26120
|
+
SELECT sql
|
26121
|
+
FROM sqlite_temp_master
|
26122
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
26123
|
+
[0m
|
26124
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
26125
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
26126
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
26127
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
26128
|
+
FROM sqlite_master
|
26129
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
26130
|
+
UNION ALL
|
26131
|
+
SELECT sql
|
26132
|
+
FROM sqlite_temp_master
|
26133
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
26134
|
+
[0m
|
26135
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
26136
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
26137
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
26138
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
26139
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
26140
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
26141
|
+
[1m[35m (1.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
26142
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
26143
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
26144
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
26145
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
26146
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
26147
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
26148
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
26149
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26150
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 16:53:35.393675"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:53:35.393675"]]
|
26151
|
+
[1m[35m (1.1ms)[0m commit transaction
|
26152
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26153
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
26154
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
26155
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26156
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
26157
|
+
[1m[35m (0.7ms)[0m commit transaction
|
26158
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26159
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
26160
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26161
|
+
[1m[35m (0.0ms)[0m begin transaction
|
26162
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
26163
|
+
[1m[35m (0.7ms)[0m commit transaction
|
26164
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26165
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
26166
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26167
|
+
[1m[35m (0.0ms)[0m begin transaction
|
26168
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
26169
|
+
[1m[35m (0.7ms)[0m commit transaction
|
26170
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26171
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 16:53:35.451631"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 16:53:35.451631"], ["user_id", 1]]
|
26172
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26173
|
+
-----------------------------------------------------------
|
26174
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
26175
|
+
-----------------------------------------------------------
|
26176
|
+
[1m[35mClarkKent::Report Load (0.3ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26177
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26178
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
26179
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
26180
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
26181
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26182
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:53:35.511987"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:53:35.511987"]]
|
26183
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
26184
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (4.1ms)
|
26185
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m 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"]]
|
26186
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (5.1ms)
|
26187
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
26188
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.8ms)
|
26189
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
26190
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (6.6ms)
|
26191
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (33.2ms)
|
26192
|
+
Completed 200 OK in 184ms (Views: 180.3ms | ActiveRecord: 2.2ms)
|
26193
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
26194
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
26195
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26196
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26197
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
26198
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
26199
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 2]]
|
26200
|
+
[1m[35m (1.6ms)[0m commit transaction
|
26201
|
+
------------------------------------------------------------
|
26202
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
26203
|
+
------------------------------------------------------------
|
26204
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26205
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26206
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26207
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:53:35.705164"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:53:35.705164"]]
|
26208
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
26209
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
26210
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
26211
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
26212
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 3]]
|
26213
|
+
[1m[35m (0.0ms)[0m begin transaction
|
26214
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
26215
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m 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", 3]]
|
26216
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 3]]
|
26217
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 3]]
|
26218
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
26219
|
+
Redirected to http://test.host/reports/reports
|
26220
|
+
Completed 302 Found in 4ms (ActiveRecord: 1.2ms)
|
26221
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
26222
|
+
------------------------------------------------------
|
26223
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
26224
|
+
------------------------------------------------------
|
26225
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26226
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26227
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
26228
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
26229
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26230
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.9ms)
|
26231
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26232
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.4ms)
|
26233
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
26234
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.9ms)
|
26235
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.5ms)
|
26236
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26237
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
26238
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26239
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
26240
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26241
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
26242
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (8.8ms)
|
26243
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
26244
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (0.9ms)
|
26245
|
+
Completed 200 OK in 15ms (Views: 14.2ms | ActiveRecord: 0.4ms)
|
26246
|
+
-------------------------------------------------------
|
26247
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
26248
|
+
-------------------------------------------------------
|
26249
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26250
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26251
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
26252
|
+
Parameters: {"current_user_id"=>"1"}
|
26253
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
26254
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
26255
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26256
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
26257
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
26258
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
26259
|
+
Completed 200 OK in 19ms (Views: 17.5ms | ActiveRecord: 0.8ms)
|
26260
|
+
-----------------------------------------------------
|
26261
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
26262
|
+
-----------------------------------------------------
|
26263
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26264
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26265
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
26266
|
+
Parameters: {"current_user_id"=>"1"}
|
26267
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
26268
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26269
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (41.2ms)
|
26270
|
+
Completed 200 OK in 48ms (Views: 47.7ms | ActiveRecord: 0.2ms)
|
26271
|
+
---------------------------------------------------------
|
26272
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
26273
|
+
---------------------------------------------------------
|
26274
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26275
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26276
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26277
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
26278
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26279
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
26280
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26281
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26282
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26283
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
|
26284
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26285
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
26286
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
|
26287
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.4ms)
|
26288
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.4ms)
|
26289
|
+
Completed 200 OK in 23ms (Views: 18.2ms | ActiveRecord: 1.0ms)
|
26290
|
+
-----------------------------------------------------------------
|
26291
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
26292
|
+
-----------------------------------------------------------------
|
26293
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26294
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26295
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26296
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
26297
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26298
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
26299
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26300
|
+
Completed 500 Internal Server Error in 3ms
|
26301
|
+
--------------------------------------------------------------------
|
26302
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
26303
|
+
--------------------------------------------------------------------
|
26304
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26305
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26306
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26307
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
26308
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26309
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
26310
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26311
|
+
Completed 500 Internal Server Error in 3ms
|
26312
|
+
-----------------------------------------------------------
|
26313
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
26314
|
+
-----------------------------------------------------------
|
26315
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26316
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26317
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
26318
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
26319
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26320
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26321
|
+
[1m[35m (0.0ms)[0m commit transaction
|
26322
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.9ms)
|
26323
|
+
Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.2ms)
|
26324
|
+
---------------------------------------------------
|
26325
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
26326
|
+
---------------------------------------------------
|
26327
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
26328
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26329
|
+
[1m[36mSQL (1.7ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
26330
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26331
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
26332
|
+
[1m[35m (0.8ms)[0m commit transaction
|
26333
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26334
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-10-05 16:53:35.873116"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 16:53:35.873116"]]
|
26335
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26336
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
26337
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26338
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26339
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26340
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26341
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
26342
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26343
|
+
-----------------------------------------------------------------------------------------
|
26344
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
26345
|
+
-----------------------------------------------------------------------------------------
|
26346
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
26347
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26348
|
+
[1m[36mSQL (2.6ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
26349
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26350
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
26351
|
+
[1m[35m (0.6ms)[0m commit transaction
|
26352
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
26353
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26354
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26355
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26356
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 2]]
|
26357
|
+
-------------------------
|
26358
|
+
ClarkKentTest: test_truth
|
26359
|
+
-------------------------
|
26360
|
+
-------------------------------------------------------------------
|
26361
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
26362
|
+
-------------------------------------------------------------------
|
26363
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26364
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:53:35.940123"], ["name", "test one"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:53:35.940123"]]
|
26365
|
+
[1m[35m (0.7ms)[0m commit transaction
|
26366
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 4]]
|
26367
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 4], ["filterable_type", "ClarkKent::Report"]]
|
26368
|
+
---------------------------------------------------------------------
|
26369
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
26370
|
+
---------------------------------------------------------------------
|
26371
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26372
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:53:35.944362"], ["name", "test one"], ["resource_type", "TestReportable"], ["updated_at", "2015-10-05 16:53:35.944362"]]
|
26373
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
26374
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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", 5]]
|
26375
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 5], ["filterable_type", "ClarkKent::Report"]]
|
26376
|
+
------------------------------------------------------------------------------------------------
|
26377
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
26378
|
+
------------------------------------------------------------------------------------------------
|
26379
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26380
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
26381
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
26382
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
26383
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
26384
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
26385
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
26386
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
26387
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26388
|
+
FROM sqlite_master
|
26389
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
26390
|
+
UNION ALL
|
26391
|
+
SELECT sql
|
26392
|
+
FROM sqlite_temp_master
|
26393
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
26394
|
+
[0m
|
26395
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
26396
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
26397
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
26398
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26399
|
+
FROM sqlite_master
|
26400
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
26401
|
+
UNION ALL
|
26402
|
+
SELECT sql
|
26403
|
+
FROM sqlite_temp_master
|
26404
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
26405
|
+
[0m
|
26406
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
26407
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
26408
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
26409
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
26410
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
26411
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
26412
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
26413
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
26414
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
26415
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
26416
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
26417
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
26418
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
26419
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
26420
|
+
[1m[35m (0.0ms)[0m begin transaction
|
26421
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 16:54:37.814569"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:54:37.814569"]]
|
26422
|
+
[1m[35m (0.7ms)[0m commit transaction
|
26423
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26424
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
26425
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26426
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26427
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
26428
|
+
[1m[35m (0.9ms)[0m commit transaction
|
26429
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26430
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
26431
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
26432
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26433
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
26434
|
+
[1m[35m (0.8ms)[0m commit transaction
|
26435
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26436
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
26437
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26438
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26439
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
26440
|
+
[1m[35m (0.9ms)[0m commit transaction
|
26441
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26442
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 16:54:37.865916"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 16:54:37.865916"], ["user_id", 1]]
|
26443
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26444
|
+
-------------------------
|
26445
|
+
ClarkKentTest: test_truth
|
26446
|
+
-------------------------
|
26447
|
+
-------------------------------------------------------------------
|
26448
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
26449
|
+
-------------------------------------------------------------------
|
26450
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26451
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:54:37.916408"], ["name", "test one"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:54:37.916408"]]
|
26452
|
+
[1m[35m (1.0ms)[0m commit transaction
|
26453
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
26454
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m 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"]]
|
26455
|
+
[1m[36mClarkKent::ReportColumn Load (0.4ms)[0m [1mSELECT "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 1[0m [["report_id", 2]]
|
26456
|
+
---------------------------------------------------------------------
|
26457
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
26458
|
+
---------------------------------------------------------------------
|
26459
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26460
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:55:00.040945"], ["name", "test one"], ["resource_type", "TestReportable"], ["updated_at", "2015-10-05 16:55:00.040945"]]
|
26461
|
+
[1m[35m (1.1ms)[0m commit transaction
|
26462
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
26463
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 3], ["filterable_type", "ClarkKent::Report"]]
|
26464
|
+
[1m[36mClarkKent::ReportColumn Load (0.3ms)[0m [1mSELECT "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 1[0m [["report_id", 3]]
|
26465
|
+
------------------------------------------------------------------------------------------------
|
26466
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
26467
|
+
------------------------------------------------------------------------------------------------
|
26468
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26469
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
26470
|
+
-----------------------------------------------------------
|
26471
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
26472
|
+
-----------------------------------------------------------
|
26473
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26474
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26475
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
26476
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
26477
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
26478
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26479
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:55:09.097528"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:55:09.097528"]]
|
26480
|
+
[1m[36m (1.8ms)[0m [1mcommit transaction[0m
|
26481
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.8ms)
|
26482
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 4], ["filterable_type", "ClarkKent::Report"]]
|
26483
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.0ms)
|
26484
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 4]]
|
26485
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.8ms)
|
26486
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 4]]
|
26487
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (6.7ms)
|
26488
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (27.6ms)
|
26489
|
+
Completed 200 OK in 222ms (Views: 217.2ms | ActiveRecord: 2.6ms)
|
26490
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
26491
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
26492
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26493
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 4], ["filterable_type", "ClarkKent::Report"]]
|
26494
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 4]]
|
26495
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 4]]
|
26496
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 4]]
|
26497
|
+
[1m[35m (1.5ms)[0m commit transaction
|
26498
|
+
------------------------------------------------------------
|
26499
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
26500
|
+
------------------------------------------------------------
|
26501
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26502
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26503
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26504
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 16:55:09.328574"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:55:09.328574"]]
|
26505
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
26506
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
26507
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
26508
|
+
Parameters: {"current_user_id"=>"1", "id"=>"5"}
|
26509
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 5]]
|
26510
|
+
[1m[35m (0.0ms)[0m begin transaction
|
26511
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 5], ["filterable_type", "ClarkKent::Report"]]
|
26512
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m 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", 5]]
|
26513
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 5]]
|
26514
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 5]]
|
26515
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
26516
|
+
Redirected to http://test.host/reports/reports
|
26517
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
|
26518
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
26519
|
+
------------------------------------------------------
|
26520
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
26521
|
+
------------------------------------------------------
|
26522
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26523
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26524
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
26525
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
26526
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26527
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.7ms)
|
26528
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26529
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.2ms)
|
26530
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
26531
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.7ms)
|
26532
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.2ms)
|
26533
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26534
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
26535
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26536
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
26537
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26538
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
26539
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (7.9ms)
|
26540
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
26541
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (0.9ms)
|
26542
|
+
Completed 200 OK in 14ms (Views: 12.9ms | ActiveRecord: 0.3ms)
|
26543
|
+
-------------------------------------------------------
|
26544
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
26545
|
+
-------------------------------------------------------
|
26546
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26547
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26548
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
26549
|
+
Parameters: {"current_user_id"=>"1"}
|
26550
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
26551
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
26552
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26553
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
26554
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
26555
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
26556
|
+
Completed 200 OK in 20ms (Views: 19.3ms | ActiveRecord: 0.8ms)
|
26557
|
+
-----------------------------------------------------
|
26558
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
26559
|
+
-----------------------------------------------------
|
26560
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26561
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26562
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
26563
|
+
Parameters: {"current_user_id"=>"1"}
|
26564
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
26565
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26566
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (36.9ms)
|
26567
|
+
Completed 200 OK in 44ms (Views: 43.1ms | ActiveRecord: 0.3ms)
|
26568
|
+
---------------------------------------------------------
|
26569
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
26570
|
+
---------------------------------------------------------
|
26571
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26572
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26573
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26574
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
26575
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26576
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
26577
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26578
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26579
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26580
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.8ms)
|
26581
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26582
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
26583
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.7ms)
|
26584
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.4ms)
|
26585
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.4ms)
|
26586
|
+
Completed 200 OK in 24ms (Views: 18.7ms | ActiveRecord: 1.0ms)
|
26587
|
+
-----------------------------------------------------------------
|
26588
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
26589
|
+
-----------------------------------------------------------------
|
26590
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26591
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26592
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26593
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
26594
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26595
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
26596
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26597
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
26598
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26599
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26600
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26601
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
26602
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26603
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users"
|
26604
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.2ms)
|
26605
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
26606
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)[0m
|
26607
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0) subquery_for_count
|
26608
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (6.4ms)
|
26609
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
26610
|
+
[1m[35mOrder Load (0.1ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
26611
|
+
(SELECT u.name
|
26612
|
+
FROM users u
|
26613
|
+
WHERE u.id = orders.user_id)
|
26614
|
+
as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
|
26615
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26616
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26617
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26618
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26619
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (0.9ms)
|
26620
|
+
Completed 200 OK in 9475ms (Views: 24.0ms | ActiveRecord: 1.9ms)
|
26621
|
+
--------------------------------------------------------------------
|
26622
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
26623
|
+
--------------------------------------------------------------------
|
26624
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26625
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26626
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26627
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
26628
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26629
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
26630
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26631
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
26632
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26633
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26634
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26635
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.6ms)
|
26636
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26637
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
26638
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.8ms)
|
26639
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
26640
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.2ms)
|
26641
|
+
Completed 200 OK in 9286ms (Views: 10.6ms | ActiveRecord: 1.1ms)
|
26642
|
+
-----------------------------------------------------------
|
26643
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
26644
|
+
-----------------------------------------------------------
|
26645
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26646
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26647
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
26648
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
26649
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26650
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26651
|
+
[1m[35m (0.0ms)[0m commit transaction
|
26652
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.4ms)
|
26653
|
+
Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.2ms)
|
26654
|
+
---------------------------------------------------
|
26655
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
26656
|
+
---------------------------------------------------
|
26657
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
26658
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26659
|
+
[1m[36mSQL (1.5ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
26660
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26661
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
26662
|
+
[1m[35m (0.7ms)[0m commit transaction
|
26663
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26664
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-10-05 16:55:28.258634"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 16:55:28.258634"]]
|
26665
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26666
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
26667
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26668
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26669
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26670
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26671
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
26672
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26673
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
26674
|
+
-----------------------------------------------------------------------------------------
|
26675
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
26676
|
+
-----------------------------------------------------------------------------------------
|
26677
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
26678
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26679
|
+
[1m[35mSQL (1.8ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
26680
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26681
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
26682
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
26683
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
26684
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26685
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26686
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26687
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 2]]
|
26688
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
26689
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26690
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 2]]
|
26691
|
+
[1m[36m (2.1ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
26692
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
26693
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
26694
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
26695
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
26696
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
26697
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26698
|
+
FROM sqlite_master
|
26699
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
26700
|
+
UNION ALL
|
26701
|
+
SELECT sql
|
26702
|
+
FROM sqlite_temp_master
|
26703
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
26704
|
+
[0m
|
26705
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
26706
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
26707
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
26708
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
26709
|
+
FROM sqlite_master
|
26710
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
26711
|
+
UNION ALL
|
26712
|
+
SELECT sql
|
26713
|
+
FROM sqlite_temp_master
|
26714
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
26715
|
+
[0m
|
26716
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
26717
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
26718
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
26719
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
26720
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
26721
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
26722
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
26723
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
26724
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
26725
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
26726
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
26727
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
26728
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
26729
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
26730
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26731
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 16:56:41.371535"], ["resource_type", "Order"], ["updated_at", "2015-10-05 16:56:41.371535"]]
|
26732
|
+
[1m[35m (1.1ms)[0m commit transaction
|
26733
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26734
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
26735
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
26736
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26737
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
26738
|
+
[1m[35m (0.8ms)[0m commit transaction
|
26739
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26740
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
26741
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
26742
|
+
[1m[35m (0.0ms)[0m begin transaction
|
26743
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
26744
|
+
[1m[35m (0.8ms)[0m commit transaction
|
26745
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26746
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
26747
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26748
|
+
[1m[35m (0.0ms)[0m begin transaction
|
26749
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
26750
|
+
[1m[35m (0.7ms)[0m commit transaction
|
26751
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26752
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 16:56:41.423738"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 16:56:41.423738"], ["user_id", 1]]
|
26753
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
26754
|
+
---------------------------------------------------
|
26755
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
26756
|
+
---------------------------------------------------
|
26757
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
26758
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26759
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
26760
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26761
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
26762
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
26763
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26764
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 16:56:41.500820"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 16:56:41.500820"]]
|
26765
|
+
[1m[35m (0.7ms)[0m commit transaction
|
26766
|
+
[1m[36mClarkKent::ReportFilter Load (0.3ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
26767
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26768
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
26769
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26770
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
26771
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
26772
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26773
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26774
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
26775
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26776
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
26777
|
+
-----------------------------------------------------------------------------------------
|
26778
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
26779
|
+
-----------------------------------------------------------------------------------------
|
26780
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
26781
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26782
|
+
[1m[35mSQL (1.6ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
26783
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26784
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
26785
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26786
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
26787
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26788
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
26789
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26790
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 2]]
|
26791
|
+
-------------------------------------------------------------------
|
26792
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
26793
|
+
-------------------------------------------------------------------
|
26794
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26795
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 17:15:40.004601"], ["name", "test one"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:15:40.004601"]]
|
26796
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
26797
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
26798
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
26799
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 2]]
|
26800
|
+
---------------------------------------------------------------------
|
26801
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
26802
|
+
---------------------------------------------------------------------
|
26803
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26804
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 17:15:40.009760"], ["name", "test one"], ["resource_type", "TestReportable"], ["updated_at", "2015-10-05 17:15:40.009760"]]
|
26805
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
26806
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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", 3]]
|
26807
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
26808
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 3]]
|
26809
|
+
-------------------------
|
26810
|
+
ClarkKentTest: test_truth
|
26811
|
+
-------------------------
|
26812
|
+
------------------------------------------------------------------------------------------------
|
26813
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
26814
|
+
------------------------------------------------------------------------------------------------
|
26815
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26816
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
26817
|
+
-----------------------------------------------------------
|
26818
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
26819
|
+
-----------------------------------------------------------
|
26820
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26821
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26822
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
26823
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
26824
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
26825
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26826
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:15:40.057166"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-10-05 17:15:40.057166"]]
|
26827
|
+
[1m[35m (1.0ms)[0m commit transaction
|
26828
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
26829
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.2ms)
|
26830
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 4], ["filterable_type", "ClarkKent::Report"]]
|
26831
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.0ms)
|
26832
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 4]]
|
26833
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.4ms)
|
26834
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 4]]
|
26835
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.4ms)
|
26836
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (20.0ms)
|
26837
|
+
Completed 200 OK in 153ms (Views: 149.5ms | ActiveRecord: 1.8ms)
|
26838
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
26839
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
26840
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26841
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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", 4], ["filterable_type", "ClarkKent::Report"]]
|
26842
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 4]]
|
26843
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 4]]
|
26844
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 4]]
|
26845
|
+
[1m[35m (1.3ms)[0m commit transaction
|
26846
|
+
------------------------------------------------------------
|
26847
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
26848
|
+
------------------------------------------------------------
|
26849
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26850
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26851
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
26852
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 17:15:40.216969"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:15:40.216969"]]
|
26853
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
26854
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
26855
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
26856
|
+
Parameters: {"current_user_id"=>"1", "id"=>"5"}
|
26857
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 5]]
|
26858
|
+
[1m[35m (0.0ms)[0m begin transaction
|
26859
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 5], ["filterable_type", "ClarkKent::Report"]]
|
26860
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m 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", 5]]
|
26861
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 5]]
|
26862
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 5]]
|
26863
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
26864
|
+
Redirected to http://test.host/reports/reports
|
26865
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.1ms)
|
26866
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
26867
|
+
------------------------------------------------------
|
26868
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
26869
|
+
------------------------------------------------------
|
26870
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26871
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26872
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
26873
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
26874
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26875
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26876
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.4ms)
|
26877
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26878
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.1ms)
|
26879
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
26880
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.0ms)
|
26881
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.4ms)
|
26882
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
26883
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
|
26884
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
26885
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
26886
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
26887
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
26888
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (8.8ms)
|
26889
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 1]]
|
26890
|
+
[1m[35mClarkKent::ReportDateFilter Load (0.2ms)[0m 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"]]
|
26891
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "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" = ?[0m [["report_email_id", 1]]
|
26892
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (17.3ms)
|
26893
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (19.9ms)
|
26894
|
+
[1m[35mClarkKent::ReportDateFilter Load (0.1ms)[0m 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", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
26895
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "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" = ?[0m [["report_email_id", 2]]
|
26896
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (2.7ms)
|
26897
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (3.2ms)
|
26898
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (27.3ms)
|
26899
|
+
Completed 200 OK in 42ms (Views: 40.4ms | ActiveRecord: 1.2ms)
|
26900
|
+
-------------------------------------------------------
|
26901
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
26902
|
+
-------------------------------------------------------
|
26903
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26904
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26905
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
26906
|
+
Parameters: {"current_user_id"=>"1"}
|
26907
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
|
26908
|
+
[1m[36mClarkKent::Report Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
26909
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26910
|
+
[1m[36mClarkKent::Report Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
26911
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
26912
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
26913
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
26914
|
+
Completed 200 OK in 13ms (Views: 12.2ms | ActiveRecord: 0.7ms)
|
26915
|
+
-----------------------------------------------------
|
26916
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
26917
|
+
-----------------------------------------------------
|
26918
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26919
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26920
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
26921
|
+
Parameters: {"current_user_id"=>"1"}
|
26922
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
26923
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
26924
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (38.9ms)
|
26925
|
+
Completed 200 OK in 48ms (Views: 47.3ms | ActiveRecord: 0.2ms)
|
26926
|
+
---------------------------------------------------------
|
26927
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
26928
|
+
---------------------------------------------------------
|
26929
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26930
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26931
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26932
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
26933
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26934
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
26935
|
+
[1m[36m (0.2ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26936
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26937
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26938
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.2ms)
|
26939
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26940
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
26941
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.2ms)
|
26942
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
|
26943
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.7ms)
|
26944
|
+
Completed 200 OK in 33ms (Views: 25.2ms | ActiveRecord: 0.9ms)
|
26945
|
+
-----------------------------------------------------------------
|
26946
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
26947
|
+
-----------------------------------------------------------------
|
26948
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26949
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26950
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26951
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
26952
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
26953
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
26954
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m 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"]]
|
26955
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
26956
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26957
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26958
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26959
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
26960
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
26961
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
26962
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.0ms)
|
26963
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
26964
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)[0m
|
26965
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0) subquery_for_count
|
26966
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (9.0ms)
|
26967
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
26968
|
+
[1m[35mOrder Load (0.2ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
26969
|
+
(SELECT u.name
|
26970
|
+
FROM users u
|
26971
|
+
WHERE u.id = orders.user_id)
|
26972
|
+
as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
|
26973
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26974
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26975
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
26976
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
26977
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.1ms)
|
26978
|
+
Completed 200 OK in 40ms (Views: 30.5ms | ActiveRecord: 2.2ms)
|
26979
|
+
--------------------------------------------------------------------
|
26980
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
26981
|
+
--------------------------------------------------------------------
|
26982
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26983
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26984
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
26985
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
26986
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
26987
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
26988
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26989
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
26990
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26991
|
+
[1m[35m (0.1ms)[0m 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"]]
|
26992
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
26993
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.4ms)
|
26994
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
26995
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
26996
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.2ms)
|
26997
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
26998
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
26999
|
+
Completed 200 OK in 12ms (Views: 6.8ms | ActiveRecord: 0.8ms)
|
27000
|
+
-----------------------------------------------------------
|
27001
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
27002
|
+
-----------------------------------------------------------
|
27003
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27004
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
27005
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
27006
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
27007
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27008
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27009
|
+
[1m[35m (0.0ms)[0m commit transaction
|
27010
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
27011
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.7ms)
|
27012
|
+
Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.3ms)
|
27013
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27014
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27015
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27016
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27017
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27018
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27019
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27020
|
+
FROM sqlite_master
|
27021
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27022
|
+
UNION ALL
|
27023
|
+
SELECT sql
|
27024
|
+
FROM sqlite_temp_master
|
27025
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27026
|
+
[0m
|
27027
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27028
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27029
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27030
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27031
|
+
FROM sqlite_master
|
27032
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27033
|
+
UNION ALL
|
27034
|
+
SELECT sql
|
27035
|
+
FROM sqlite_temp_master
|
27036
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27037
|
+
[0m
|
27038
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27039
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27040
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27041
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27042
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27043
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27044
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27045
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27046
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27047
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27048
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27049
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27050
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27051
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27052
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27053
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:21:56.928266"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:21:56.928266"]]
|
27054
|
+
[1m[35m (1.1ms)[0m commit transaction
|
27055
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27056
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27057
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27058
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27059
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27060
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27061
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27062
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27063
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27064
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27065
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27066
|
+
[1m[35m (0.8ms)[0m commit transaction
|
27067
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27068
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27069
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27070
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27071
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27072
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27073
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27074
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:21:56.979330"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:21:56.979330"], ["user_id", 1]]
|
27075
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27076
|
+
---------------------------------------------------
|
27077
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
27078
|
+
---------------------------------------------------
|
27079
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
27080
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27081
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
27082
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27083
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
27084
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27085
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27086
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:21:57.036962"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:21:57.036962"]]
|
27087
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27088
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27089
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27090
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27091
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27092
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
27093
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
27094
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27095
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
27096
|
+
-----------------------------------------------------------------------------------------
|
27097
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
27098
|
+
-----------------------------------------------------------------------------------------
|
27099
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
27100
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27101
|
+
[1m[36mSQL (1.6ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
27102
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27103
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
27104
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27105
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27106
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27107
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27108
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27109
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 2]]
|
27110
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27111
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27112
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27113
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27114
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27115
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27116
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27117
|
+
FROM sqlite_master
|
27118
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27119
|
+
UNION ALL
|
27120
|
+
SELECT sql
|
27121
|
+
FROM sqlite_temp_master
|
27122
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27123
|
+
[0m
|
27124
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27125
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27126
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27127
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27128
|
+
FROM sqlite_master
|
27129
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27130
|
+
UNION ALL
|
27131
|
+
SELECT sql
|
27132
|
+
FROM sqlite_temp_master
|
27133
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27134
|
+
[0m
|
27135
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27136
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27137
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27138
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27139
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27140
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27141
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27142
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27143
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27144
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27145
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27146
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27147
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27148
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27149
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27150
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:22:30.688619"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:22:30.688619"]]
|
27151
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27152
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27153
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27154
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27155
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27156
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27157
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27158
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27159
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27160
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
27161
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27162
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27163
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27164
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27165
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27166
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
27167
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27168
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27169
|
+
[1m[35m (0.8ms)[0m commit transaction
|
27170
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27171
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:22:30.736233"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:22:30.736233"], ["user_id", 1]]
|
27172
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27173
|
+
---------------------------------------------------
|
27174
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
27175
|
+
---------------------------------------------------
|
27176
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
27177
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27178
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
27179
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27180
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
27181
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
27182
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27183
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:22:30.791789"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:22:30.791789"]]
|
27184
|
+
[1m[35m (1.1ms)[0m commit transaction
|
27185
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27186
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27187
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27188
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27189
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
27190
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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]]
|
27191
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27192
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
27193
|
+
-----------------------------------------------------------------------------------------
|
27194
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
27195
|
+
-----------------------------------------------------------------------------------------
|
27196
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
27197
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27198
|
+
[1m[36mSQL (1.3ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
27199
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27200
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
27201
|
+
[1m[35m (2.1ms)[0m commit transaction
|
27202
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27203
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27204
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27205
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27206
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 2]]
|
27207
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27208
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27209
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27210
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27211
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27212
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27213
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27214
|
+
FROM sqlite_master
|
27215
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27216
|
+
UNION ALL
|
27217
|
+
SELECT sql
|
27218
|
+
FROM sqlite_temp_master
|
27219
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27220
|
+
[0m
|
27221
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27222
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27223
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27224
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27225
|
+
FROM sqlite_master
|
27226
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27227
|
+
UNION ALL
|
27228
|
+
SELECT sql
|
27229
|
+
FROM sqlite_temp_master
|
27230
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27231
|
+
[0m
|
27232
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27233
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27234
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27235
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27236
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27237
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27238
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27239
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27240
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27241
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27242
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27243
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27244
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27245
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27246
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27247
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:24:05.514959"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:24:05.514959"]]
|
27248
|
+
[1m[35m (1.1ms)[0m commit transaction
|
27249
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27250
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27251
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27252
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27253
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27254
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27255
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27256
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27257
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27258
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27259
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27260
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27261
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27262
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27263
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27264
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27265
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27266
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27267
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27268
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:24:05.569224"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:24:05.569224"], ["user_id", 1]]
|
27269
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27270
|
+
---------------------------------------------------
|
27271
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
27272
|
+
---------------------------------------------------
|
27273
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
27274
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27275
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
27276
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27277
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
27278
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27279
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27280
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:24:05.621234"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:24:05.621234"]]
|
27281
|
+
[1m[35m (1.0ms)[0m commit transaction
|
27282
|
+
[1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27283
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27284
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27285
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27286
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
27287
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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]]
|
27288
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27289
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
27290
|
+
-----------------------------------------------------------------------------------------
|
27291
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
27292
|
+
-----------------------------------------------------------------------------------------
|
27293
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
27294
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27295
|
+
[1m[36mSQL (1.5ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
27296
|
+
[1m[35m (0.2ms)[0m begin transaction
|
27297
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
27298
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27299
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27300
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27301
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27302
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27303
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 2]]
|
27304
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27305
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27306
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27307
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27308
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27309
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27310
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27311
|
+
FROM sqlite_master
|
27312
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27313
|
+
UNION ALL
|
27314
|
+
SELECT sql
|
27315
|
+
FROM sqlite_temp_master
|
27316
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27317
|
+
[0m
|
27318
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27319
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27320
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27321
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27322
|
+
FROM sqlite_master
|
27323
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27324
|
+
UNION ALL
|
27325
|
+
SELECT sql
|
27326
|
+
FROM sqlite_temp_master
|
27327
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27328
|
+
[0m
|
27329
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27330
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27331
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27332
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27333
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27334
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27335
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27336
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27337
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27338
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27339
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27340
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27341
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27342
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27343
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27344
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:24:55.470202"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:24:55.470202"]]
|
27345
|
+
[1m[35m (1.0ms)[0m commit transaction
|
27346
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27347
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27348
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
27349
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27350
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27351
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27352
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27353
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27354
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
27355
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27356
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27357
|
+
[1m[35m (0.6ms)[0m commit transaction
|
27358
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27359
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27360
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27361
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27362
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27363
|
+
[1m[35m (0.8ms)[0m commit transaction
|
27364
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27365
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:24:55.521794"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:24:55.521794"], ["user_id", 1]]
|
27366
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27367
|
+
---------------------------------------------------
|
27368
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
27369
|
+
---------------------------------------------------
|
27370
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
27371
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27372
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
27373
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27374
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
27375
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27376
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27377
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:24:55.578451"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:24:55.578451"]]
|
27378
|
+
[1m[35m (1.0ms)[0m commit transaction
|
27379
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27380
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27381
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27382
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27383
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
27384
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
27385
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27386
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
27387
|
+
-----------------------------------------------------------------------------------------
|
27388
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
27389
|
+
-----------------------------------------------------------------------------------------
|
27390
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
27391
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27392
|
+
[1m[36mSQL (0.9ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
27393
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27394
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
27395
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27396
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27397
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27398
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27399
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27400
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 2]]
|
27401
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27402
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27403
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27404
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27405
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27406
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27407
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27408
|
+
FROM sqlite_master
|
27409
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27410
|
+
UNION ALL
|
27411
|
+
SELECT sql
|
27412
|
+
FROM sqlite_temp_master
|
27413
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27414
|
+
[0m
|
27415
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27416
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27417
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27418
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27419
|
+
FROM sqlite_master
|
27420
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27421
|
+
UNION ALL
|
27422
|
+
SELECT sql
|
27423
|
+
FROM sqlite_temp_master
|
27424
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27425
|
+
[0m
|
27426
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27427
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27428
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27429
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27430
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27431
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27432
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27433
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27434
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27435
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27436
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27437
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27438
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27439
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27440
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27441
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:26:25.766586"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:26:25.766586"]]
|
27442
|
+
[1m[35m (1.1ms)[0m commit transaction
|
27443
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27444
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27445
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27446
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27447
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27448
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27449
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27450
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27451
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
27452
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27453
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27454
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27455
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27456
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27457
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27458
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27459
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27460
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27461
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27462
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:26:25.816929"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:26:25.816929"], ["user_id", 1]]
|
27463
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27464
|
+
---------------------------------------------------
|
27465
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
27466
|
+
---------------------------------------------------
|
27467
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
27468
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27469
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
27470
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27471
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
27472
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27473
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27474
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:26:25.874139"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:26:25.874139"]]
|
27475
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27476
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27477
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27478
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27479
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27480
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
27481
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m 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]]
|
27482
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27483
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
27484
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27485
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27486
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27487
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27488
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27489
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27490
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27491
|
+
FROM sqlite_master
|
27492
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27493
|
+
UNION ALL
|
27494
|
+
SELECT sql
|
27495
|
+
FROM sqlite_temp_master
|
27496
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27497
|
+
[0m
|
27498
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27499
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27500
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27501
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27502
|
+
FROM sqlite_master
|
27503
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27504
|
+
UNION ALL
|
27505
|
+
SELECT sql
|
27506
|
+
FROM sqlite_temp_master
|
27507
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27508
|
+
[0m
|
27509
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27510
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27511
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27512
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27513
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27514
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27515
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27516
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27517
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27518
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27519
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27520
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27521
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27522
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27523
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27524
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:28:28.583722"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:28:28.583722"]]
|
27525
|
+
[1m[35m (1.2ms)[0m commit transaction
|
27526
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27527
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27528
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27529
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27530
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27531
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27532
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27533
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27534
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27535
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27536
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27537
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27538
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27539
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27540
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
27541
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27542
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27543
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27544
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27545
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:28:28.634590"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:28:28.634590"], ["user_id", 1]]
|
27546
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27547
|
+
---------------------------------------------------
|
27548
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
27549
|
+
---------------------------------------------------
|
27550
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
27551
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27552
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
27553
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27554
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
27555
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27556
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27557
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:28:28.694614"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:28:28.694614"]]
|
27558
|
+
[1m[35m (1.0ms)[0m commit transaction
|
27559
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27560
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27561
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27562
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27563
|
+
[1m[36mClarkKent::ReportEmail Load (0.4ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
27564
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27565
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
27566
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
27567
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
27568
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
27569
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
27570
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
27571
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
27572
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
|
27573
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27574
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27575
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27576
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27577
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27578
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27579
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27580
|
+
FROM sqlite_master
|
27581
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27582
|
+
UNION ALL
|
27583
|
+
SELECT sql
|
27584
|
+
FROM sqlite_temp_master
|
27585
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27586
|
+
[0m
|
27587
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27588
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27589
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27590
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27591
|
+
FROM sqlite_master
|
27592
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27593
|
+
UNION ALL
|
27594
|
+
SELECT sql
|
27595
|
+
FROM sqlite_temp_master
|
27596
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27597
|
+
[0m
|
27598
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27599
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27600
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27601
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27602
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27603
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27604
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27605
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27606
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27607
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27608
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27609
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27610
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27611
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27612
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27613
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:29:07.642234"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:29:07.642234"]]
|
27614
|
+
[1m[35m (0.8ms)[0m commit transaction
|
27615
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27616
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27617
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27618
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27619
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27620
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27621
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27622
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27623
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27624
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27625
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27626
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27627
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27628
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27629
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27630
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27631
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27632
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27633
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27634
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:29:07.692457"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:29:07.692457"], ["user_id", 1]]
|
27635
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27636
|
+
---------------------------------------------------
|
27637
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
27638
|
+
---------------------------------------------------
|
27639
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
27640
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27641
|
+
[1m[35mSQL (1.3ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
27642
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27643
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
27644
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
27645
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27646
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:29:07.752473"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:29:07.752473"]]
|
27647
|
+
[1m[35m (0.8ms)[0m commit transaction
|
27648
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27649
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27650
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27651
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27652
|
+
[1m[36mClarkKent::ReportEmail Load (0.3ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
27653
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27654
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
27655
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
27656
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
27657
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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 1 [["report_id", 1]]
|
27658
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
27659
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
27660
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
27661
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
|
27662
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27663
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27664
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27665
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27666
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27667
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27668
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27669
|
+
FROM sqlite_master
|
27670
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27671
|
+
UNION ALL
|
27672
|
+
SELECT sql
|
27673
|
+
FROM sqlite_temp_master
|
27674
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27675
|
+
[0m
|
27676
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27677
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27678
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27679
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27680
|
+
FROM sqlite_master
|
27681
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27682
|
+
UNION ALL
|
27683
|
+
SELECT sql
|
27684
|
+
FROM sqlite_temp_master
|
27685
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27686
|
+
[0m
|
27687
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27688
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27689
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27690
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27691
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27692
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27693
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27694
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27695
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27696
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27697
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27698
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27699
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27700
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27701
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27702
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:29:24.568307"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:29:24.568307"]]
|
27703
|
+
[1m[35m (0.8ms)[0m commit transaction
|
27704
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27705
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27706
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
27707
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27708
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27709
|
+
[1m[35m (0.6ms)[0m commit transaction
|
27710
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27711
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27712
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27713
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27714
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27715
|
+
[1m[35m (0.8ms)[0m commit transaction
|
27716
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27717
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27718
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27719
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27720
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27721
|
+
[1m[35m (1.0ms)[0m commit transaction
|
27722
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27723
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:29:24.620188"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:29:24.620188"], ["user_id", 1]]
|
27724
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27725
|
+
---------------------------------------------------
|
27726
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
27727
|
+
---------------------------------------------------
|
27728
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
27729
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27730
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
27731
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27732
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
27733
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27734
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27735
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-10-05 17:29:24.676625"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:29:24.676625"]]
|
27736
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27737
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27738
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27739
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27740
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27741
|
+
[1m[36mClarkKent::ReportEmail Load (0.3ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
27742
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27743
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
27744
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
27745
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
27746
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m 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 1 [["report_id", 1]]
|
27747
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
27748
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
27749
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
27750
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
|
27751
|
+
-----------------------------------------------------------------------------------------
|
27752
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
27753
|
+
-----------------------------------------------------------------------------------------
|
27754
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
27755
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27756
|
+
[1m[36mSQL (1.6ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
27757
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27758
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
27759
|
+
[1m[35m (0.6ms)[0m commit transaction
|
27760
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
27761
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27762
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27763
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27764
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 2]]
|
27765
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27766
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
27767
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
27768
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
27769
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
27770
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
27771
|
+
[1m[36m (1.6ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
27772
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
27773
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
27774
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
27775
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27776
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
27777
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27778
|
+
FROM sqlite_master
|
27779
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27780
|
+
UNION ALL
|
27781
|
+
SELECT sql
|
27782
|
+
FROM sqlite_temp_master
|
27783
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
27784
|
+
[0m
|
27785
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
27786
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
27787
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
27788
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
27789
|
+
FROM sqlite_master
|
27790
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27791
|
+
UNION ALL
|
27792
|
+
SELECT sql
|
27793
|
+
FROM sqlite_temp_master
|
27794
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
27795
|
+
[0m
|
27796
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
27797
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
27798
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
27799
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
27800
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
27801
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
27802
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
27803
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
27804
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
27805
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
27806
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
27807
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
27808
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
27809
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
27810
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27811
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-10-05 17:29:45.486161"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:29:45.486161"]]
|
27812
|
+
[1m[35m (1.0ms)[0m commit transaction
|
27813
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27814
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
27815
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
27816
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27817
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
27818
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27819
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27820
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
27821
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
27822
|
+
[1m[35m (0.1ms)[0m begin transaction
|
27823
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
27824
|
+
[1m[35m (0.7ms)[0m commit transaction
|
27825
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27826
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
27827
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27828
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27829
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
27830
|
+
[1m[35m (0.9ms)[0m commit transaction
|
27831
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27832
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-10-05 17:29:45.539773"], ["description", "Guitar strings"], ["updated_at", "2015-10-05 17:29:45.539773"], ["user_id", 1]]
|
27833
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27834
|
+
-----------------------------------------------------------
|
27835
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
27836
|
+
-----------------------------------------------------------
|
27837
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27838
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
27839
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
27840
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
27841
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
27842
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27843
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 17:29:45.609844"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:29:45.609844"]]
|
27844
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
27845
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (4.9ms)
|
27846
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m 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"]]
|
27847
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (5.1ms)
|
27848
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
27849
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.8ms)
|
27850
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
27851
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (7.2ms)
|
27852
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (32.4ms)
|
27853
|
+
Completed 200 OK in 171ms (Views: 167.2ms | ActiveRecord: 2.2ms)
|
27854
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
27855
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
27856
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27857
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
27858
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
27859
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
27860
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 2]]
|
27861
|
+
[1m[35m (1.5ms)[0m commit transaction
|
27862
|
+
------------------------------------------------------------
|
27863
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
27864
|
+
------------------------------------------------------------
|
27865
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27866
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
27867
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
27868
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 17:29:45.789742"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:29:45.789742"]]
|
27869
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
27870
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
27871
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
27872
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
27873
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 3]]
|
27874
|
+
[1m[35m (0.0ms)[0m begin transaction
|
27875
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
27876
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m 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", 3]]
|
27877
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 3]]
|
27878
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 3]]
|
27879
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
27880
|
+
Redirected to http://test.host/reports/reports
|
27881
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
|
27882
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
27883
|
+
------------------------------------------------------
|
27884
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
27885
|
+
------------------------------------------------------
|
27886
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27887
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
27888
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
27889
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
27890
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
27891
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.8ms)
|
27892
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
27893
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.2ms)
|
27894
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
27895
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.7ms)
|
27896
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.1ms)
|
27897
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
27898
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
27899
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.2ms)
|
27900
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
27901
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.2ms)
|
27902
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
27903
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (7.8ms)
|
27904
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
27905
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (0.9ms)
|
27906
|
+
Completed 200 OK in 14ms (Views: 12.9ms | ActiveRecord: 0.4ms)
|
27907
|
+
-------------------------------------------------------
|
27908
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
27909
|
+
-------------------------------------------------------
|
27910
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27911
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
27912
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
27913
|
+
Parameters: {"current_user_id"=>"1"}
|
27914
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
27915
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
27916
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
27917
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
27918
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
27919
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
27920
|
+
Completed 200 OK in 20ms (Views: 19.3ms | ActiveRecord: 0.9ms)
|
27921
|
+
-----------------------------------------------------
|
27922
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
27923
|
+
-----------------------------------------------------
|
27924
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27925
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
27926
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
27927
|
+
Parameters: {"current_user_id"=>"1"}
|
27928
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
27929
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
27930
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (40.1ms)
|
27931
|
+
Completed 200 OK in 47ms (Views: 46.3ms | ActiveRecord: 0.2ms)
|
27932
|
+
---------------------------------------------------------
|
27933
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
27934
|
+
---------------------------------------------------------
|
27935
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27936
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
27937
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
27938
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
27939
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27940
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
27941
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27942
|
+
[1m[35m (0.1ms)[0m 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"]]
|
27943
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27944
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.7ms)
|
27945
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
27946
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
27947
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (19.0ms)
|
27948
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
|
27949
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.5ms)
|
27950
|
+
Completed 200 OK in 41ms (Views: 36.3ms | ActiveRecord: 1.0ms)
|
27951
|
+
-----------------------------------------------------------------
|
27952
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
27953
|
+
-----------------------------------------------------------------
|
27954
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27955
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
27956
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
27957
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-10-05", "created_at_from"=>"2015-10-04", "id"=>"1"}
|
27958
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
27959
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
27960
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
27961
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
27962
|
+
[1m[35m (0.1ms)[0m 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"]]
|
27963
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27964
|
+
[1m[35m (0.1ms)[0m 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"]]
|
27965
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.4ms)
|
27966
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
27967
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
27968
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.2ms)
|
27969
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
27970
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)[0m
|
27971
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0) subquery_for_count
|
27972
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.6ms)
|
27973
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
27974
|
+
[1m[35mOrder Load (0.2ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
27975
|
+
(SELECT u.name
|
27976
|
+
FROM users u
|
27977
|
+
WHERE u.id = orders.user_id)
|
27978
|
+
as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
|
27979
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
27980
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27981
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
27982
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
27983
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.1ms)
|
27984
|
+
Completed 200 OK in 28ms (Views: 22.4ms | ActiveRecord: 1.9ms)
|
27985
|
+
--------------------------------------------------------------------
|
27986
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
27987
|
+
--------------------------------------------------------------------
|
27988
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27989
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
27990
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
27991
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
27992
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
27993
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
27994
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27995
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
27996
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27997
|
+
[1m[35m (0.1ms)[0m 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"]]
|
27998
|
+
[1m[36m (0.1ms)[0m [1mSELECT "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" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
27999
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
28000
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
28001
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
28002
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
28003
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
28004
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
28005
|
+
Completed 200 OK in 11ms (Views: 5.8ms | ActiveRecord: 1.0ms)
|
28006
|
+
-----------------------------------------------------------
|
28007
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
28008
|
+
-----------------------------------------------------------
|
28009
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
28010
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
28011
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
28012
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
28013
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
28014
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
28015
|
+
[1m[35m (0.1ms)[0m commit transaction
|
28016
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.6ms)
|
28017
|
+
Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.2ms)
|
28018
|
+
-------------------------------------------------------------------
|
28019
|
+
ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
|
28020
|
+
-------------------------------------------------------------------
|
28021
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
28022
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 17:29:45.989654"], ["name", "test one"], ["resource_type", "Order"], ["updated_at", "2015-10-05 17:29:45.989654"]]
|
28023
|
+
[1m[36m (1.4ms)[0m [1mcommit transaction[0m
|
28024
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m 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", 4]]
|
28025
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 4], ["filterable_type", "ClarkKent::Report"]]
|
28026
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 4]]
|
28027
|
+
---------------------------------------------------------------------
|
28028
|
+
ClarkKent::ReportableTest: test_it_works_without_any_required_filters
|
28029
|
+
---------------------------------------------------------------------
|
28030
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
28031
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-10-05 17:29:45.996013"], ["name", "test one"], ["resource_type", "TestReportable"], ["updated_at", "2015-10-05 17:29:45.996013"]]
|
28032
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
28033
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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", 5]]
|
28034
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 5], ["filterable_type", "ClarkKent::Report"]]
|
28035
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 5]]
|
28036
|
+
------------------------------------------------------------------------------------------------
|
28037
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
28038
|
+
------------------------------------------------------------------------------------------------
|
28039
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
28040
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
28041
|
+
-------------------------
|
28042
|
+
ClarkKentTest: test_truth
|
28043
|
+
-------------------------
|
28044
|
+
---------------------------------------------------
|
28045
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
28046
|
+
---------------------------------------------------
|
28047
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
28048
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
28049
|
+
[1m[36mSQL (1.2ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
28050
|
+
[1m[35m (0.1ms)[0m begin transaction
|
28051
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
28052
|
+
[1m[35m (0.8ms)[0m commit transaction
|
28053
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
28054
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-10-05 17:29:46.030462"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-10-05 17:29:46.030462"]]
|
28055
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
28056
|
+
[1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
28057
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
28058
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
28059
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
28060
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
|
28061
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
28062
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
28063
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
28064
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
28065
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
28066
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
28067
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
28068
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|
28069
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)[0m
|
28070
|
+
-----------------------------------------------------------------------------------------
|
28071
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
28072
|
+
-----------------------------------------------------------------------------------------
|
28073
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
28074
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
28075
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
28076
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
28077
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
28078
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
28079
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
28080
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
28081
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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"]]
|
28082
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
28083
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 2]]
|
28084
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
28085
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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]]
|
28086
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
28087
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m 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::ReportEmail"]]
|
28088
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "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 1[0m [["report_id", 1]]
|
28089
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m 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 1 [["report_id", 1]]
|