clark_kent 0.8.9 → 0.8.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -64023,3 +64023,2168 @@ Processing by ClarkKent::ReportsController#new as HTML
64023
64023
  Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (10.3ms)
64024
64024
  Completed 200 OK in 15ms (Views: 14.2ms | ActiveRecord: 0.2ms)
64025
64025
   (0.3ms) rollback transaction
64026
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
64027
+  (1.4ms) 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)
64028
+  (0.1ms) select sqlite_version(*)
64029
+  (0.9ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
64030
+  (1.0ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
64031
+  (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)
64032
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
64033
+  (0.1ms)  SELECT sql
64034
+ FROM sqlite_master
64035
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
64036
+ UNION ALL
64037
+ SELECT sql
64038
+ FROM sqlite_temp_master
64039
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
64040
+ 
64041
+  (1.0ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
64042
+  (1.0ms) 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)
64043
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
64044
+  (0.1ms)  SELECT sql
64045
+ FROM sqlite_master
64046
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
64047
+ UNION ALL
64048
+ SELECT sql
64049
+ FROM sqlite_temp_master
64050
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
64051
+ 
64052
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
64053
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
64054
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
64055
+  (1.0ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
64056
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
64057
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
64058
+  (0.1ms) SELECT version FROM "schema_migrations"
64059
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
64060
+  (0.8ms) INSERT INTO schema_migrations (version) VALUES
64061
+ ('20131226170042'),
64062
+ ('20131226170112'),
64063
+ ('20140114010048'),
64064
+ ('20140129051754'),
64065
+ ('20150304233739');
64066
+
64067
+ 
64068
+  (0.9ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
64069
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
64070
+  (0.1ms) begin transaction
64071
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-04-07 18:43:05 UTC], ["updated_at", 2017-04-07 18:43:05 UTC]]
64072
+  (0.7ms) commit transaction
64073
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
64074
+  (0.1ms) begin transaction
64075
+  (0.0ms) commit transaction
64076
+  (0.0ms) begin transaction
64077
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-04-07 18:43:05 UTC], ["updated_at", 2017-04-07 18:43:05 UTC]]
64078
+  (1.1ms) commit transaction
64079
+  (0.0ms) begin transaction
64080
+ SQL (0.5ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "user_name"], ["column_order", 1]]
64081
+  (0.8ms) commit transaction
64082
+  (0.1ms) begin transaction
64083
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
64084
+  (0.8ms) commit transaction
64085
+  (0.0ms) begin transaction
64086
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
64087
+  (0.7ms) commit transaction
64088
+  (0.1ms) begin transaction
64089
+ SQL (0.2ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
64090
+  (0.7ms) commit transaction
64091
+  (0.0ms) begin transaction
64092
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
64093
+  (0.8ms) commit transaction
64094
+  (0.0ms) begin transaction
64095
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
64096
+  (0.7ms) commit transaction
64097
+  (0.1ms) begin transaction
64098
+ SQL (0.4ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-04-07 18:43:05 UTC], ["updated_at", 2017-04-07 18:43:05 UTC]]
64099
+  (0.9ms) commit transaction
64100
+  (0.1ms) begin transaction
64101
+ ---------------------------------------------------------------------------------------------------
64102
+ ClarkKent::ReportColumnsControllerTest: test_0002_should reject a report column with no column_name
64103
+ ---------------------------------------------------------------------------------------------------
64104
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64105
+ Processing by ClarkKent::ReportColumnsController#create as JS
64106
+ Parameters: {"report_column"=>{"report_id"=>"1"}}
64107
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64108
+  (0.0ms) SAVEPOINT active_record_1
64109
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
64110
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
64111
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64112
+ 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]]
64113
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (94.3ms)
64114
+ Completed 409 Conflict in 138ms (Views: 126.6ms | ActiveRecord: 0.6ms)
64115
+  (0.1ms) rollback transaction
64116
+  (0.1ms) begin transaction
64117
+ -------------------------------------------------------------------------------
64118
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
64119
+ -------------------------------------------------------------------------------
64120
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64121
+ Processing by ClarkKent::ReportColumnsController#create as JS
64122
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1"}}
64123
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64124
+  (0.0ms) SAVEPOINT active_record_1
64125
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name") VALUES (?, ?) [["report_id", 1], ["column_name", "user_name"]]
64126
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64127
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.5ms)
64128
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (35.8ms)
64129
+ Completed 200 OK in 68ms (Views: 65.7ms | ActiveRecord: 0.6ms)
64130
+  (0.4ms) rollback transaction
64131
+  (0.1ms) begin transaction
64132
+ --------------------------------------------------------------------------------------------------
64133
+ ClarkKent::ReportColumnsControllerTest: test_0003_should reject a report column with unusable sort
64134
+ --------------------------------------------------------------------------------------------------
64135
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64136
+ Processing by ClarkKent::ReportColumnsController#create as JS
64137
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1", "report_sort"=>"ascending"}}
64138
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64139
+  (0.1ms) SAVEPOINT active_record_1
64140
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64141
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
64142
+ 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]]
64143
+ 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]]
64144
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (7.9ms)
64145
+ Completed 409 Conflict in 11ms (Views: 8.0ms | ActiveRecord: 0.4ms)
64146
+  (0.1ms) rollback transaction
64147
+  (0.1ms) begin transaction
64148
+ ---------------------------------------------------
64149
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
64150
+ ---------------------------------------------------
64151
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
64152
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64153
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
64154
+  (0.0ms) SAVEPOINT active_record_1
64155
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
64156
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64157
+  (0.1ms) SAVEPOINT active_record_1
64158
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-04-07 18:43:06 UTC], ["updated_at", 2017-04-07 18:43:06 UTC]]
64159
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64160
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64161
+ 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"]]
64162
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64163
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64164
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64165
+ 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]]
64166
+ 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"]]
64167
+ 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"]]
64168
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
64169
+  (0.6ms) rollback transaction
64170
+  (0.1ms) begin transaction
64171
+ -----------------------------------------------------------------------------------------
64172
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
64173
+ -----------------------------------------------------------------------------------------
64174
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
64175
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64176
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
64177
+  (0.0ms) SAVEPOINT active_record_1
64178
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
64179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64180
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64181
+ 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"]]
64182
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64183
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64184
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64185
+ 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]]
64186
+ 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"]]
64187
+ 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"]]
64188
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64189
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64190
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
64191
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (0.5ms)
64192
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 178.4ms
64193
+ Sent mail to taproot@gmail.com (8.5ms)
64194
+ Date: Fri, 07 Apr 2017 12:43:06 -0600
64195
+ From: reservations@invitedhome.com
64196
+ To: taproot@gmail.com
64197
+ Message-ID: <58e7ddbae4424_57853fcca003fa14388de@Erics-MacBook-Pro.local.mail>
64198
+ Subject: Your report has a problem
64199
+ Mime-Version: 1.0
64200
+ Content-Type: text/html;
64201
+ charset=UTF-8
64202
+ Content-Transfer-Encoding: 7bit
64203
+
64204
+ Your report could not be created due to the following problem:
64205
+ <strong>At least one date range is required.</strong>
64206
+  (0.4ms) rollback transaction
64207
+  (0.1ms) begin transaction
64208
+ -----------------------------------------------------------------------------------------
64209
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
64210
+ -----------------------------------------------------------------------------------------
64211
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64212
+  (0.1ms) SAVEPOINT active_record_1
64213
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64214
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64215
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64216
+  (0.0ms) SAVEPOINT active_record_1
64217
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 18:43:06 UTC], ["updated_at", 2017-04-07 18:43:06 UTC]]
64218
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64219
+ Processing by ClarkKent::ReportFiltersController#show as HTML
64220
+ Parameters: {"id"=>"1"}
64221
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64222
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64223
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64224
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.7ms)
64225
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.9ms)
64226
+ Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 0.2ms)
64227
+  (0.5ms) rollback transaction
64228
+  (0.1ms) begin transaction
64229
+ ---------------------------------------------------------------------------------------
64230
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
64231
+ ---------------------------------------------------------------------------------------
64232
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64233
+  (0.1ms) SAVEPOINT active_record_1
64234
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64235
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64236
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64237
+  (0.0ms) SAVEPOINT active_record_1
64238
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 18:43:06 UTC], ["updated_at", 2017-04-07 18:43:06 UTC]]
64239
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64240
+ Processing by ClarkKent::ReportFiltersController#show as HTML
64241
+ Parameters: {"id"=>"1"}
64242
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64243
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64244
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64245
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.4ms)
64246
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (4.1ms)
64247
+ Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.1ms)
64248
+  (0.5ms) rollback transaction
64249
+  (0.1ms) begin transaction
64250
+ ----------------------------------------------------------------------------------
64251
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
64252
+ ----------------------------------------------------------------------------------
64253
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64254
+  (0.2ms) SAVEPOINT active_record_1
64255
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64256
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64257
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64258
+ Processing by ClarkKent::ReportFiltersController#create as HTML
64259
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
64260
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64261
+  (0.1ms) SAVEPOINT active_record_1
64262
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64264
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64265
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
64266
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.8ms)
64267
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (3.4ms)
64268
+ Completed 200 OK in 10ms (Views: 6.1ms | ActiveRecord: 0.4ms)
64269
+ ClarkKent::ReportFilter Load (0.4ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
64270
+  (0.5ms) rollback transaction
64271
+  (0.1ms) begin transaction
64272
+ ------------------------------------------------------------------------------------------
64273
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
64274
+ ------------------------------------------------------------------------------------------
64275
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64276
+  (0.1ms) SAVEPOINT active_record_1
64277
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64278
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64279
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64280
+  (0.0ms) SAVEPOINT active_record_1
64281
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64282
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64283
+ Processing by ClarkKent::ReportFiltersController#show as HTML
64284
+ Parameters: {"id"=>"1"}
64285
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64286
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64287
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64288
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64289
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.6ms)
64290
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (4.4ms)
64291
+ Completed 200 OK in 7ms (Views: 4.7ms | ActiveRecord: 0.2ms)
64292
+  (0.6ms) rollback transaction
64293
+  (0.1ms) begin transaction
64294
+ -----------------------------------------------------------------------------
64295
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
64296
+ -----------------------------------------------------------------------------
64297
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64298
+  (0.0ms) SAVEPOINT active_record_1
64299
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64300
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64301
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64302
+ Processing by ClarkKent::ReportFiltersController#create as HTML
64303
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
64304
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64305
+  (0.0ms) SAVEPOINT active_record_1
64306
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64307
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64308
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64309
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.1ms)
64310
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.4ms)
64311
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.7ms)
64312
+ Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.4ms)
64313
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
64314
+  (0.5ms) rollback transaction
64315
+  (0.1ms) begin transaction
64316
+ ---------------------------------------------------------------------------------------
64317
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
64318
+ ---------------------------------------------------------------------------------------
64319
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64320
+  (0.0ms) SAVEPOINT active_record_1
64321
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64322
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64323
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64324
+  (0.0ms) SAVEPOINT active_record_1
64325
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64326
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64327
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
64328
+ Parameters: {"id"=>"1"}
64329
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64330
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64331
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64332
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (4.1ms)
64333
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (12.4ms)
64334
+ Completed 200 OK in 17ms (Views: 14.9ms | ActiveRecord: 0.1ms)
64335
+  (0.4ms) rollback transaction
64336
+  (0.1ms) begin transaction
64337
+ -----------------------------------------------------------------------------------------
64338
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
64339
+ -----------------------------------------------------------------------------------------
64340
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64341
+  (0.0ms) SAVEPOINT active_record_1
64342
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64343
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64344
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64345
+  (0.0ms) SAVEPOINT active_record_1
64346
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64347
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64348
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
64349
+ Parameters: {"id"=>"1"}
64350
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64351
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64352
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64353
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.3ms)
64354
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (7.1ms)
64355
+ Completed 200 OK in 11ms (Views: 7.4ms | ActiveRecord: 0.3ms)
64356
+  (0.4ms) rollback transaction
64357
+  (0.1ms) begin transaction
64358
+ ------------------------------------------------------------------------------------------
64359
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
64360
+ ------------------------------------------------------------------------------------------
64361
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64362
+  (0.0ms) SAVEPOINT active_record_1
64363
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64364
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64365
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64366
+  (0.0ms) SAVEPOINT active_record_1
64367
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64368
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64369
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
64370
+ Parameters: {"id"=>"1"}
64371
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64372
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64373
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64374
+ User Load (0.1ms) SELECT "users".* FROM "users"
64375
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (2.3ms)
64376
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (10.0ms)
64377
+ Completed 200 OK in 12ms (Views: 10.1ms | ActiveRecord: 0.2ms)
64378
+  (0.5ms) rollback transaction
64379
+  (0.1ms) begin transaction
64380
+ -------------------------------------------------------------------------------------
64381
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
64382
+ -------------------------------------------------------------------------------------
64383
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64384
+  (0.1ms) SAVEPOINT active_record_1
64385
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64386
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64387
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64388
+ Processing by ClarkKent::ReportFiltersController#create as HTML
64389
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
64390
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64391
+  (0.0ms) SAVEPOINT active_record_1
64392
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64393
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64394
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64395
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64396
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.3ms)
64397
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.0ms)
64398
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.2ms)
64399
+ Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.3ms)
64400
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
64401
+  (0.5ms) rollback transaction
64402
+  (0.1ms) begin transaction
64403
+ ------------------------------------------------------------------------
64404
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
64405
+ ------------------------------------------------------------------------
64406
+  (0.1ms) SAVEPOINT active_record_1
64407
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64408
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64409
+ 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]]
64410
+ 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"]]
64411
+  (0.4ms) rollback transaction
64412
+  (0.1ms) begin transaction
64413
+ --------------------------------------------------------------------------
64414
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
64415
+ --------------------------------------------------------------------------
64416
+  (0.0ms) SAVEPOINT active_record_1
64417
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64418
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64419
+ 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]]
64420
+ 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"]]
64421
+  (0.4ms) rollback transaction
64422
+  (0.1ms) begin transaction
64423
+ --------------------------------------------------------------------------
64424
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
64425
+ --------------------------------------------------------------------------
64426
+  (0.1ms) SAVEPOINT active_record_1
64427
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64428
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64429
+  (0.0ms) SAVEPOINT active_record_1
64430
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
64431
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64432
+ 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]]
64433
+ 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"]]
64434
+  (0.6ms) rollback transaction
64435
+  (0.2ms) begin transaction
64436
+ --------------------------------------------------------------------------------
64437
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
64438
+ --------------------------------------------------------------------------------
64439
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64440
+  (0.1ms) SAVEPOINT active_record_1
64441
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64442
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64443
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64444
+ Processing by ClarkKent::ReportsController#create as HTML
64445
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
64446
+  (0.1ms) SAVEPOINT active_record_1
64447
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
64448
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
64449
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
64450
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64451
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (9.8ms)
64452
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (13.0ms)
64453
+ Completed 409 Conflict in 169ms (Views: 165.7ms | ActiveRecord: 0.3ms)
64454
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
64455
+  (1.2ms) rollback transaction
64456
+  (0.1ms) begin transaction
64457
+ -------------------------------------------------------------------------
64458
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
64459
+ -------------------------------------------------------------------------
64460
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64461
+  (0.1ms) SAVEPOINT active_record_1
64462
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64463
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64464
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64465
+ Processing by ClarkKent::ReportsController#show as HTML
64466
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
64467
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
64468
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
64469
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
64470
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
64471
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.8ms)
64472
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64473
+ User Load (0.0ms) SELECT "users".* FROM "users"
64474
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.5ms)
64475
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.4ms)
64476
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.8ms)
64477
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (15.3ms)
64478
+ Completed 200 OK in 31ms (Views: 17.9ms | ActiveRecord: 0.6ms)
64479
+  (0.6ms) rollback transaction
64480
+  (0.1ms) begin transaction
64481
+ -----------------------------------------------------------------
64482
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
64483
+ -----------------------------------------------------------------
64484
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64485
+  (0.0ms) SAVEPOINT active_record_1
64486
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64487
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64488
+  (0.0ms) SAVEPOINT active_record_1
64489
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64490
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64491
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
64492
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64493
+ Processing by ClarkKent::ReportsController#destroy as HTML
64494
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
64495
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
64496
+  (0.1ms) SAVEPOINT active_record_1
64497
+ 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"]]
64498
+ 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]]
64499
+ ClarkKent::ReportEmail Load (0.2ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
64500
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
64501
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64502
+ Redirected to http://test.host/reports/reports
64503
+ Completed 302 Found in 9ms (ActiveRecord: 0.6ms)
64504
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
64505
+  (0.5ms) rollback transaction
64506
+  (0.1ms) begin transaction
64507
+ --------------------------------------------------------------
64508
+ ClarkKent::ReportsControllerTest: test_0005_should show report
64509
+ --------------------------------------------------------------
64510
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64511
+  (0.0ms) SAVEPOINT active_record_1
64512
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64513
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64514
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64515
+ Processing by ClarkKent::ReportsController#show as HTML
64516
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
64517
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
64518
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
64519
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
64520
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
64521
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
64522
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64523
+ User Load (0.1ms) SELECT "users".* FROM "users"
64524
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
64525
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
64526
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
64527
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (5.0ms)
64528
+ Completed 200 OK in 9ms (Views: 6.8ms | ActiveRecord: 0.4ms)
64529
+  (0.5ms) rollback transaction
64530
+  (0.1ms) begin transaction
64531
+ ------------------------------------------------------------
64532
+ ClarkKent::ReportsControllerTest: test_0001_should get index
64533
+ ------------------------------------------------------------
64534
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64535
+  (0.1ms) SAVEPOINT active_record_1
64536
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64537
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64538
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64539
+ Processing by ClarkKent::ReportsController#index as HTML
64540
+ Parameters: {"current_user_id"=>"1"}
64541
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
64542
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
64543
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "User"], ["LIMIT", 1]]
64544
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64545
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["LIMIT", 1]]
64546
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
64547
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
64548
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (44.8ms)
64549
+ Completed 200 OK in 52ms (Views: 47.5ms | ActiveRecord: 0.5ms)
64550
+  (0.6ms) rollback transaction
64551
+  (0.1ms) begin transaction
64552
+ ----------------------------------------------------------
64553
+ ClarkKent::ReportsControllerTest: test_0002_should get new
64554
+ ----------------------------------------------------------
64555
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64556
+  (0.0ms) SAVEPOINT active_record_1
64557
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64558
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64559
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64560
+ Processing by ClarkKent::ReportsController#new as HTML
64561
+ Parameters: {"current_user_id"=>"1"}
64562
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
64563
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
64564
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64565
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (6.3ms)
64566
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (6.9ms)
64567
+ Completed 200 OK in 10ms (Views: 8.9ms | ActiveRecord: 0.1ms)
64568
+  (0.5ms) rollback transaction
64569
+  (0.1ms) begin transaction
64570
+ ----------------------------------------------------------------------
64571
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
64572
+ ----------------------------------------------------------------------
64573
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64574
+  (0.0ms) SAVEPOINT active_record_1
64575
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64576
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64577
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64578
+ Processing by ClarkKent::ReportsController#show as HTML
64579
+ Parameters: {"created_at_from"=>"2017-04-06", "created_at_until"=>"2017-04-07", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
64580
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
64581
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
64582
+ Completed 500 Internal Server Error in 8ms (ActiveRecord: 0.2ms)
64583
+  (0.5ms) rollback transaction
64584
+  (0.1ms) begin transaction
64585
+ -----------------------------------------------------------
64586
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
64587
+ -----------------------------------------------------------
64588
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64589
+  (0.0ms) SAVEPOINT active_record_1
64590
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64591
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64592
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64593
+ Processing by ClarkKent::ReportsController#edit as HTML
64594
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
64595
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64596
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
64597
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.0ms)
64598
+ 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"]]
64599
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.7ms)
64600
+ 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]]
64601
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.9ms)
64602
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.6ms)
64603
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.4ms)
64604
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.2ms)
64605
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.8ms)
64606
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (1.2ms)
64607
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.0ms)
64608
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (1.6ms)
64609
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (14.9ms)
64610
+ ClarkKent::ReportEmail Load (0.2ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
64611
+ ClarkKent::ReportDateFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
64612
+ User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
64613
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (21.4ms)
64614
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (24.7ms)
64615
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (31.5ms)
64616
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (68.5ms)
64617
+ Completed 200 OK in 75ms (Views: 70.3ms | ActiveRecord: 0.8ms)
64618
+  (0.5ms) rollback transaction
64619
+  (0.1ms) begin transaction
64620
+ ----------------------------------------------------------------
64621
+ ClarkKent::ReportsControllerTest: test_0009_should update report
64622
+ ----------------------------------------------------------------
64623
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64624
+  (0.1ms) SAVEPOINT active_record_1
64625
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64626
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64627
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64628
+ Processing by ClarkKent::ReportsController#update as HTML
64629
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
64630
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64631
+ ClarkKent::ReportColumn Exists (0.2ms) SELECT 1 AS one FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? LIMIT ? [["report_id", 1], ["LIMIT", 1]]
64632
+  (0.1ms) SAVEPOINT active_record_1
64633
+ SQL (0.1ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-04-07 18:43:07 UTC], ["id", 1]]
64634
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64635
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.2ms)
64636
+ Completed 200 OK in 10ms (Views: 1.6ms | ActiveRecord: 0.5ms)
64637
+  (0.6ms) rollback transaction
64638
+  (0.1ms) begin transaction
64639
+ ----------------------------------------------------------------
64640
+ ClarkKent::ReportsControllerTest: test_0003_should create report
64641
+ ----------------------------------------------------------------
64642
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64643
+  (0.0ms) SAVEPOINT active_record_1
64644
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64645
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64646
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64647
+ Processing by ClarkKent::ReportsController#create as HTML
64648
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
64649
+  (0.1ms) SAVEPOINT active_record_1
64650
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-04-07 18:43:07 UTC], ["updated_at", 2017-04-07 18:43:07 UTC]]
64651
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64652
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
64653
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.1ms)
64654
+ 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"]]
64655
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.1ms)
64656
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
64657
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.7ms)
64658
+ 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]]
64659
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (2.9ms)
64660
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (11.1ms)
64661
+ Completed 200 OK in 17ms (Views: 13.7ms | ActiveRecord: 0.7ms)
64662
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
64663
+  (0.1ms) SAVEPOINT active_record_1
64664
+ 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"]]
64665
+ 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]]
64666
+ 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]]
64667
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
64668
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64669
+  (0.5ms) rollback transaction
64670
+  (0.1ms) begin transaction
64671
+ -------------------------
64672
+ ClarkKentTest: test_truth
64673
+ -------------------------
64674
+  (0.1ms) rollback transaction
64675
+  (0.0ms) begin transaction
64676
+ ------------------------------------------------------------------------------------------------
64677
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
64678
+ ------------------------------------------------------------------------------------------------
64679
+  (0.0ms) SAVEPOINT active_record_1
64680
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
64681
+  (0.3ms) rollback transaction
64682
+  (0.1ms) begin transaction
64683
+ -----------------------------------------------------
64684
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
64685
+ -----------------------------------------------------
64686
+  (0.1ms) rollback transaction
64687
+  (0.1ms) begin transaction
64688
+ --------------------------------------------------------------------------
64689
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
64690
+ --------------------------------------------------------------------------
64691
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64692
+  (0.1ms) SAVEPOINT active_record_1
64693
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64694
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64695
+  (0.1ms) rollback transaction
64696
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
64697
+  (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)
64698
+  (0.1ms) select sqlite_version(*)
64699
+  (1.2ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
64700
+  (1.0ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
64701
+  (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)
64702
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
64703
+  (0.1ms)  SELECT sql
64704
+ FROM sqlite_master
64705
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
64706
+ UNION ALL
64707
+ SELECT sql
64708
+ FROM sqlite_temp_master
64709
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
64710
+ 
64711
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
64712
+  (1.0ms) 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)
64713
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
64714
+  (0.1ms)  SELECT sql
64715
+ FROM sqlite_master
64716
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
64717
+ UNION ALL
64718
+ SELECT sql
64719
+ FROM sqlite_temp_master
64720
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
64721
+ 
64722
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
64723
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
64724
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
64725
+  (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)
64726
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
64727
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
64728
+  (0.1ms) SELECT version FROM "schema_migrations"
64729
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
64730
+  (0.8ms) INSERT INTO schema_migrations (version) VALUES
64731
+ ('20131226170042'),
64732
+ ('20131226170112'),
64733
+ ('20140114010048'),
64734
+ ('20140129051754'),
64735
+ ('20150304233739');
64736
+
64737
+ 
64738
+  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
64739
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
64740
+  (0.1ms) begin transaction
64741
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-04-07 18:43:28 UTC], ["updated_at", 2017-04-07 18:43:28 UTC]]
64742
+  (0.7ms) commit transaction
64743
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
64744
+  (0.1ms) begin transaction
64745
+  (0.1ms) commit transaction
64746
+  (0.1ms) begin transaction
64747
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-04-07 18:43:28 UTC], ["updated_at", 2017-04-07 18:43:28 UTC]]
64748
+  (0.7ms) commit transaction
64749
+  (0.0ms) begin transaction
64750
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "user_name"], ["column_order", 1]]
64751
+  (1.0ms) commit transaction
64752
+  (0.1ms) begin transaction
64753
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
64754
+  (0.8ms) commit transaction
64755
+  (0.0ms) begin transaction
64756
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
64757
+  (0.7ms) commit transaction
64758
+  (0.0ms) begin transaction
64759
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
64760
+  (0.7ms) commit transaction
64761
+  (0.0ms) begin transaction
64762
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
64763
+  (1.0ms) commit transaction
64764
+  (0.0ms) begin transaction
64765
+ SQL (0.4ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
64766
+  (0.7ms) commit transaction
64767
+  (0.1ms) begin transaction
64768
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-04-07 18:43:28 UTC], ["updated_at", 2017-04-07 18:43:28 UTC]]
64769
+  (0.7ms) commit transaction
64770
+  (0.1ms) begin transaction
64771
+ -----------------------------------------------------
64772
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
64773
+ -----------------------------------------------------
64774
+  (0.1ms) rollback transaction
64775
+  (0.1ms) begin transaction
64776
+ ---------------------------------------------------
64777
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
64778
+ ---------------------------------------------------
64779
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
64780
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64781
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
64782
+  (0.0ms) SAVEPOINT active_record_1
64783
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
64784
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64785
+  (0.1ms) SAVEPOINT active_record_1
64786
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-04-07 18:43:28 UTC], ["updated_at", 2017-04-07 18:43:28 UTC]]
64787
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64788
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64789
+ 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"]]
64790
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64791
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64792
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64793
+ 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]]
64794
+ 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"]]
64795
+ 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"]]
64796
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
64797
+  (1.2ms) rollback transaction
64798
+  (0.1ms) begin transaction
64799
+ -----------------------------------------------------------------------------------------
64800
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
64801
+ -----------------------------------------------------------------------------------------
64802
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
64803
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64804
+ SQL (0.4ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
64805
+  (0.0ms) SAVEPOINT active_record_1
64806
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
64807
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64808
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64809
+ 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"]]
64810
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64811
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64812
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64813
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
64814
+ 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"]]
64815
+ 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"]]
64816
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64817
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64818
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
64819
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (1.1ms)
64820
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 153.8ms
64821
+ Sent mail to taproot@gmail.com (4.8ms)
64822
+ Date: Fri, 07 Apr 2017 12:43:29 -0600
64823
+ From: reservations@invitedhome.com
64824
+ To: taproot@gmail.com
64825
+ Message-ID: <58e7ddd17f141_57a63fef3503fa0c89895@Erics-MacBook-Pro.local.mail>
64826
+ Subject: Your report has a problem
64827
+ Mime-Version: 1.0
64828
+ Content-Type: text/html;
64829
+ charset=UTF-8
64830
+ Content-Transfer-Encoding: 7bit
64831
+
64832
+ Your report could not be created due to the following problem:
64833
+ <strong>At least one date range is required.</strong>
64834
+  (0.9ms) rollback transaction
64835
+  (0.1ms) begin transaction
64836
+ ------------------------------------------------------------------------
64837
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
64838
+ ------------------------------------------------------------------------
64839
+  (0.0ms) SAVEPOINT active_record_1
64840
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64841
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64842
+ 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]]
64843
+ 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"]]
64844
+  (0.5ms) rollback transaction
64845
+  (0.1ms) begin transaction
64846
+ --------------------------------------------------------------------------
64847
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
64848
+ --------------------------------------------------------------------------
64849
+  (0.0ms) SAVEPOINT active_record_1
64850
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64851
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64852
+  (0.0ms) SAVEPOINT active_record_1
64853
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
64854
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64855
+ 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]]
64856
+ 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"]]
64857
+  (0.5ms) rollback transaction
64858
+  (0.1ms) begin transaction
64859
+ --------------------------------------------------------------------------
64860
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
64861
+ --------------------------------------------------------------------------
64862
+  (0.0ms) SAVEPOINT active_record_1
64863
+ SQL (0.3ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64864
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64865
+ 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]]
64866
+ 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"]]
64867
+  (0.6ms) rollback transaction
64868
+  (0.1ms) begin transaction
64869
+ -------------------------
64870
+ ClarkKentTest: test_truth
64871
+ -------------------------
64872
+  (0.0ms) rollback transaction
64873
+  (0.1ms) begin transaction
64874
+ ------------------------------------------------------------------------------------------
64875
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
64876
+ ------------------------------------------------------------------------------------------
64877
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64878
+  (0.1ms) SAVEPOINT active_record_1
64879
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64880
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64881
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64882
+  (0.0ms) SAVEPOINT active_record_1
64883
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64884
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64885
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
64886
+ Parameters: {"id"=>"1"}
64887
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64888
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64889
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64890
+ User Load (0.1ms) SELECT "users".* FROM "users"
64891
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (8.4ms)
64892
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (50.3ms)
64893
+ Completed 200 OK in 57ms (Views: 53.0ms | ActiveRecord: 0.4ms)
64894
+  (0.5ms) rollback transaction
64895
+  (0.1ms) begin transaction
64896
+ ------------------------------------------------------------------------------------------
64897
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
64898
+ ------------------------------------------------------------------------------------------
64899
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64900
+  (0.0ms) SAVEPOINT active_record_1
64901
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64902
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64903
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64904
+  (0.0ms) SAVEPOINT active_record_1
64905
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64906
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64907
+ Processing by ClarkKent::ReportFiltersController#show as HTML
64908
+ Parameters: {"id"=>"1"}
64909
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64910
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64911
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64912
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64913
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (1.0ms)
64914
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.3ms)
64915
+ Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.2ms)
64916
+  (0.6ms) rollback transaction
64917
+  (0.1ms) begin transaction
64918
+ -----------------------------------------------------------------------------------------
64919
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
64920
+ -----------------------------------------------------------------------------------------
64921
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64922
+  (0.1ms) SAVEPOINT active_record_1
64923
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64924
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64925
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64926
+  (0.0ms) SAVEPOINT active_record_1
64927
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64928
+  (0.1ms) RELEASE SAVEPOINT active_record_1
64929
+ Processing by ClarkKent::ReportFiltersController#show as HTML
64930
+ Parameters: {"id"=>"1"}
64931
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64932
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64933
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64934
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.3ms)
64935
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (4.0ms)
64936
+ Completed 200 OK in 6ms (Views: 4.3ms | ActiveRecord: 0.1ms)
64937
+  (0.6ms) rollback transaction
64938
+  (0.1ms) begin transaction
64939
+ ---------------------------------------------------------------------------------------
64940
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
64941
+ ---------------------------------------------------------------------------------------
64942
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64943
+  (0.1ms) SAVEPOINT active_record_1
64944
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64945
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64946
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64947
+  (0.2ms) SAVEPOINT active_record_1
64948
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64949
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64950
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
64951
+ Parameters: {"id"=>"1"}
64952
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64953
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64954
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64955
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (3.7ms)
64956
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (11.0ms)
64957
+ Completed 200 OK in 14ms (Views: 11.3ms | ActiveRecord: 0.1ms)
64958
+  (0.4ms) rollback transaction
64959
+  (0.1ms) begin transaction
64960
+ ---------------------------------------------------------------------------------------
64961
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
64962
+ ---------------------------------------------------------------------------------------
64963
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64964
+  (0.0ms) SAVEPOINT active_record_1
64965
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64966
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64967
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64968
+  (0.0ms) SAVEPOINT active_record_1
64969
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64970
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64971
+ Processing by ClarkKent::ReportFiltersController#show as HTML
64972
+ Parameters: {"id"=>"1"}
64973
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64974
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64975
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64976
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.4ms)
64977
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.7ms)
64978
+ Completed 200 OK in 8ms (Views: 6.1ms | ActiveRecord: 0.2ms)
64979
+  (0.5ms) rollback transaction
64980
+  (0.1ms) begin transaction
64981
+ -----------------------------------------------------------------------------------------
64982
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
64983
+ -----------------------------------------------------------------------------------------
64984
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
64985
+  (0.1ms) SAVEPOINT active_record_1
64986
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
64987
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64988
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
64989
+  (0.0ms) SAVEPOINT active_record_1
64990
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
64991
+  (0.0ms) RELEASE SAVEPOINT active_record_1
64992
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
64993
+ Parameters: {"id"=>"1"}
64994
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64995
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64996
+ ClarkKent::Report Load (0.4ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64997
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.4ms)
64998
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (9.5ms)
64999
+ Completed 200 OK in 12ms (Views: 9.5ms | ActiveRecord: 0.4ms)
65000
+  (0.4ms) rollback transaction
65001
+  (0.1ms) begin transaction
65002
+ ----------------------------------------------------------------------------------
65003
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
65004
+ ----------------------------------------------------------------------------------
65005
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65006
+  (0.1ms) SAVEPOINT active_record_1
65007
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65008
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65009
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65010
+ Processing by ClarkKent::ReportFiltersController#create as HTML
65011
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
65012
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65013
+  (0.1ms) SAVEPOINT active_record_1
65014
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
65015
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65016
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65017
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
65018
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.7ms)
65019
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (3.3ms)
65020
+ Completed 200 OK in 12ms (Views: 6.7ms | ActiveRecord: 0.5ms)
65021
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
65022
+  (0.4ms) rollback transaction
65023
+  (0.1ms) begin transaction
65024
+ -------------------------------------------------------------------------------------
65025
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
65026
+ -------------------------------------------------------------------------------------
65027
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65028
+  (0.0ms) SAVEPOINT active_record_1
65029
+ SQL (0.8ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65030
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65031
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65032
+ Processing by ClarkKent::ReportFiltersController#create as HTML
65033
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
65034
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65035
+  (0.0ms) SAVEPOINT active_record_1
65036
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
65037
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65038
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65039
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65040
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.4ms)
65041
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.0ms)
65042
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.2ms)
65043
+ Completed 200 OK in 6ms (Views: 2.5ms | ActiveRecord: 0.3ms)
65044
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
65045
+  (0.4ms) rollback transaction
65046
+  (0.1ms) begin transaction
65047
+ -----------------------------------------------------------------------------
65048
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
65049
+ -----------------------------------------------------------------------------
65050
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65051
+  (0.0ms) SAVEPOINT active_record_1
65052
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65053
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65054
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65055
+ Processing by ClarkKent::ReportFiltersController#create as HTML
65056
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
65057
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65058
+  (0.1ms) SAVEPOINT active_record_1
65059
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 18:43:29 UTC], ["updated_at", 2017-04-07 18:43:29 UTC]]
65060
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65061
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65062
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.1ms)
65063
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.9ms)
65064
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (2.1ms)
65065
+ Completed 200 OK in 6ms (Views: 2.4ms | ActiveRecord: 0.4ms)
65066
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
65067
+  (0.5ms) rollback transaction
65068
+  (0.1ms) begin transaction
65069
+ -------------------------------------------------------------------------
65070
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
65071
+ -------------------------------------------------------------------------
65072
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65073
+  (0.1ms) SAVEPOINT active_record_1
65074
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65075
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65076
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65077
+ Processing by ClarkKent::ReportsController#show as HTML
65078
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
65079
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65080
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
65081
+ 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"]]
65082
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
65083
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.0ms)
65084
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65085
+ User Load (0.0ms) SELECT "users".* FROM "users"
65086
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
65087
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.4ms)
65088
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.5ms)
65089
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (15.2ms)
65090
+ Completed 200 OK in 179ms (Views: 166.9ms | ActiveRecord: 0.4ms)
65091
+  (0.5ms) rollback transaction
65092
+  (0.1ms) begin transaction
65093
+ ----------------------------------------------------------------
65094
+ ClarkKent::ReportsControllerTest: test_0003_should create report
65095
+ ----------------------------------------------------------------
65096
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65097
+  (0.1ms) SAVEPOINT active_record_1
65098
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65099
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65100
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65101
+ Processing by ClarkKent::ReportsController#create as HTML
65102
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
65103
+  (0.1ms) SAVEPOINT active_record_1
65104
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-04-07 18:43:30 UTC], ["updated_at", 2017-04-07 18:43:30 UTC]]
65105
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65106
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
65107
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.5ms)
65108
+ 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"]]
65109
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.6ms)
65110
+ 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]]
65111
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.4ms)
65112
+ 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]]
65113
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (3.4ms)
65114
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (24.8ms)
65115
+ Completed 200 OK in 32ms (Views: 29.3ms | ActiveRecord: 0.6ms)
65116
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
65117
+  (0.0ms) SAVEPOINT active_record_1
65118
+ 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"]]
65119
+ 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]]
65120
+ 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]]
65121
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
65122
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65123
+  (0.6ms) rollback transaction
65124
+  (0.1ms) begin transaction
65125
+ ----------------------------------------------------------------------
65126
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
65127
+ ----------------------------------------------------------------------
65128
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65129
+  (0.0ms) SAVEPOINT active_record_1
65130
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65131
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65132
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65133
+ Processing by ClarkKent::ReportsController#show as HTML
65134
+ Parameters: {"created_at_from"=>"2017-04-06", "created_at_until"=>"2017-04-07", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
65135
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65136
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
65137
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
65138
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
65139
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
65140
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65141
+ User Load (0.0ms) SELECT "users".* FROM "users"
65142
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.2ms)
65143
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
65144
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
65145
+  (0.2ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ?) subquery_for_count [["LIMIT", 10], ["OFFSET", 0]]
65146
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.9ms)
65147
+ 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]]
65148
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
65149
+ (SELECT u.name
65150
+ FROM users u
65151
+ WHERE u.id = orders.user_id)
65152
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
65153
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65154
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65155
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65156
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65157
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.6ms)
65158
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (26.3ms)
65159
+ Completed 200 OK in 37ms (Views: 28.8ms | ActiveRecord: 1.4ms)
65160
+  (0.5ms) rollback transaction
65161
+  (0.1ms) begin transaction
65162
+ ----------------------------------------------------------------
65163
+ ClarkKent::ReportsControllerTest: test_0009_should update report
65164
+ ----------------------------------------------------------------
65165
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65166
+  (0.0ms) SAVEPOINT active_record_1
65167
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65168
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65169
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65170
+ Processing by ClarkKent::ReportsController#update as HTML
65171
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
65172
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65173
+ ClarkKent::ReportColumn Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? LIMIT ? [["report_id", 1], ["LIMIT", 1]]
65174
+  (0.1ms) SAVEPOINT active_record_1
65175
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-04-07 18:43:30 UTC], ["id", 1]]
65176
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65177
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.1ms)
65178
+ Completed 200 OK in 12ms (Views: 1.5ms | ActiveRecord: 0.5ms)
65179
+  (0.6ms) rollback transaction
65180
+  (0.1ms) begin transaction
65181
+ -----------------------------------------------------------
65182
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
65183
+ -----------------------------------------------------------
65184
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65185
+  (0.0ms) SAVEPOINT active_record_1
65186
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65187
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65188
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65189
+ Processing by ClarkKent::ReportsController#edit as HTML
65190
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
65191
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65192
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
65193
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.4ms)
65194
+ 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"]]
65195
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.8ms)
65196
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
65197
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
65198
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (4.3ms)
65199
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
65200
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
65201
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
65202
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
65203
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
65204
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
65205
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (11.8ms)
65206
+ ClarkKent::ReportEmail Load (0.5ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
65207
+ ClarkKent::ReportDateFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
65208
+ User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
65209
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (18.2ms)
65210
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (21.0ms)
65211
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (27.0ms)
65212
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (44.1ms)
65213
+ Completed 200 OK in 47ms (Views: 45.5ms | ActiveRecord: 1.1ms)
65214
+  (0.9ms) rollback transaction
65215
+  (0.1ms) begin transaction
65216
+ -----------------------------------------------------------------
65217
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
65218
+ -----------------------------------------------------------------
65219
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65220
+  (0.1ms) SAVEPOINT active_record_1
65221
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65222
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65223
+  (0.0ms) SAVEPOINT active_record_1
65224
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-04-07 18:43:30 UTC], ["updated_at", 2017-04-07 18:43:30 UTC]]
65225
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65226
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
65227
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65228
+ Processing by ClarkKent::ReportsController#destroy as HTML
65229
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
65230
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
65231
+  (0.5ms) SAVEPOINT active_record_1
65232
+ 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"]]
65233
+ 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]]
65234
+ 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]]
65235
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
65236
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65237
+ Redirected to http://test.host/reports/reports
65238
+ Completed 302 Found in 7ms (ActiveRecord: 0.9ms)
65239
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
65240
+  (0.4ms) rollback transaction
65241
+  (0.4ms) begin transaction
65242
+ --------------------------------------------------------------------------------
65243
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
65244
+ --------------------------------------------------------------------------------
65245
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65246
+  (0.0ms) SAVEPOINT active_record_1
65247
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65248
+  (0.3ms) RELEASE SAVEPOINT active_record_1
65249
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65250
+ Processing by ClarkKent::ReportsController#create as HTML
65251
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
65252
+  (0.0ms) SAVEPOINT active_record_1
65253
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
65254
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
65255
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65256
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65257
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (21.1ms)
65258
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (25.3ms)
65259
+ Completed 409 Conflict in 34ms (Views: 31.3ms | ActiveRecord: 0.2ms)
65260
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
65261
+  (0.4ms) rollback transaction
65262
+  (0.1ms) begin transaction
65263
+ ------------------------------------------------------------
65264
+ ClarkKent::ReportsControllerTest: test_0001_should get index
65265
+ ------------------------------------------------------------
65266
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65267
+  (0.0ms) SAVEPOINT active_record_1
65268
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65269
+  (0.3ms) RELEASE SAVEPOINT active_record_1
65270
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65271
+ Processing by ClarkKent::ReportsController#index as HTML
65272
+ Parameters: {"current_user_id"=>"1"}
65273
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
65274
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65275
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "User"], ["LIMIT", 1]]
65276
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65277
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["LIMIT", 1]]
65278
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
65279
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
65280
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (11.8ms)
65281
+ Completed 200 OK in 18ms (Views: 14.4ms | ActiveRecord: 0.5ms)
65282
+  (0.5ms) rollback transaction
65283
+  (0.1ms) begin transaction
65284
+ ----------------------------------------------------------
65285
+ ClarkKent::ReportsControllerTest: test_0002_should get new
65286
+ ----------------------------------------------------------
65287
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65288
+  (0.0ms) SAVEPOINT active_record_1
65289
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65290
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65291
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65292
+ Processing by ClarkKent::ReportsController#new as HTML
65293
+ Parameters: {"current_user_id"=>"1"}
65294
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
65295
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65296
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65297
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (12.3ms)
65298
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (13.1ms)
65299
+ Completed 200 OK in 18ms (Views: 16.4ms | ActiveRecord: 0.7ms)
65300
+  (0.5ms) rollback transaction
65301
+  (0.1ms) begin transaction
65302
+ --------------------------------------------------------------
65303
+ ClarkKent::ReportsControllerTest: test_0005_should show report
65304
+ --------------------------------------------------------------
65305
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65306
+  (0.1ms) SAVEPOINT active_record_1
65307
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65308
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65309
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65310
+ Processing by ClarkKent::ReportsController#show as HTML
65311
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
65312
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65313
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
65314
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
65315
+ 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"]]
65316
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
65317
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65318
+ User Load (0.0ms) SELECT "users".* FROM "users"
65319
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.5ms)
65320
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
65321
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
65322
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (5.7ms)
65323
+ Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 0.4ms)
65324
+  (0.6ms) rollback transaction
65325
+  (0.1ms) begin transaction
65326
+ --------------------------------------------------------------------------
65327
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
65328
+ --------------------------------------------------------------------------
65329
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65330
+  (0.1ms) SAVEPOINT active_record_1
65331
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65332
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65333
+  (0.1ms) rollback transaction
65334
+  (0.0ms) begin transaction
65335
+ ------------------------------------------------------------------------------------------------
65336
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
65337
+ ------------------------------------------------------------------------------------------------
65338
+  (0.0ms) SAVEPOINT active_record_1
65339
+  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1
65340
+  (0.1ms) rollback transaction
65341
+  (0.1ms) begin transaction
65342
+ -------------------------------------------------------------------------------
65343
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
65344
+ -------------------------------------------------------------------------------
65345
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65346
+ Processing by ClarkKent::ReportColumnsController#create as JS
65347
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1"}}
65348
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65349
+  (0.0ms) SAVEPOINT active_record_1
65350
+ SQL (0.5ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name") VALUES (?, ?) [["report_id", 1], ["column_name", "user_name"]]
65351
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65352
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (3.0ms)
65353
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (35.6ms)
65354
+ Completed 200 OK in 66ms (Views: 63.0ms | ActiveRecord: 0.7ms)
65355
+  (0.8ms) rollback transaction
65356
+  (0.2ms) begin transaction
65357
+ --------------------------------------------------------------------------------------------------
65358
+ ClarkKent::ReportColumnsControllerTest: test_0003_should reject a report column with unusable sort
65359
+ --------------------------------------------------------------------------------------------------
65360
+ ClarkKent::Report Load (0.4ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65361
+ Processing by ClarkKent::ReportColumnsController#create as JS
65362
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1", "report_sort"=>"ascending"}}
65363
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65364
+  (0.1ms) SAVEPOINT active_record_1
65365
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65366
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
65367
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
65368
+ 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]]
65369
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (16.0ms)
65370
+ Completed 409 Conflict in 48ms (Views: 42.8ms | ActiveRecord: 0.5ms)
65371
+  (0.1ms) rollback transaction
65372
+  (0.4ms) begin transaction
65373
+ ---------------------------------------------------------------------------------------------------
65374
+ ClarkKent::ReportColumnsControllerTest: test_0002_should reject a report column with no column_name
65375
+ ---------------------------------------------------------------------------------------------------
65376
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65377
+ Processing by ClarkKent::ReportColumnsController#create as JS
65378
+ Parameters: {"report_column"=>{"report_id"=>"1"}}
65379
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65380
+  (0.1ms) SAVEPOINT active_record_1
65381
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
65382
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
65383
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65384
+ 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]]
65385
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (11.9ms)
65386
+ Completed 409 Conflict in 17ms (Views: 12.3ms | ActiveRecord: 0.7ms)
65387
+  (0.1ms) rollback transaction
65388
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
65389
+  (2.1ms) 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)
65390
+  (0.1ms) select sqlite_version(*)
65391
+  (1.2ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
65392
+  (1.2ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
65393
+  (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)
65394
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
65395
+  (0.1ms)  SELECT sql
65396
+ FROM sqlite_master
65397
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
65398
+ UNION ALL
65399
+ SELECT sql
65400
+ FROM sqlite_temp_master
65401
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
65402
+ 
65403
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
65404
+  (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)
65405
+  (1.0ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
65406
+  (0.1ms)  SELECT sql
65407
+ FROM sqlite_master
65408
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
65409
+ UNION ALL
65410
+ SELECT sql
65411
+ FROM sqlite_temp_master
65412
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
65413
+ 
65414
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
65415
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
65416
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
65417
+  (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)
65418
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
65419
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
65420
+  (0.1ms) SELECT version FROM "schema_migrations"
65421
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
65422
+  (0.8ms) INSERT INTO schema_migrations (version) VALUES
65423
+ ('20131226170042'),
65424
+ ('20131226170112'),
65425
+ ('20140114010048'),
65426
+ ('20140129051754'),
65427
+ ('20150304233739');
65428
+
65429
+ 
65430
+  (0.8ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
65431
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
65432
+  (0.0ms) begin transaction
65433
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-04-07 18:47:34 UTC], ["updated_at", 2017-04-07 18:47:34 UTC]]
65434
+  (0.9ms) commit transaction
65435
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
65436
+  (0.1ms) begin transaction
65437
+  (0.1ms) commit transaction
65438
+  (0.1ms) begin transaction
65439
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-04-07 18:47:34 UTC], ["updated_at", 2017-04-07 18:47:34 UTC]]
65440
+  (1.1ms) commit transaction
65441
+  (0.0ms) begin transaction
65442
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "user_name"], ["column_order", 1]]
65443
+  (1.0ms) commit transaction
65444
+  (0.1ms) begin transaction
65445
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
65446
+  (0.9ms) commit transaction
65447
+  (0.1ms) begin transaction
65448
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
65449
+  (0.9ms) commit transaction
65450
+  (0.1ms) begin transaction
65451
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
65452
+  (0.7ms) commit transaction
65453
+  (0.0ms) begin transaction
65454
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
65455
+  (0.7ms) commit transaction
65456
+  (0.1ms) begin transaction
65457
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
65458
+  (0.8ms) commit transaction
65459
+  (0.0ms) begin transaction
65460
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-04-07 18:47:34 UTC], ["updated_at", 2017-04-07 18:47:34 UTC]]
65461
+  (0.8ms) commit transaction
65462
+  (0.1ms) begin transaction
65463
+ ----------------------------------------------------------------------
65464
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
65465
+ ----------------------------------------------------------------------
65466
+ ClarkKent::Report Load (0.3ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65467
+  (0.1ms) SAVEPOINT active_record_1
65468
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65469
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65470
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65471
+ Processing by ClarkKent::ReportsController#show as HTML
65472
+ Parameters: {"created_at_from"=>"2017-04-06", "created_at_until"=>"04/07/2017", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
65473
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65474
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
65475
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
65476
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
65477
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
65478
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65479
+ User Load (0.1ms) SELECT "users".* FROM "users"
65480
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.9ms)
65481
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.7ms)
65482
+  (0.4ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
65483
+  (0.1ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ?) subquery_for_count [["LIMIT", 10], ["OFFSET", 0]]
65484
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (8.3ms)
65485
+ ClarkKent::ReportColumn Load (0.4ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
65486
+ Order Load (0.2ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
65487
+ (SELECT u.name
65488
+ FROM users u
65489
+ WHERE u.id = orders.user_id)
65490
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
65491
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65492
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65493
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65494
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65495
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.0ms)
65496
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (51.0ms)
65497
+ Completed 200 OK in 82908ms (Views: 218.9ms | ActiveRecord: 2.3ms)
65498
+  (0.5ms) rollback transaction
65499
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
65500
+  (1.4ms) 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)
65501
+  (0.1ms) select sqlite_version(*)
65502
+  (1.3ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
65503
+  (0.9ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
65504
+  (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)
65505
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
65506
+  (0.1ms)  SELECT sql
65507
+ FROM sqlite_master
65508
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
65509
+ UNION ALL
65510
+ SELECT sql
65511
+ FROM sqlite_temp_master
65512
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
65513
+ 
65514
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
65515
+  (1.0ms) 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)
65516
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
65517
+  (0.1ms)  SELECT sql
65518
+ FROM sqlite_master
65519
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
65520
+ UNION ALL
65521
+ SELECT sql
65522
+ FROM sqlite_temp_master
65523
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
65524
+ 
65525
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
65526
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
65527
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
65528
+  (1.1ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
65529
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
65530
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
65531
+  (0.2ms) SELECT version FROM "schema_migrations"
65532
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
65533
+  (0.9ms) INSERT INTO schema_migrations (version) VALUES
65534
+ ('20131226170042'),
65535
+ ('20131226170112'),
65536
+ ('20140114010048'),
65537
+ ('20140129051754'),
65538
+ ('20150304233739');
65539
+
65540
+ 
65541
+  (0.9ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
65542
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
65543
+  (0.1ms) begin transaction
65544
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-04-07 19:28:49 UTC], ["updated_at", 2017-04-07 19:28:49 UTC]]
65545
+  (0.7ms) commit transaction
65546
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
65547
+  (0.1ms) begin transaction
65548
+  (0.0ms) commit transaction
65549
+  (0.1ms) begin transaction
65550
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-04-07 19:28:49 UTC], ["updated_at", 2017-04-07 19:28:49 UTC]]
65551
+  (1.0ms) commit transaction
65552
+  (0.1ms) begin transaction
65553
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "user_name"], ["column_order", 1]]
65554
+  (0.7ms) commit transaction
65555
+  (0.1ms) begin transaction
65556
+ SQL (0.4ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
65557
+  (0.8ms) commit transaction
65558
+  (0.0ms) begin transaction
65559
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
65560
+  (0.7ms) commit transaction
65561
+  (0.0ms) begin transaction
65562
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
65563
+  (0.7ms) commit transaction
65564
+  (0.0ms) begin transaction
65565
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
65566
+  (0.9ms) commit transaction
65567
+  (0.1ms) begin transaction
65568
+ SQL (0.4ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
65569
+  (0.7ms) commit transaction
65570
+  (0.1ms) begin transaction
65571
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-04-07 19:28:49 UTC], ["updated_at", 2017-04-07 19:28:49 UTC]]
65572
+  (1.0ms) commit transaction
65573
+  (0.1ms) begin transaction
65574
+ ---------------------------------------------------
65575
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
65576
+ ---------------------------------------------------
65577
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
65578
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65579
+ SQL (0.4ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
65580
+  (0.1ms) SAVEPOINT active_record_1
65581
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
65582
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65583
+  (0.1ms) SAVEPOINT active_record_1
65584
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-04-07 19:28:49 UTC], ["updated_at", 2017-04-07 19:28:49 UTC]]
65585
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65586
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65587
+ 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"]]
65588
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65589
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65590
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65591
+ 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]]
65592
+ 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"]]
65593
+ 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"]]
65594
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
65595
+  (0.6ms) rollback transaction
65596
+  (0.1ms) begin transaction
65597
+ -----------------------------------------------------------------------------------------
65598
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
65599
+ -----------------------------------------------------------------------------------------
65600
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
65601
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65602
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
65603
+  (0.0ms) SAVEPOINT active_record_1
65604
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
65605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65606
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65607
+ 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"]]
65608
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65609
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65610
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65611
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
65612
+ 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"]]
65613
+ 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"]]
65614
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65615
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65616
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
65617
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (1.4ms)
65618
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 180.8ms
65619
+ Sent mail to taproot@gmail.com (7.0ms)
65620
+ Date: Fri, 07 Apr 2017 13:28:50 -0600
65621
+ From: reservations@invitedhome.com
65622
+ To: taproot@gmail.com
65623
+ Message-ID: <58e7e87277432_61e73ff0eb03fa0419360@Erics-MacBook-Pro.local.mail>
65624
+ Subject: Your report has a problem
65625
+ Mime-Version: 1.0
65626
+ Content-Type: text/html;
65627
+ charset=UTF-8
65628
+ Content-Transfer-Encoding: 7bit
65629
+
65630
+ Your report could not be created due to the following problem:
65631
+ <strong>At least one date range is required.</strong>
65632
+  (0.4ms) rollback transaction
65633
+  (0.1ms) begin transaction
65634
+ -------------------------
65635
+ ClarkKentTest: test_truth
65636
+ -------------------------
65637
+  (0.0ms) rollback transaction
65638
+  (0.0ms) begin transaction
65639
+ --------------------------------------------------------------------------
65640
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
65641
+ --------------------------------------------------------------------------
65642
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65643
+  (0.0ms) SAVEPOINT active_record_1
65644
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65645
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65646
+  (0.1ms) rollback transaction
65647
+  (0.1ms) begin transaction
65648
+ ------------------------------------------------------------------------------------------------
65649
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
65650
+ ------------------------------------------------------------------------------------------------
65651
+  (0.0ms) SAVEPOINT active_record_1
65652
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
65653
+  (0.0ms) rollback transaction
65654
+  (0.0ms) begin transaction
65655
+ -----------------------------------------------------
65656
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
65657
+ -----------------------------------------------------
65658
+  (0.1ms) rollback transaction
65659
+  (0.1ms) begin transaction
65660
+ -----------------------------------------------------------------------------
65661
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
65662
+ -----------------------------------------------------------------------------
65663
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65664
+  (0.1ms) SAVEPOINT active_record_1
65665
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65666
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65667
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65668
+ Processing by ClarkKent::ReportFiltersController#create as HTML
65669
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
65670
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65671
+  (0.1ms) SAVEPOINT active_record_1
65672
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65673
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65674
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65675
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.4ms)
65676
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (11.8ms)
65677
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (16.8ms)
65678
+ Completed 200 OK in 31ms (Views: 20.3ms | ActiveRecord: 0.4ms)
65679
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
65680
+  (0.4ms) rollback transaction
65681
+  (0.1ms) begin transaction
65682
+ -------------------------------------------------------------------------------------
65683
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
65684
+ -------------------------------------------------------------------------------------
65685
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65686
+  (0.0ms) SAVEPOINT active_record_1
65687
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65688
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65689
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65690
+ Processing by ClarkKent::ReportFiltersController#create as HTML
65691
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
65692
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65693
+  (0.1ms) SAVEPOINT active_record_1
65694
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65695
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65696
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65697
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65698
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (1.0ms)
65699
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (6.8ms)
65700
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (7.0ms)
65701
+ Completed 200 OK in 20ms (Views: 7.3ms | ActiveRecord: 0.5ms)
65702
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
65703
+  (0.4ms) rollback transaction
65704
+  (0.1ms) begin transaction
65705
+ ------------------------------------------------------------------------------------------
65706
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
65707
+ ------------------------------------------------------------------------------------------
65708
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65709
+  (0.0ms) SAVEPOINT active_record_1
65710
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65711
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65712
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65713
+  (0.0ms) SAVEPOINT active_record_1
65714
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65715
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65716
+ Processing by ClarkKent::ReportFiltersController#show as HTML
65717
+ Parameters: {"id"=>"1"}
65718
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65719
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65720
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65721
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65722
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.4ms)
65723
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.2ms)
65724
+ Completed 200 OK in 6ms (Views: 2.4ms | ActiveRecord: 0.3ms)
65725
+  (0.5ms) rollback transaction
65726
+  (0.1ms) begin transaction
65727
+ ---------------------------------------------------------------------------------------
65728
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
65729
+ ---------------------------------------------------------------------------------------
65730
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65731
+  (0.0ms) SAVEPOINT active_record_1
65732
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65733
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65734
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65735
+  (0.1ms) SAVEPOINT active_record_1
65736
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65737
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65738
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
65739
+ Parameters: {"id"=>"1"}
65740
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65741
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65742
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65743
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (7.1ms)
65744
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (62.4ms)
65745
+ Completed 200 OK in 68ms (Views: 66.1ms | ActiveRecord: 0.2ms)
65746
+  (0.5ms) rollback transaction
65747
+  (0.1ms) begin transaction
65748
+ ---------------------------------------------------------------------------------------
65749
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
65750
+ ---------------------------------------------------------------------------------------
65751
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65752
+  (0.0ms) SAVEPOINT active_record_1
65753
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65754
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65755
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65756
+  (0.0ms) SAVEPOINT active_record_1
65757
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65758
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65759
+ Processing by ClarkKent::ReportFiltersController#show as HTML
65760
+ Parameters: {"id"=>"1"}
65761
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65762
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65763
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65764
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.6ms)
65765
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.3ms)
65766
+ Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.2ms)
65767
+  (0.5ms) rollback transaction
65768
+  (0.1ms) begin transaction
65769
+ ------------------------------------------------------------------------------------------
65770
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
65771
+ ------------------------------------------------------------------------------------------
65772
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65773
+  (0.0ms) SAVEPOINT active_record_1
65774
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65775
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65776
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65777
+  (0.0ms) SAVEPOINT active_record_1
65778
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65779
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65780
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
65781
+ Parameters: {"id"=>"1"}
65782
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65783
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65784
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65785
+ User Load (0.1ms) SELECT "users".* FROM "users"
65786
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (3.0ms)
65787
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (12.3ms)
65788
+ Completed 200 OK in 15ms (Views: 12.7ms | ActiveRecord: 0.3ms)
65789
+  (1.1ms) rollback transaction
65790
+  (0.1ms) begin transaction
65791
+ ----------------------------------------------------------------------------------
65792
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
65793
+ ----------------------------------------------------------------------------------
65794
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65795
+  (0.0ms) SAVEPOINT active_record_1
65796
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65797
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65798
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65799
+ Processing by ClarkKent::ReportFiltersController#create as HTML
65800
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
65801
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65802
+  (0.0ms) SAVEPOINT active_record_1
65803
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65804
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65805
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65806
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.0ms)
65807
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.4ms)
65808
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (1.5ms)
65809
+ Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.3ms)
65810
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
65811
+  (0.4ms) rollback transaction
65812
+  (0.1ms) begin transaction
65813
+ -----------------------------------------------------------------------------------------
65814
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
65815
+ -----------------------------------------------------------------------------------------
65816
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65817
+  (0.0ms) SAVEPOINT active_record_1
65818
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65819
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65820
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65821
+  (0.0ms) SAVEPOINT active_record_1
65822
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65823
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65824
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
65825
+ Parameters: {"id"=>"1"}
65826
+ ClarkKent::ReportFilter Load (0.0ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65827
+ ClarkKent::ReportEmail Load (0.0ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65828
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65829
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.3ms)
65830
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (7.3ms)
65831
+ Completed 200 OK in 9ms (Views: 7.5ms | ActiveRecord: 0.1ms)
65832
+  (0.5ms) rollback transaction
65833
+  (0.1ms) begin transaction
65834
+ -----------------------------------------------------------------------------------------
65835
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
65836
+ -----------------------------------------------------------------------------------------
65837
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65838
+  (0.0ms) SAVEPOINT active_record_1
65839
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65840
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65841
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65842
+  (0.1ms) SAVEPOINT active_record_1
65843
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-04-07 19:28:50 UTC], ["updated_at", 2017-04-07 19:28:50 UTC]]
65844
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65845
+ Processing by ClarkKent::ReportFiltersController#show as HTML
65846
+ Parameters: {"id"=>"1"}
65847
+ ClarkKent::ReportFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65848
+ ClarkKent::ReportEmail Load (0.1ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65849
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65850
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.0ms)
65851
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.5ms)
65852
+ Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.2ms)
65853
+  (0.4ms) rollback transaction
65854
+  (0.1ms) begin transaction
65855
+ -----------------------------------------------------------
65856
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
65857
+ -----------------------------------------------------------
65858
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65859
+  (0.1ms) SAVEPOINT active_record_1
65860
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65861
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65862
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65863
+ Processing by ClarkKent::ReportsController#edit as HTML
65864
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
65865
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65866
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
65867
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.2ms)
65868
+ 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"]]
65869
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.2ms)
65870
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
65871
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.4ms)
65872
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (6.0ms)
65873
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
65874
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
65875
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
65876
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
65877
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
65878
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
65879
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (15.2ms)
65880
+ 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]]
65881
+ ClarkKent::ReportDateFilter Load (0.1ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
65882
+ User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
65883
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (29.3ms)
65884
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (32.7ms)
65885
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (39.0ms)
65886
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (75.5ms)
65887
+ Completed 200 OK in 255ms (Views: 250.7ms | ActiveRecord: 0.7ms)
65888
+  (0.6ms) rollback transaction
65889
+  (0.1ms) begin transaction
65890
+ --------------------------------------------------------------------------------
65891
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
65892
+ --------------------------------------------------------------------------------
65893
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65894
+  (0.0ms) SAVEPOINT active_record_1
65895
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65896
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65897
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65898
+ Processing by ClarkKent::ReportsController#create as HTML
65899
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
65900
+  (0.0ms) SAVEPOINT active_record_1
65901
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
65902
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
65903
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65904
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65905
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (9.4ms)
65906
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (14.8ms)
65907
+ Completed 409 Conflict in 23ms (Views: 20.5ms | ActiveRecord: 0.4ms)
65908
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
65909
+  (0.5ms) rollback transaction
65910
+  (0.1ms) begin transaction
65911
+ ----------------------------------------------------------------
65912
+ ClarkKent::ReportsControllerTest: test_0003_should create report
65913
+ ----------------------------------------------------------------
65914
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65915
+  (0.0ms) SAVEPOINT active_record_1
65916
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65917
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65918
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65919
+ Processing by ClarkKent::ReportsController#create as HTML
65920
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
65921
+  (0.1ms) SAVEPOINT active_record_1
65922
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-04-07 19:28:51 UTC], ["updated_at", 2017-04-07 19:28:51 UTC]]
65923
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65924
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
65925
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.9ms)
65926
+ 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"]]
65927
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.3ms)
65928
+ 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]]
65929
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.6ms)
65930
+ 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]]
65931
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.2ms)
65932
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (8.3ms)
65933
+ Completed 200 OK in 13ms (Views: 10.1ms | ActiveRecord: 0.5ms)
65934
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
65935
+  (0.0ms) SAVEPOINT active_record_1
65936
+ 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"]]
65937
+ 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]]
65938
+ 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]]
65939
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
65940
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65941
+  (0.4ms) rollback transaction
65942
+  (0.0ms) begin transaction
65943
+ ----------------------------------------------------------
65944
+ ClarkKent::ReportsControllerTest: test_0002_should get new
65945
+ ----------------------------------------------------------
65946
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65947
+  (0.0ms) SAVEPOINT active_record_1
65948
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65949
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65950
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65951
+ Processing by ClarkKent::ReportsController#new as HTML
65952
+ Parameters: {"current_user_id"=>"1"}
65953
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
65954
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
65955
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65956
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (6.0ms)
65957
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (6.6ms)
65958
+ Completed 200 OK in 9ms (Views: 8.5ms | ActiveRecord: 0.1ms)
65959
+  (0.4ms) rollback transaction
65960
+  (0.1ms) begin transaction
65961
+ -----------------------------------------------------------------
65962
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
65963
+ -----------------------------------------------------------------
65964
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65965
+  (0.1ms) SAVEPOINT active_record_1
65966
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65967
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65968
+  (0.1ms) SAVEPOINT active_record_1
65969
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-04-07 19:28:51 UTC], ["updated_at", 2017-04-07 19:28:51 UTC]]
65970
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65971
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
65972
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65973
+ Processing by ClarkKent::ReportsController#destroy as HTML
65974
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
65975
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
65976
+  (0.0ms) SAVEPOINT active_record_1
65977
+ 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"]]
65978
+ 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]]
65979
+ 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]]
65980
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
65981
+  (0.1ms) RELEASE SAVEPOINT active_record_1
65982
+ Redirected to http://test.host/reports/reports
65983
+ Completed 302 Found in 5ms (ActiveRecord: 0.4ms)
65984
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
65985
+  (0.4ms) rollback transaction
65986
+  (0.1ms) begin transaction
65987
+ ----------------------------------------------------------------
65988
+ ClarkKent::ReportsControllerTest: test_0009_should update report
65989
+ ----------------------------------------------------------------
65990
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
65991
+  (0.1ms) SAVEPOINT active_record_1
65992
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
65993
+  (0.0ms) RELEASE SAVEPOINT active_record_1
65994
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
65995
+ Processing by ClarkKent::ReportsController#update as HTML
65996
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
65997
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
65998
+ ClarkKent::ReportColumn Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? LIMIT ? [["report_id", 1], ["LIMIT", 1]]
65999
+  (0.1ms) SAVEPOINT active_record_1
66000
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-04-07 19:28:51 UTC], ["id", 1]]
66001
+  (0.1ms) RELEASE SAVEPOINT active_record_1
66002
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.1ms)
66003
+ Completed 200 OK in 10ms (Views: 1.4ms | ActiveRecord: 0.5ms)
66004
+  (0.6ms) rollback transaction
66005
+  (0.1ms) begin transaction
66006
+ ----------------------------------------------------------------------
66007
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
66008
+ ----------------------------------------------------------------------
66009
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
66010
+  (0.0ms) SAVEPOINT active_record_1
66011
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
66012
+  (0.1ms) RELEASE SAVEPOINT active_record_1
66013
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
66014
+ Processing by ClarkKent::ReportsController#show as HTML
66015
+ Parameters: {"created_at_from"=>"2017-04-06", "created_at_until"=>"04/07/2017", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
66016
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
66017
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
66018
+ 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"]]
66019
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
66020
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.1ms)
66021
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
66022
+ User Load (0.1ms) SELECT "users".* FROM "users"
66023
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.9ms)
66024
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.7ms)
66025
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
66026
+  (0.2ms) SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ?) subquery_for_count [["LIMIT", 10], ["OFFSET", 0]]
66027
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.4ms)
66028
+ 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]]
66029
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
66030
+ (SELECT u.name
66031
+ FROM users u
66032
+ WHERE u.id = orders.user_id)
66033
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
66034
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66035
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66036
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66037
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66038
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.8ms)
66039
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (45.2ms)
66040
+ Completed 200 OK in 63ms (Views: 48.4ms | ActiveRecord: 1.4ms)
66041
+  (0.6ms) rollback transaction
66042
+  (0.1ms) begin transaction
66043
+ ------------------------------------------------------------
66044
+ ClarkKent::ReportsControllerTest: test_0001_should get index
66045
+ ------------------------------------------------------------
66046
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
66047
+  (0.0ms) SAVEPOINT active_record_1
66048
+ SQL (0.4ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
66049
+  (0.1ms) RELEASE SAVEPOINT active_record_1
66050
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
66051
+ Processing by ClarkKent::ReportsController#index as HTML
66052
+ Parameters: {"current_user_id"=>"1"}
66053
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
66054
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
66055
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "User"], ["LIMIT", 1]]
66056
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66057
+ ClarkKent::Report Exists (0.1ms) SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT ? [["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["LIMIT", 1]]
66058
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
66059
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
66060
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (12.8ms)
66061
+ Completed 200 OK in 20ms (Views: 15.7ms | ActiveRecord: 0.5ms)
66062
+  (0.4ms) rollback transaction
66063
+  (0.1ms) begin transaction
66064
+ -------------------------------------------------------------------------
66065
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
66066
+ -------------------------------------------------------------------------
66067
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
66068
+  (0.1ms) SAVEPOINT active_record_1
66069
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
66070
+  (0.1ms) RELEASE SAVEPOINT active_record_1
66071
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
66072
+ Processing by ClarkKent::ReportsController#show as HTML
66073
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
66074
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
66075
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
66076
+ ClarkKent::ReportFilter Load (1.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"]]
66077
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
66078
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.6ms)
66079
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
66080
+ User Load (0.0ms) SELECT "users".* FROM "users"
66081
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.6ms)
66082
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
66083
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
66084
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (3.5ms)
66085
+ Completed 200 OK in 14ms (Views: 6.3ms | ActiveRecord: 1.4ms)
66086
+  (0.4ms) rollback transaction
66087
+  (0.1ms) begin transaction
66088
+ --------------------------------------------------------------
66089
+ ClarkKent::ReportsControllerTest: test_0005_should show report
66090
+ --------------------------------------------------------------
66091
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
66092
+  (0.0ms) SAVEPOINT active_record_1
66093
+ SQL (0.3ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
66094
+  (0.0ms) RELEASE SAVEPOINT active_record_1
66095
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
66096
+ Processing by ClarkKent::ReportsController#show as HTML
66097
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
66098
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
66099
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = 1 ORDER BY clark_kent_report_columns.column_order
66100
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
66101
+ ClarkKent::ReportFilter Load (0.5ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
66102
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
66103
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
66104
+ User Load (0.0ms) SELECT "users".* FROM "users"
66105
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.8ms)
66106
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
66107
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
66108
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (6.2ms)
66109
+ Completed 200 OK in 14ms (Views: 10.0ms | ActiveRecord: 0.9ms)
66110
+  (0.5ms) rollback transaction
66111
+  (1.0ms) begin transaction
66112
+ ------------------------------------------------------------------------
66113
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
66114
+ ------------------------------------------------------------------------
66115
+  (0.1ms) SAVEPOINT active_record_1
66116
+ SQL (0.8ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-04-07 19:28:51 UTC], ["updated_at", 2017-04-07 19:28:51 UTC]]
66117
+  (0.0ms) RELEASE SAVEPOINT active_record_1
66118
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
66119
+ 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"]]
66120
+  (0.5ms) rollback transaction
66121
+  (0.1ms) begin transaction
66122
+ --------------------------------------------------------------------------
66123
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
66124
+ --------------------------------------------------------------------------
66125
+  (0.0ms) SAVEPOINT active_record_1
66126
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-04-07 19:28:51 UTC], ["updated_at", 2017-04-07 19:28:51 UTC]]
66127
+  (0.0ms) RELEASE SAVEPOINT active_record_1
66128
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
66129
+ 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"]]
66130
+  (0.4ms) rollback transaction
66131
+  (0.1ms) begin transaction
66132
+ --------------------------------------------------------------------------
66133
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
66134
+ --------------------------------------------------------------------------
66135
+  (0.0ms) SAVEPOINT active_record_1
66136
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-04-07 19:28:51 UTC], ["updated_at", 2017-04-07 19:28:51 UTC]]
66137
+  (0.0ms) RELEASE SAVEPOINT active_record_1
66138
+  (0.1ms) SAVEPOINT active_record_1
66139
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
66140
+  (0.1ms) RELEASE SAVEPOINT active_record_1
66141
+ 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]]
66142
+ 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"]]
66143
+  (0.5ms) rollback transaction
66144
+  (0.1ms) begin transaction
66145
+ ---------------------------------------------------------------------------------------------------
66146
+ ClarkKent::ReportColumnsControllerTest: test_0002_should reject a report column with no column_name
66147
+ ---------------------------------------------------------------------------------------------------
66148
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
66149
+ Processing by ClarkKent::ReportColumnsController#create as JS
66150
+ Parameters: {"report_column"=>{"report_id"=>"1"}}
66151
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66152
+  (0.1ms) SAVEPOINT active_record_1
66153
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
66154
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
66155
+ ClarkKent::Report Load (0.6ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66156
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
66157
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (22.9ms)
66158
+ Completed 409 Conflict in 63ms (Views: 59.3ms | ActiveRecord: 1.1ms)
66159
+  (1.1ms) rollback transaction
66160
+  (0.3ms) begin transaction
66161
+ -------------------------------------------------------------------------------
66162
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
66163
+ -------------------------------------------------------------------------------
66164
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
66165
+ Processing by ClarkKent::ReportColumnsController#create as JS
66166
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1"}}
66167
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66168
+  (0.0ms) SAVEPOINT active_record_1
66169
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name") VALUES (?, ?) [["report_id", 1], ["column_name", "user_name"]]
66170
+  (0.0ms) RELEASE SAVEPOINT active_record_1
66171
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.6ms)
66172
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (39.4ms)
66173
+ Completed 200 OK in 75ms (Views: 72.2ms | ActiveRecord: 0.5ms)
66174
+  (1.1ms) rollback transaction
66175
+  (0.1ms) begin transaction
66176
+ --------------------------------------------------------------------------------------------------
66177
+ ClarkKent::ReportColumnsControllerTest: test_0003_should reject a report column with unusable sort
66178
+ --------------------------------------------------------------------------------------------------
66179
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
66180
+ Processing by ClarkKent::ReportColumnsController#create as JS
66181
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1", "report_sort"=>"ascending"}}
66182
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66183
+  (0.0ms) SAVEPOINT active_record_1
66184
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
66185
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
66186
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
66187
+ ClarkKent::ReportColumn Load (0.5ms) 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]]
66188
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (12.1ms)
66189
+ Completed 409 Conflict in 16ms (Views: 11.8ms | ActiveRecord: 0.8ms)
66190
+  (0.1ms) rollback transaction