clark_kent 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/clark_kent/application_helper.rb +10 -1
  3. data/app/models/clark_kent/report.rb +1 -1
  4. data/app/models/clark_kent/report_column.rb +8 -0
  5. data/app/models/clark_kent/report_config.rb +1 -1
  6. data/app/views/clark_kent/reports/show.html.erb +1 -1
  7. data/lib/clark_kent/version.rb +1 -1
  8. data/test/dummy/db/test.sqlite3 +0 -0
  9. data/test/dummy/log/test.log +1180 -0
  10. data/test/dummy/tmp/cache/assets/sprockets/v3.0/7wkkNeyL-5f8CXSn7mMl8AVNJDqKAiYwQs3n_B6mQyU.cache +0 -0
  11. data/test/dummy/tmp/cache/assets/sprockets/v3.0/8S9BWbkqyqZJQUbtQschJbKqEQhGcIJGHi3MQwciyag.cache +1 -0
  12. data/test/dummy/tmp/cache/assets/sprockets/v3.0/9wAn82iO6baAuljoEQVoaVPuY9XDGcbcBtl8qv6StxQ.cache +1 -0
  13. data/test/dummy/tmp/cache/assets/sprockets/v3.0/HOfAHEuP6I8KPPyp98JcoOXTGi11_FBhOJwFtsevX-A.cache +1 -0
  14. data/test/dummy/tmp/cache/assets/sprockets/v3.0/HoeR2i4C0fFw3InDLqJk6bUaQeky8AuUobvnvjv6pHM.cache +0 -0
  15. data/test/dummy/tmp/cache/assets/sprockets/v3.0/ICbkYKfaoZRUPEOztDCgFmCKItizJSF6nxzG5MhlT5k.cache +0 -0
  16. data/test/dummy/tmp/cache/assets/sprockets/v3.0/JbcAACpMmVlknG104wCtLY73aNeelGB5NNPiF4uDf5s.cache +0 -0
  17. data/test/dummy/tmp/cache/assets/sprockets/v3.0/MBGxecGwxTYQEY7eD6RjPwyEK-nzQYdEg6L1CKxeNrg.cache +0 -0
  18. data/test/dummy/tmp/cache/assets/sprockets/v3.0/O8akbUwAbmIKY-AhITimq-JDQ6IgsO3Hvq2v5etufFw.cache +0 -0
  19. data/test/dummy/tmp/cache/assets/sprockets/v3.0/O_lf7JlEpHIA6lJttTUysIjiZne0WHcrriF_gfYEPuk.cache +1 -0
  20. data/test/dummy/tmp/cache/assets/sprockets/v3.0/QiWdA0USMx1DANK8U_xj8UkshlB2A5ERdXEtrOCdNgU.cache +1 -0
  21. data/test/dummy/tmp/cache/assets/sprockets/v3.0/UwMFS8rJmeOVTOPUAsy5rBsPqe-mwJgvTSCg-8xwSK8.cache +0 -0
  22. data/test/dummy/tmp/cache/assets/sprockets/v3.0/VnraCsf7KCfpeFS2tHzBzKw_a2CO0CW7p-jo_0Ov0-U.cache +0 -0
  23. data/test/dummy/tmp/cache/assets/sprockets/v3.0/X-bY_yeJIl4hwsbTN_dx12dUEzsaExaUkthjOEOBjUM.cache +0 -0
  24. data/test/dummy/tmp/cache/assets/sprockets/v3.0/Yg4blpsarsGK85xxkPyxeXWfUmlqediuIlTkheX7BH4.cache +1 -0
  25. data/test/dummy/tmp/cache/assets/sprockets/v3.0/hj8Ir9wcVSy1KYrnWu9bpD24vDhCG3tvt-nKbNxb1Wg.cache +0 -0
  26. data/test/dummy/tmp/cache/assets/sprockets/v3.0/oCsZTGZyV4kH8Y4OeSDUdrwfkJFPzTODZjuBKZB8oGQ.cache +0 -0
  27. data/test/dummy/tmp/cache/assets/sprockets/v3.0/tPF6H9NRpGO3whu2y5_e_R_1EACKdCwu5437D83qJT0.cache +0 -0
  28. data/test/helpers/clark_kent/reports_helper_test.rb +20 -0
  29. data/test/models/clark_kent/report_email_test.rb +1 -1
  30. metadata +26 -2
@@ -35726,3 +35726,1183 @@ ClarkKent::ReportableTest: test_it_works_without_any_required_filters
35726
35726
  ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
35727
35727
  ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 2]]
35728
35728
   (0.3ms) rollback transaction
35729
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
35730
+  (1.0ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
35731
+  (0.3ms) select sqlite_version(*)
35732
+  (0.9ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
35733
+  (1.0ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
35734
+  (0.8ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
35735
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
35736
+  (0.1ms) SELECT sql
35737
+ FROM sqlite_master
35738
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
35739
+ UNION ALL
35740
+ SELECT sql
35741
+ FROM sqlite_temp_master
35742
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
35743
+
35744
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
35745
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
35746
+  (0.7ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
35747
+  (0.1ms) SELECT sql
35748
+ FROM sqlite_master
35749
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
35750
+ UNION ALL
35751
+ SELECT sql
35752
+ FROM sqlite_temp_master
35753
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
35754
+
35755
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
35756
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
35757
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
35758
+  (0.8ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
35759
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
35760
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
35761
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
35762
+  (0.1ms) SELECT version FROM "schema_migrations"
35763
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
35764
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
35765
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
35766
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
35767
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
35768
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
35769
+  (0.0ms) begin transaction
35770
+ SQL (0.6ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:01:26.748681"], ["updated_at", "2016-07-31 22:01:26.748681"]]
35771
+  (0.8ms) commit transaction
35772
+  (0.0ms) begin transaction
35773
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
35774
+  (0.7ms) commit transaction
35775
+  (0.0ms) begin transaction
35776
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
35777
+  (0.7ms) commit transaction
35778
+  (0.0ms) begin transaction
35779
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
35780
+  (0.6ms) commit transaction
35781
+  (0.0ms) begin transaction
35782
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
35783
+  (0.6ms) commit transaction
35784
+  (0.1ms) begin transaction
35785
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
35786
+  (0.8ms) commit transaction
35787
+  (0.0ms) begin transaction
35788
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
35789
+  (0.7ms) commit transaction
35790
+  (0.0ms) begin transaction
35791
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:01:26.799340"], ["updated_at", "2016-07-31 22:01:26.799340"]]
35792
+  (0.7ms) commit transaction
35793
+  (0.1ms) begin transaction
35794
+ -------------------------------------------------------------------
35795
+ ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
35796
+ -------------------------------------------------------------------
35797
+  (0.1ms) SAVEPOINT active_record_1
35798
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", "2016-07-31 22:01:26.849371"], ["updated_at", "2016-07-31 22:01:26.849371"]]
35799
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35800
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
35801
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
35802
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 2]]
35803
+  (0.3ms) rollback transaction
35804
+  (0.1ms) begin transaction
35805
+ ---------------------------------------------------------------------
35806
+ ClarkKent::ReportableTest: test_it_works_without_any_required_filters
35807
+ ---------------------------------------------------------------------
35808
+  (0.1ms) SAVEPOINT active_record_1
35809
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", "2016-07-31 22:01:26.861072"], ["updated_at", "2016-07-31 22:01:26.861072"]]
35810
+  (0.1ms) RELEASE SAVEPOINT active_record_1
35811
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
35812
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
35813
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 2]]
35814
+  (0.4ms) rollback transaction
35815
+  (0.1ms) begin transaction
35816
+ ---------------------------------------------------
35817
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
35818
+ ---------------------------------------------------
35819
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
35820
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35821
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
35822
+  (0.1ms) SAVEPOINT active_record_1
35823
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
35824
+  (0.1ms) RELEASE SAVEPOINT active_record_1
35825
+  (0.1ms) SAVEPOINT active_record_1
35826
+ SQL (0.5ms) INSERT INTO "clark_kent_report_filters" ("type", "filter_name", "duration", "kind_of_day", "offset", "filterable_id", "filterable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["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", "2016-07-31 22:01:26.912555"], ["updated_at", "2016-07-31 22:01:26.912555"]]
35827
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35828
+  (0.8ms) rollback transaction
35829
+  (0.1ms) begin transaction
35830
+ -----------------------------------------------------------------------------------------
35831
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
35832
+ -----------------------------------------------------------------------------------------
35833
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
35834
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35835
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
35836
+  (0.0ms) SAVEPOINT active_record_1
35837
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
35838
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35839
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
35840
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
35841
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
35842
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
35843
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
35844
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
35845
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
35846
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
35847
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
35848
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
35849
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
35850
+  (0.5ms) rollback transaction
35851
+  (0.1ms) begin transaction
35852
+ ------------------------------------------------------------------------------------------------
35853
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
35854
+ ------------------------------------------------------------------------------------------------
35855
+  (0.1ms) SAVEPOINT active_record_1
35856
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
35857
+  (0.1ms) rollback transaction
35858
+  (0.1ms) begin transaction
35859
+ -------------------------
35860
+ ClarkKentTest: test_truth
35861
+ -------------------------
35862
+  (0.0ms) rollback transaction
35863
+  (0.0ms) begin transaction
35864
+ -------------------------------------------------------
35865
+ ClarkKent::ReportsController: test_should_create_report
35866
+ -------------------------------------------------------
35867
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35868
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
35869
+ Processing by ClarkKent::ReportsController#create as HTML
35870
+ Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
35871
+  (0.1ms) SAVEPOINT active_record_1
35872
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", "2016-07-31 22:01:26.957984"], ["updated_at", "2016-07-31 22:01:26.957984"]]
35873
+  (0.1ms) RELEASE SAVEPOINT active_record_1
35874
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (6.1ms)
35875
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
35876
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.6ms)
35877
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
35878
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (4.5ms)
35879
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
35880
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (3.5ms)
35881
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (34.7ms)
35882
+ Completed 200 OK in 469ms (Views: 465.5ms | ActiveRecord: 0.7ms)
35883
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT 1 [["name", "delete me"]]
35884
+  (0.0ms) SAVEPOINT active_record_1
35885
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
35886
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
35887
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
35888
+ SQL (0.3ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
35889
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35890
+  (0.5ms) rollback transaction
35891
+  (0.1ms) begin transaction
35892
+ --------------------------------------------------------
35893
+ ClarkKent::ReportsController: test_should_destroy_report
35894
+ --------------------------------------------------------
35895
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35896
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
35897
+  (0.0ms) SAVEPOINT active_record_1
35898
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", "2016-07-31 22:01:27.431435"], ["updated_at", "2016-07-31 22:01:27.431435"]]
35899
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35900
+  (0.0ms) SELECT COUNT(*) FROM "clark_kent_reports"
35901
+ Processing by ClarkKent::ReportsController#destroy as HTML
35902
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
35903
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 2]]
35904
+  (0.1ms) SAVEPOINT active_record_1
35905
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
35906
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
35907
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
35908
+ SQL (0.3ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
35909
+  (0.0ms) RELEASE SAVEPOINT active_record_1
35910
+ Redirected to http://test.host/reports/reports
35911
+ Completed 302 Found in 6ms (ActiveRecord: 0.6ms)
35912
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
35913
+  (0.7ms) rollback transaction
35914
+  (0.1ms) begin transaction
35915
+ --------------------------------------------------
35916
+ ClarkKent::ReportsController: test_should_get_edit
35917
+ --------------------------------------------------
35918
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35919
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
35920
+ Processing by ClarkKent::ReportsController#edit as HTML
35921
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
35922
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
35923
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (4.2ms)
35924
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
35925
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.2ms)
35926
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
35927
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.9ms)
35928
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (6.2ms)
35929
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.1ms)
35930
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.3ms)
35931
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.5ms)
35932
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.7ms)
35933
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.5ms)
35934
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.7ms)
35935
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (20.2ms)
35936
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
35937
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (2.9ms)
35938
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (33.6ms)
35939
+ Completed 200 OK in 37ms (Views: 35.9ms | ActiveRecord: 0.3ms)
35940
+  (0.1ms) rollback transaction
35941
+  (0.1ms) begin transaction
35942
+ ---------------------------------------------------
35943
+ ClarkKent::ReportsController: test_should_get_index
35944
+ ---------------------------------------------------
35945
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35946
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
35947
+ Processing by ClarkKent::ReportsController#index as HTML
35948
+ Parameters: {"current_user_id"=>"1"}
35949
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
35950
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
35951
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
35952
+ ClarkKent::Report Exists (0.0ms) 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"]]
35953
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
35954
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
35955
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (21.0ms)
35956
+ Completed 200 OK in 27ms (Views: 25.9ms | ActiveRecord: 0.5ms)
35957
+  (0.1ms) rollback transaction
35958
+  (0.0ms) begin transaction
35959
+ -------------------------------------------------
35960
+ ClarkKent::ReportsController: test_should_get_new
35961
+ -------------------------------------------------
35962
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35963
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
35964
+ Processing by ClarkKent::ReportsController#new as HTML
35965
+ Parameters: {"current_user_id"=>"1"}
35966
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
35967
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
35968
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (66.6ms)
35969
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (71.9ms)
35970
+ Completed 200 OK in 78ms (Views: 77.4ms | ActiveRecord: 0.1ms)
35971
+  (0.1ms) rollback transaction
35972
+  (0.1ms) begin transaction
35973
+ -----------------------------------------------------
35974
+ ClarkKent::ReportsController: test_should_show_report
35975
+ -----------------------------------------------------
35976
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35977
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
35978
+ Processing by ClarkKent::ReportsController#show as HTML
35979
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
35980
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT 1 [["id", 1]]
35981
+ ClarkKent::ReportColumn Load (0.1ms) 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
35982
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
35983
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
35984
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
35985
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.0ms)
35986
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
35987
+ User Load (0.1ms) SELECT "users".* FROM "users"
35988
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.0ms)
35989
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
35990
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.7ms)
35991
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (21.0ms)
35992
+ Completed 200 OK in 34ms (Views: 26.4ms | ActiveRecord: 0.6ms)
35993
+  (0.1ms) rollback transaction
35994
+  (0.1ms) begin transaction
35995
+ -------------------------------------------------------------
35996
+ ClarkKent::ReportsController: test_should_show_report_results
35997
+ -------------------------------------------------------------
35998
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
35999
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36000
+ Processing by ClarkKent::ReportsController#show as HTML
36001
+ Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2016-07-31", "created_at_from"=>"2016-07-30", "id"=>"1"}
36002
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT 1 [["id", 1]]
36003
+ ClarkKent::ReportColumn Load (0.1ms) 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
36004
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36005
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36006
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36007
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36008
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36009
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36010
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
36011
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36012
+ User Load (0.1ms) SELECT "users".* FROM "users"
36013
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.8ms)
36014
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
36015
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
36016
+  (0.1ms) 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
36017
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.3ms)
36018
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
36019
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
36020
+ (SELECT u.name
36021
+ FROM users u
36022
+ WHERE u.id = orders.user_id)
36023
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
36024
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36025
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36026
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36027
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36028
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (2.6ms)
36029
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (29.0ms)
36030
+ Completed 200 OK in 46ms (Views: 30.1ms | ActiveRecord: 1.3ms)
36031
+  (0.1ms) rollback transaction
36032
+  (0.1ms) begin transaction
36033
+ ----------------------------------------------------------------
36034
+ ClarkKent::ReportsController: test_should_show_report_run_errors
36035
+ ----------------------------------------------------------------
36036
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36037
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36038
+ Processing by ClarkKent::ReportsController#show as HTML
36039
+ Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
36040
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT 1 [["id", 1]]
36041
+ ClarkKent::ReportColumn Load (0.2ms) 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
36042
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36043
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36044
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36045
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36046
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36047
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36048
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
36049
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36050
+ User Load (0.1ms) SELECT "users".* FROM "users"
36051
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.3ms)
36052
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
36053
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
36054
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (8.0ms)
36055
+ Completed 200 OK in 14ms (Views: 9.6ms | ActiveRecord: 0.9ms)
36056
+  (0.1ms) rollback transaction
36057
+  (0.1ms) begin transaction
36058
+ -------------------------------------------------------
36059
+ ClarkKent::ReportsController: test_should_update_report
36060
+ -------------------------------------------------------
36061
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36062
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36063
+ Processing by ClarkKent::ReportsController#update as HTML
36064
+ Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
36065
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36066
+  (0.1ms) SAVEPOINT active_record_1
36067
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36068
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (4.0ms)
36069
+ Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.2ms)
36070
+  (0.1ms) rollback transaction
36071
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
36072
+  (1.9ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
36073
+  (0.1ms) select sqlite_version(*)
36074
+  (0.9ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36075
+  (0.8ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36076
+  (0.9ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
36077
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36078
+  (0.2ms) SELECT sql
36079
+ FROM sqlite_master
36080
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36081
+ UNION ALL
36082
+ SELECT sql
36083
+ FROM sqlite_temp_master
36084
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36085
+
36086
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36087
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
36088
+  (0.7ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36089
+  (0.1ms) SELECT sql
36090
+ FROM sqlite_master
36091
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36092
+ UNION ALL
36093
+ SELECT sql
36094
+ FROM sqlite_temp_master
36095
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36096
+
36097
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36098
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36099
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36100
+  (0.8ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
36101
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36102
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36103
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36104
+  (0.1ms) SELECT version FROM "schema_migrations"
36105
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36106
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36107
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36108
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36109
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36110
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36111
+  (0.0ms) begin transaction
36112
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:02:57.137498"], ["updated_at", "2016-07-31 22:02:57.137498"]]
36113
+  (0.8ms) commit transaction
36114
+  (0.0ms) begin transaction
36115
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36116
+  (1.0ms) commit transaction
36117
+  (0.1ms) begin transaction
36118
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36119
+  (1.0ms) commit transaction
36120
+  (0.1ms) begin transaction
36121
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36122
+  (0.7ms) commit transaction
36123
+  (0.1ms) begin transaction
36124
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36125
+  (0.7ms) commit transaction
36126
+  (0.1ms) begin transaction
36127
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36128
+  (0.7ms) commit transaction
36129
+  (0.1ms) begin transaction
36130
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36131
+  (0.8ms) commit transaction
36132
+  (0.1ms) begin transaction
36133
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:02:57.189630"], ["updated_at", "2016-07-31 22:02:57.189630"]]
36134
+  (1.2ms) commit transaction
36135
+  (0.1ms) begin transaction
36136
+ -------------------------------------------------------
36137
+ ClarkKent::ReportsController: test_should_create_report
36138
+ -------------------------------------------------------
36139
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36140
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36141
+ Processing by ClarkKent::ReportsController#create as HTML
36142
+ Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
36143
+  (0.1ms) SAVEPOINT active_record_1
36144
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", "2016-07-31 22:02:57.241050"], ["updated_at", "2016-07-31 22:02:57.241050"]]
36145
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36146
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (13.7ms)
36147
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
36148
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (9.7ms)
36149
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
36150
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (3.7ms)
36151
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
36152
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (14.0ms)
36153
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (54.1ms)
36154
+ Completed 200 OK in 239ms (Views: 235.4ms | ActiveRecord: 1.0ms)
36155
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT 1 [["name", "delete me"]]
36156
+  (0.0ms) SAVEPOINT active_record_1
36157
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
36158
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
36159
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
36160
+ SQL (0.4ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
36161
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36162
+  (1.3ms) rollback transaction
36163
+  (0.1ms) begin transaction
36164
+ --------------------------------------------------------
36165
+ ClarkKent::ReportsController: test_should_destroy_report
36166
+ --------------------------------------------------------
36167
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36168
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36169
+  (0.0ms) SAVEPOINT active_record_1
36170
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", "2016-07-31 22:02:57.490012"], ["updated_at", "2016-07-31 22:02:57.490012"]]
36171
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36172
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
36173
+ Processing by ClarkKent::ReportsController#destroy as HTML
36174
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
36175
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 2]]
36176
+  (0.1ms) SAVEPOINT active_record_1
36177
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
36178
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
36179
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
36180
+ SQL (0.3ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
36181
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36182
+ Redirected to http://test.host/reports/reports
36183
+ Completed 302 Found in 7ms (ActiveRecord: 0.7ms)
36184
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
36185
+  (0.7ms) rollback transaction
36186
+  (0.1ms) begin transaction
36187
+ --------------------------------------------------
36188
+ ClarkKent::ReportsController: test_should_get_edit
36189
+ --------------------------------------------------
36190
+ ClarkKent::Report Load (0.3ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36191
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36192
+ Processing by ClarkKent::ReportsController#edit as HTML
36193
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
36194
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36195
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.9ms)
36196
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36197
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.9ms)
36198
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
36199
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.9ms)
36200
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (5.5ms)
36201
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.3ms)
36202
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.5ms)
36203
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.8ms)
36204
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.2ms)
36205
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.5ms)
36206
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.9ms)
36207
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (19.2ms)
36208
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
36209
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (2.7ms)
36210
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (31.5ms)
36211
+ Completed 200 OK in 35ms (Views: 33.7ms | ActiveRecord: 0.3ms)
36212
+  (0.1ms) rollback transaction
36213
+  (0.1ms) begin transaction
36214
+ ---------------------------------------------------
36215
+ ClarkKent::ReportsController: test_should_get_index
36216
+ ---------------------------------------------------
36217
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36218
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36219
+ Processing by ClarkKent::ReportsController#index as HTML
36220
+ Parameters: {"current_user_id"=>"1"}
36221
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
36222
+ ClarkKent::Report Exists (0.2ms) 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"]]
36223
+ Department Load (0.3ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
36224
+ ClarkKent::Report Exists (0.0ms) 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"]]
36225
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
36226
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
36227
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (20.5ms)
36228
+ Completed 200 OK in 26ms (Views: 24.5ms | ActiveRecord: 0.8ms)
36229
+  (0.1ms) rollback transaction
36230
+  (0.1ms) begin transaction
36231
+ -------------------------------------------------
36232
+ ClarkKent::ReportsController: test_should_get_new
36233
+ -------------------------------------------------
36234
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36235
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36236
+ Processing by ClarkKent::ReportsController#new as HTML
36237
+ Parameters: {"current_user_id"=>"1"}
36238
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT 1 [["id", 1]]
36239
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
36240
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (60.9ms)
36241
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (66.1ms)
36242
+ Completed 200 OK in 71ms (Views: 70.5ms | ActiveRecord: 0.1ms)
36243
+  (0.1ms) rollback transaction
36244
+  (0.1ms) begin transaction
36245
+ -----------------------------------------------------
36246
+ ClarkKent::ReportsController: test_should_show_report
36247
+ -----------------------------------------------------
36248
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36249
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36250
+ Processing by ClarkKent::ReportsController#show as HTML
36251
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
36252
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT 1 [["id", 1]]
36253
+ ClarkKent::ReportColumn Load (0.1ms) 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
36254
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36255
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36256
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36257
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.0ms)
36258
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36259
+ User Load (0.2ms) SELECT "users".* FROM "users"
36260
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.5ms)
36261
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
36262
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (1.1ms)
36263
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (19.2ms)
36264
+ Completed 200 OK in 30ms (Views: 23.6ms | ActiveRecord: 0.7ms)
36265
+  (0.1ms) rollback transaction
36266
+  (0.1ms) begin transaction
36267
+ -------------------------------------------------------------
36268
+ ClarkKent::ReportsController: test_should_show_report_results
36269
+ -------------------------------------------------------------
36270
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36271
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36272
+ Processing by ClarkKent::ReportsController#show as HTML
36273
+ Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2016-07-31", "created_at_from"=>"2016-07-30", "id"=>"1"}
36274
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT 1 [["id", 1]]
36275
+ ClarkKent::ReportColumn Load (0.4ms) 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
36276
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36277
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36278
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36279
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36280
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36281
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
36282
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36283
+ User Load (0.1ms) SELECT "users".* FROM "users"
36284
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.9ms)
36285
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
36286
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
36287
+  (0.1ms) 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
36288
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (3.9ms)
36289
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
36290
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
36291
+ (SELECT u.name
36292
+ FROM users u
36293
+ WHERE u.id = orders.user_id)
36294
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT 10 OFFSET 0
36295
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36296
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36297
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36298
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36299
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (2.8ms)
36300
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (28.5ms)
36301
+ Completed 200 OK in 43ms (Views: 36.4ms | ActiveRecord: 1.4ms)
36302
+  (0.1ms) rollback transaction
36303
+  (0.1ms) begin transaction
36304
+ ----------------------------------------------------------------
36305
+ ClarkKent::ReportsController: test_should_show_report_run_errors
36306
+ ----------------------------------------------------------------
36307
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36308
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36309
+ Processing by ClarkKent::ReportsController#show as HTML
36310
+ Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
36311
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT 1 [["id", 1]]
36312
+ ClarkKent::ReportColumn Load (0.1ms) 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
36313
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36314
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36315
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36316
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36317
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36318
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
36319
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36320
+ User Load (0.1ms) SELECT "users".* FROM "users"
36321
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.8ms)
36322
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
36323
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
36324
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (6.4ms)
36325
+ Completed 200 OK in 12ms (Views: 7.9ms | ActiveRecord: 0.6ms)
36326
+  (0.1ms) rollback transaction
36327
+  (0.1ms) begin transaction
36328
+ -------------------------------------------------------
36329
+ ClarkKent::ReportsController: test_should_update_report
36330
+ -------------------------------------------------------
36331
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36332
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
36333
+ Processing by ClarkKent::ReportsController#update as HTML
36334
+ Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
36335
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36336
+  (0.0ms) SAVEPOINT active_record_1
36337
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36338
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.7ms)
36339
+ Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.1ms)
36340
+  (0.1ms) rollback transaction
36341
+  (0.0ms) begin transaction
36342
+ ------------------------------------------------------------------------------------------------
36343
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
36344
+ ------------------------------------------------------------------------------------------------
36345
+  (0.0ms) SAVEPOINT active_record_1
36346
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
36347
+  (0.0ms) rollback transaction
36348
+  (0.0ms) begin transaction
36349
+ ---------------------------------------------------
36350
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
36351
+ ---------------------------------------------------
36352
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
36353
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36354
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
36355
+  (0.0ms) SAVEPOINT active_record_1
36356
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
36357
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36358
+  (0.1ms) SAVEPOINT active_record_1
36359
+ SQL (0.5ms) INSERT INTO "clark_kent_report_filters" ("type", "filter_name", "duration", "kind_of_day", "offset", "filterable_id", "filterable_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["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", "2016-07-31 22:02:57.790436"], ["updated_at", "2016-07-31 22:02:57.790436"]]
36360
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36361
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
36362
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36363
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36364
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
36365
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
36366
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36367
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
36368
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36369
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
36370
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36371
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36372
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36373
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36374
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
36375
+  (1.3ms) rollback transaction
36376
+  (0.1ms) begin transaction
36377
+ -----------------------------------------------------------------------------------------
36378
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
36379
+ -----------------------------------------------------------------------------------------
36380
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "taproot@gmail.com"]]
36381
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
36382
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
36383
+  (0.0ms) SAVEPOINT active_record_1
36384
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
36385
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36386
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
36387
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36388
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36389
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
36390
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
36391
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
36392
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
36393
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
36394
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
36395
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36396
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36397
+  (0.5ms) rollback transaction
36398
+  (0.0ms) begin transaction
36399
+ -------------------------
36400
+ ClarkKentTest: test_truth
36401
+ -------------------------
36402
+  (0.0ms) rollback transaction
36403
+  (0.0ms) begin transaction
36404
+ -------------------------------------------------------------------
36405
+ ClarkKent::ReportableTest: test_it_adds_required_filters_if_present
36406
+ -------------------------------------------------------------------
36407
+  (0.0ms) SAVEPOINT active_record_1
36408
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", "2016-07-31 22:02:57.932107"], ["updated_at", "2016-07-31 22:02:57.932107"]]
36409
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36410
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
36411
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
36412
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36413
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
36414
+  (0.4ms) rollback transaction
36415
+  (0.1ms) begin transaction
36416
+ ---------------------------------------------------------------------
36417
+ ClarkKent::ReportableTest: test_it_works_without_any_required_filters
36418
+ ---------------------------------------------------------------------
36419
+  (0.0ms) SAVEPOINT active_record_1
36420
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", "2016-07-31 22:02:57.937655"], ["updated_at", "2016-07-31 22:02:57.937655"]]
36421
+  (0.0ms) RELEASE SAVEPOINT active_record_1
36422
+ ClarkKent::ReportColumn Load (0.0ms) 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]]
36423
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
36424
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 2]]
36425
+  (0.4ms) rollback transaction
36426
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
36427
+  (1.9ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
36428
+  (0.1ms) select sqlite_version(*)
36429
+  (0.9ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36430
+  (1.1ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36431
+  (0.9ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
36432
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36433
+  (0.1ms) SELECT sql
36434
+ FROM sqlite_master
36435
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36436
+ UNION ALL
36437
+ SELECT sql
36438
+ FROM sqlite_temp_master
36439
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36440
+
36441
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36442
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
36443
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36444
+  (0.1ms) SELECT sql
36445
+ FROM sqlite_master
36446
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36447
+ UNION ALL
36448
+ SELECT sql
36449
+ FROM sqlite_temp_master
36450
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36451
+
36452
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36453
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36454
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36455
+  (0.8ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
36456
+  (0.7ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36457
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36458
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36459
+  (0.1ms) SELECT version FROM "schema_migrations"
36460
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36461
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36462
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36463
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36464
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36465
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36466
+  (0.1ms) begin transaction
36467
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:08:26.301959"], ["updated_at", "2016-07-31 22:08:26.301959"]]
36468
+  (1.1ms) commit transaction
36469
+  (0.0ms) begin transaction
36470
+ SQL (0.5ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36471
+  (0.7ms) commit transaction
36472
+  (0.1ms) begin transaction
36473
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36474
+  (0.7ms) commit transaction
36475
+  (0.0ms) begin transaction
36476
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36477
+  (0.7ms) commit transaction
36478
+  (0.0ms) begin transaction
36479
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36480
+  (0.7ms) commit transaction
36481
+  (0.0ms) begin transaction
36482
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36483
+  (0.7ms) commit transaction
36484
+  (0.1ms) begin transaction
36485
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36486
+  (1.0ms) commit transaction
36487
+  (0.1ms) begin transaction
36488
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:08:26.352783"], ["updated_at", "2016-07-31 22:08:26.352783"]]
36489
+  (0.8ms) commit transaction
36490
+  (0.1ms) begin transaction
36491
+ -----------------------------------------------------
36492
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36493
+ -----------------------------------------------------
36494
+  (0.0ms) rollback transaction
36495
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
36496
+  (2.0ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
36497
+  (0.1ms) select sqlite_version(*)
36498
+  (1.0ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36499
+  (1.1ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36500
+  (1.2ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
36501
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36502
+  (0.1ms) SELECT sql
36503
+ FROM sqlite_master
36504
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36505
+ UNION ALL
36506
+ SELECT sql
36507
+ FROM sqlite_temp_master
36508
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36509
+
36510
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36511
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
36512
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36513
+  (0.1ms) SELECT sql
36514
+ FROM sqlite_master
36515
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36516
+ UNION ALL
36517
+ SELECT sql
36518
+ FROM sqlite_temp_master
36519
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36520
+
36521
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36522
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36523
+  (1.0ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36524
+  (0.9ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
36525
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36526
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36527
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36528
+  (0.1ms) SELECT version FROM "schema_migrations"
36529
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36530
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36531
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36532
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36533
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36534
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36535
+  (0.1ms) begin transaction
36536
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:08:47.602138"], ["updated_at", "2016-07-31 22:08:47.602138"]]
36537
+  (0.9ms) commit transaction
36538
+  (0.0ms) begin transaction
36539
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36540
+  (0.7ms) commit transaction
36541
+  (0.0ms) begin transaction
36542
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36543
+  (0.8ms) commit transaction
36544
+  (0.1ms) begin transaction
36545
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36546
+  (0.6ms) commit transaction
36547
+  (0.0ms) begin transaction
36548
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36549
+  (0.7ms) commit transaction
36550
+  (0.1ms) begin transaction
36551
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36552
+  (0.7ms) commit transaction
36553
+  (0.0ms) begin transaction
36554
+ SQL (0.2ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36555
+  (0.7ms) commit transaction
36556
+  (0.1ms) begin transaction
36557
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:08:47.645532"], ["updated_at", "2016-07-31 22:08:47.645532"]]
36558
+  (0.6ms) commit transaction
36559
+  (0.1ms) begin transaction
36560
+ -----------------------------------------------------
36561
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36562
+ -----------------------------------------------------
36563
+  (0.1ms) rollback transaction
36564
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
36565
+  (1.8ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
36566
+  (0.1ms) select sqlite_version(*)
36567
+  (1.1ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36568
+  (0.8ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36569
+  (0.9ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
36570
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36571
+  (0.1ms) SELECT sql
36572
+ FROM sqlite_master
36573
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36574
+ UNION ALL
36575
+ SELECT sql
36576
+ FROM sqlite_temp_master
36577
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36578
+
36579
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36580
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
36581
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36582
+  (0.1ms) SELECT sql
36583
+ FROM sqlite_master
36584
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36585
+ UNION ALL
36586
+ SELECT sql
36587
+ FROM sqlite_temp_master
36588
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36589
+
36590
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36591
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36592
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36593
+  (0.8ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
36594
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36595
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36596
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36597
+  (0.1ms) SELECT version FROM "schema_migrations"
36598
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36599
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36600
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36601
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36602
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36603
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36604
+  (0.1ms) begin transaction
36605
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:13:11.762145"], ["updated_at", "2016-07-31 22:13:11.762145"]]
36606
+  (1.0ms) commit transaction
36607
+  (0.1ms) begin transaction
36608
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36609
+  (0.7ms) commit transaction
36610
+  (0.0ms) begin transaction
36611
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36612
+  (0.7ms) commit transaction
36613
+  (0.0ms) begin transaction
36614
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36615
+  (0.7ms) commit transaction
36616
+  (0.0ms) begin transaction
36617
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36618
+  (0.6ms) commit transaction
36619
+  (0.1ms) begin transaction
36620
+ SQL (0.2ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36621
+  (0.7ms) commit transaction
36622
+  (0.0ms) begin transaction
36623
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36624
+  (0.6ms) commit transaction
36625
+  (0.1ms) begin transaction
36626
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:13:11.808483"], ["updated_at", "2016-07-31 22:13:11.808483"]]
36627
+  (0.8ms) commit transaction
36628
+  (0.1ms) begin transaction
36629
+ -----------------------------------------------------
36630
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36631
+ -----------------------------------------------------
36632
+  (0.1ms) rollback transaction
36633
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
36634
+  (2.0ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
36635
+  (0.1ms) select sqlite_version(*)
36636
+  (1.1ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36637
+  (1.2ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36638
+  (1.0ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
36639
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36640
+  (0.1ms) SELECT sql
36641
+ FROM sqlite_master
36642
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36643
+ UNION ALL
36644
+ SELECT sql
36645
+ FROM sqlite_temp_master
36646
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36647
+
36648
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36649
+  (0.9ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
36650
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36651
+  (0.1ms) SELECT sql
36652
+ FROM sqlite_master
36653
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36654
+ UNION ALL
36655
+ SELECT sql
36656
+ FROM sqlite_temp_master
36657
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36658
+
36659
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36660
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36661
+  (1.0ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36662
+  (0.9ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
36663
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36664
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36665
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36666
+  (0.1ms) SELECT version FROM "schema_migrations"
36667
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36668
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36669
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36670
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36671
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36672
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36673
+  (0.0ms) begin transaction
36674
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:14:15.911326"], ["updated_at", "2016-07-31 22:14:15.911326"]]
36675
+  (0.7ms) commit transaction
36676
+  (0.1ms) begin transaction
36677
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36678
+  (0.8ms) commit transaction
36679
+  (0.1ms) begin transaction
36680
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36681
+  (0.7ms) commit transaction
36682
+  (0.0ms) begin transaction
36683
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36684
+  (0.7ms) commit transaction
36685
+  (0.1ms) begin transaction
36686
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36687
+  (0.7ms) commit transaction
36688
+  (0.1ms) begin transaction
36689
+ SQL (0.2ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36690
+  (0.6ms) commit transaction
36691
+  (0.1ms) begin transaction
36692
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36693
+  (0.7ms) commit transaction
36694
+  (0.0ms) begin transaction
36695
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:14:15.957335"], ["updated_at", "2016-07-31 22:14:15.957335"]]
36696
+  (0.9ms) commit transaction
36697
+  (0.1ms) begin transaction
36698
+ -----------------------------------------------------
36699
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36700
+ -----------------------------------------------------
36701
+  (0.1ms) rollback transaction
36702
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
36703
+  (1.7ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
36704
+  (0.1ms) select sqlite_version(*)
36705
+  (0.8ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36706
+  (0.8ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36707
+  (0.9ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
36708
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36709
+  (0.1ms) SELECT sql
36710
+ FROM sqlite_master
36711
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36712
+ UNION ALL
36713
+ SELECT sql
36714
+ FROM sqlite_temp_master
36715
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36716
+
36717
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36718
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
36719
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36720
+  (0.1ms) SELECT sql
36721
+ FROM sqlite_master
36722
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36723
+ UNION ALL
36724
+ SELECT sql
36725
+ FROM sqlite_temp_master
36726
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36727
+
36728
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36729
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36730
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36731
+  (0.8ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
36732
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36733
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36734
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36735
+  (0.1ms) SELECT version FROM "schema_migrations"
36736
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36737
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36738
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36739
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36740
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36741
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36742
+  (0.1ms) begin transaction
36743
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:15:36.229328"], ["updated_at", "2016-07-31 22:15:36.229328"]]
36744
+  (0.7ms) commit transaction
36745
+  (0.1ms) begin transaction
36746
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36747
+  (0.7ms) commit transaction
36748
+  (0.1ms) begin transaction
36749
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36750
+  (0.7ms) commit transaction
36751
+  (0.1ms) begin transaction
36752
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36753
+  (0.7ms) commit transaction
36754
+  (0.0ms) begin transaction
36755
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36756
+  (0.7ms) commit transaction
36757
+  (0.1ms) begin transaction
36758
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36759
+  (0.9ms) commit transaction
36760
+  (0.1ms) begin transaction
36761
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36762
+  (0.7ms) commit transaction
36763
+  (0.1ms) begin transaction
36764
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:15:36.276203"], ["updated_at", "2016-07-31 22:15:36.276203"]]
36765
+  (0.9ms) commit transaction
36766
+  (0.1ms) begin transaction
36767
+ -----------------------------------------------------
36768
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36769
+ -----------------------------------------------------
36770
+  (0.1ms) rollback transaction
36771
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
36772
+  (1.7ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
36773
+  (0.1ms) select sqlite_version(*)
36774
+  (0.8ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36775
+  (0.8ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36776
+  (0.8ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
36777
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36778
+  (0.1ms) SELECT sql
36779
+ FROM sqlite_master
36780
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36781
+ UNION ALL
36782
+ SELECT sql
36783
+ FROM sqlite_temp_master
36784
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36785
+
36786
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36787
+  (0.9ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
36788
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36789
+  (0.1ms) SELECT sql
36790
+ FROM sqlite_master
36791
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36792
+ UNION ALL
36793
+ SELECT sql
36794
+ FROM sqlite_temp_master
36795
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36796
+
36797
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36798
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36799
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36800
+  (0.8ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
36801
+  (0.7ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36802
+  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36803
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36804
+  (0.1ms) SELECT version FROM "schema_migrations"
36805
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36806
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36807
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36808
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36809
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36810
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36811
+  (0.1ms) begin transaction
36812
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:17:27.100116"], ["updated_at", "2016-07-31 22:17:27.100116"]]
36813
+  (0.8ms) commit transaction
36814
+  (0.0ms) begin transaction
36815
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36816
+  (0.7ms) commit transaction
36817
+  (0.0ms) begin transaction
36818
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36819
+  (0.7ms) commit transaction
36820
+  (0.0ms) begin transaction
36821
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36822
+  (0.7ms) commit transaction
36823
+  (0.0ms) begin transaction
36824
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36825
+  (0.7ms) commit transaction
36826
+  (0.1ms) begin transaction
36827
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36828
+  (0.6ms) commit transaction
36829
+  (0.1ms) begin transaction
36830
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36831
+  (0.7ms) commit transaction
36832
+  (0.1ms) begin transaction
36833
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:17:27.147436"], ["updated_at", "2016-07-31 22:17:27.147436"]]
36834
+  (0.7ms) commit transaction
36835
+  (0.1ms) begin transaction
36836
+ -----------------------------------------------------
36837
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36838
+ -----------------------------------------------------
36839
+  (0.1ms) rollback transaction
36840
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
36841
+  (2.0ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
36842
+  (0.1ms) select sqlite_version(*)
36843
+  (1.0ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
36844
+  (0.8ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar) 
36845
+  (1.0ms) CREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar DEFAULT 'ClarkKent::Report', "string" varchar DEFAULT 'ClarkKent::Report', "filter_name" varchar, "filter_value" varchar, "type" varchar, "duration" varchar, "kind_of_day" varchar, "offset" varchar, "created_at" datetime, "updated_at" datetime)
36846
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
36847
+  (0.1ms) SELECT sql
36848
+ FROM sqlite_master
36849
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36850
+ UNION ALL
36851
+ SELECT sql
36852
+ FROM sqlite_temp_master
36853
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
36854
+
36855
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
36856
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
36857
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
36858
+  (0.1ms) SELECT sql
36859
+ FROM sqlite_master
36860
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36861
+ UNION ALL
36862
+ SELECT sql
36863
+ FROM sqlite_temp_master
36864
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
36865
+
36866
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
36867
+  (1.1ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
36868
+  (1.0ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar) 
36869
+  (0.9ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
36870
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer) 
36871
+  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
36872
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
36873
+  (0.1ms) SELECT version FROM "schema_migrations"
36874
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
36875
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170042')
36876
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
36877
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140114010048')
36878
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
36879
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150304233739')
36880
+  (0.0ms) begin transaction
36881
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", "2016-07-31 22:18:09.905104"], ["updated_at", "2016-07-31 22:18:09.905104"]]
36882
+  (0.7ms) commit transaction
36883
+  (0.0ms) begin transaction
36884
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
36885
+  (0.8ms) commit transaction
36886
+  (0.1ms) begin transaction
36887
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
36888
+  (0.7ms) commit transaction
36889
+  (0.0ms) begin transaction
36890
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
36891
+  (0.6ms) commit transaction
36892
+  (0.0ms) begin transaction
36893
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
36894
+  (0.7ms) commit transaction
36895
+  (0.0ms) begin transaction
36896
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
36897
+  (0.7ms) commit transaction
36898
+  (0.1ms) begin transaction
36899
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
36900
+  (0.7ms) commit transaction
36901
+  (0.1ms) begin transaction
36902
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "description", "amount", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["description", "Guitar strings"], ["amount", 1], ["created_at", "2016-07-31 22:18:09.949678"], ["updated_at", "2016-07-31 22:18:09.949678"]]
36903
+  (0.7ms) commit transaction
36904
+  (0.1ms) begin transaction
36905
+ -----------------------------------------------------
36906
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
36907
+ -----------------------------------------------------
36908
+  (0.1ms) rollback transaction