clark_kent 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5126c39816a9544607fada9211a8afac589e127
4
- data.tar.gz: bbf908d01246044a51c2bbfa3aba70073cc76d3d
3
+ metadata.gz: bea419c4fea6d2354cee5b77eb4ba96ea80b2d6b
4
+ data.tar.gz: 5d86e96f8e26bf93d513e874ab83299c83891289
5
5
  SHA512:
6
- metadata.gz: 553f89a8085a418d8aa66245e4b782ca613c2327fb52bc7473c28e5354ccd5f2bc27f820e46af7eb62404f97adf0a067bdc8f860ce9eced7d8aa666fac04913f
7
- data.tar.gz: 69acda8f042a47ab8dc58d8eed29de78f7c45469ef3c1cc3a007683051442a4383cb70a6a43dbc295b47ba55e2566e9923bcae3bfd8b7493652a495b78f05014
6
+ metadata.gz: 39ed33a7428f3a8c0b52c0bcfb8d14b3d4c42ae1c2b24a052234d5ed6c182dcbafc12e2bac948fecf07f9059056815f08081e9c0ba2b7763b342e71f0888a19d
7
+ data.tar.gz: 42a259683e9f5992a0b7e66f672e98bce0fa4c61b7c725290c731d9d81736d129c156d3ccaddbb6f1a0416533a0804c0ec7027fa6a31bd4ec7a13150950e66c4
@@ -10,7 +10,11 @@ class ClarkKent::ReportColumnsController < ClarkKent::ApplicationController
10
10
  def create
11
11
  @report_column = ClarkKent::ReportColumn.new(report_column_params)
12
12
  @report_column.save
13
- render partial: 'show_wrapper', locals: {report_column: @report_column}
13
+ if @report_column.errors.empty?
14
+ render partial: 'show_wrapper', locals: {report_column: @report_column}
15
+ else
16
+ render partial: 'form', locals: {report_column: @report_column}, status: :conflict
17
+ end
14
18
  end
15
19
 
16
20
  def show
@@ -23,8 +27,13 @@ class ClarkKent::ReportColumnsController < ClarkKent::ApplicationController
23
27
 
24
28
  def update
25
29
  @report_column.update_attributes(report_column_params)
26
- @ajax_flash = {notice: "Your changes were saved."}
27
- render partial: 'show', locals: {report_column: @report_column}
30
+ if @report_column.errors.empty?
31
+ render json: {
32
+ flash_message: "Your changes were saved.",
33
+ html: render_to_string(partial: 'show', locals: {report_column: @report_column}) }
34
+ else
35
+ render partial: 'form', locals: {report_column: @report_column}, status: :conflict
36
+ end
28
37
  end
29
38
 
30
39
  def destroy
@@ -7,7 +7,7 @@ module ClarkKent
7
7
  belongs_to :report
8
8
 
9
9
  scope :sorted, -> { order("clark_kent_report_columns.column_order") }
10
-
10
+ validates :column_name, presence: true
11
11
  validates_with ReportColumnValidator
12
12
 
13
13
  def report_sort_pretty
@@ -1,7 +1,9 @@
1
1
  module ClarkKent
2
2
  class ReportColumnValidator < ActiveModel::Validator
3
3
  def validate(record)
4
- record.errors[:report_sort] << "This column is not sortable." unless record.sortable?
4
+ if record.report_sort.present?
5
+ record.errors[:report_sort] << "This column is not sortable." unless record.sortable?
6
+ end
5
7
  end
6
8
  end
7
9
  end
@@ -1,3 +1,3 @@
1
1
  module ClarkKent
2
- VERSION = "0.8.3"
2
+ VERSION = "0.8.4"
3
3
  end
@@ -0,0 +1,28 @@
1
+ require 'test_helper'
2
+
3
+ class ClarkKent::ReportColumnsControllerTest < ControllerTest
4
+
5
+ let(:report) {ClarkKent::Report.first}
6
+
7
+ setup do
8
+ @routes = ClarkKent::Engine.routes
9
+ end
10
+
11
+ it "should create a report column" do
12
+ xhr :post, :create, params: {report_column: {report_id: report.id, column_name: 'user_name'}}
13
+ assert_response :success
14
+ end
15
+
16
+ it "should reject a report column with no column_name" do
17
+ xhr :post, :create, params: {report_column: {report_id: report.id}}
18
+ assert_response :conflict
19
+ @response.body.must_match /can[^t]*t be blank/
20
+ end
21
+
22
+ it "should reject a report column with unusable sort" do
23
+ xhr :post, :create, params: {report_column: {report_id: report.id, column_name: 'user_name', report_sort: 'ascending'}}
24
+ assert_response :conflict
25
+ @response.body.must_match 'This column is not sortable.'
26
+ end
27
+
28
+ end
Binary file
@@ -53000,3 +53000,1773 @@ ClarkKent::ReportableTest: test_0001_it adds required filters if present
53000
53000
  ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53001
53001
  ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53002
53002
   (0.5ms) rollback transaction
53003
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
53004
+  (1.2ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
53005
+  (0.4ms) select sqlite_version(*)
53006
+  (1.3ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
53007
+  (1.0ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
53008
+  (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)
53009
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
53010
+  (0.1ms)  SELECT sql
53011
+ FROM sqlite_master
53012
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
53013
+ UNION ALL
53014
+ SELECT sql
53015
+ FROM sqlite_temp_master
53016
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
53017
+ 
53018
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
53019
+  (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)
53020
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
53021
+  (0.1ms)  SELECT sql
53022
+ FROM sqlite_master
53023
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
53024
+ UNION ALL
53025
+ SELECT sql
53026
+ FROM sqlite_temp_master
53027
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
53028
+ 
53029
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
53030
+  (1.0ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
53031
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
53032
+  (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)
53033
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
53034
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
53035
+  (0.1ms) SELECT version FROM "schema_migrations"
53036
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
53037
+  (0.9ms) INSERT INTO schema_migrations (version) VALUES
53038
+ ('20131226170042'),
53039
+ ('20131226170112'),
53040
+ ('20140114010048'),
53041
+ ('20140129051754'),
53042
+ ('20150304233739');
53043
+
53044
+ 
53045
+  (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)
53046
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
53047
+  (0.4ms) begin transaction
53048
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-22 23:34:07 UTC], ["updated_at", 2017-02-22 23:34:07 UTC]]
53049
+  (0.7ms) commit transaction
53050
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
53051
+  (0.1ms) begin transaction
53052
+  (0.1ms) commit transaction
53053
+  (0.1ms) begin transaction
53054
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-22 23:34:07 UTC], ["updated_at", 2017-02-22 23:34:07 UTC]]
53055
+  (0.8ms) commit transaction
53056
+  (0.1ms) begin transaction
53057
+ SQL (0.7ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "user_name"], ["column_order", 1]]
53058
+  (0.7ms) commit transaction
53059
+  (0.1ms) begin transaction
53060
+ 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]]
53061
+  (0.6ms) commit transaction
53062
+  (0.1ms) begin transaction
53063
+ 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]]
53064
+  (0.6ms) commit transaction
53065
+  (0.1ms) begin transaction
53066
+ 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]]
53067
+  (0.6ms) commit transaction
53068
+  (0.0ms) begin transaction
53069
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
53070
+  (0.6ms) commit transaction
53071
+  (0.0ms) begin transaction
53072
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
53073
+  (0.7ms) commit transaction
53074
+  (0.1ms) begin transaction
53075
+ SQL (0.4ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-22 23:34:07 UTC], ["updated_at", 2017-02-22 23:34:07 UTC]]
53076
+  (1.0ms) commit transaction
53077
+  (0.1ms) begin transaction
53078
+ -----------------------------------------------------
53079
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
53080
+ -----------------------------------------------------
53081
+  (0.1ms) rollback transaction
53082
+  (0.1ms) begin transaction
53083
+ ------------------------------------------------------------------------
53084
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
53085
+ ------------------------------------------------------------------------
53086
+  (0.0ms) SAVEPOINT active_record_1
53087
+ SQL (0.6ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-02-22 23:34:07 UTC], ["updated_at", 2017-02-22 23:34:07 UTC]]
53088
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53089
+ 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]]
53090
+ ClarkKent::ReportFilter Load (0.3ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
53091
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
53092
+  (0.8ms) rollback transaction
53093
+  (0.1ms) begin transaction
53094
+ --------------------------------------------------------------------------
53095
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
53096
+ --------------------------------------------------------------------------
53097
+  (0.0ms) SAVEPOINT active_record_1
53098
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-22 23:34:07 UTC], ["updated_at", 2017-02-22 23:34:07 UTC]]
53099
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53100
+ ClarkKent::ReportColumn Load (0.3ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
53101
+ 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"]]
53102
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
53103
+  (0.7ms) rollback transaction
53104
+  (0.1ms) begin transaction
53105
+ --------------------------------------------------------------------------
53106
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
53107
+ --------------------------------------------------------------------------
53108
+  (0.1ms) SAVEPOINT active_record_1
53109
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-22 23:34:07 UTC], ["updated_at", 2017-02-22 23:34:07 UTC]]
53110
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53111
+  (0.1ms) SAVEPOINT active_record_1
53112
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
53113
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53114
+ 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]]
53115
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
53116
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
53117
+  (0.4ms) rollback transaction
53118
+  (0.1ms) begin transaction
53119
+ -------------------------
53120
+ ClarkKentTest: test_truth
53121
+ -------------------------
53122
+  (0.0ms) rollback transaction
53123
+  (0.0ms) begin transaction
53124
+ --------------------------------------------------------------------------
53125
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
53126
+ --------------------------------------------------------------------------
53127
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53128
+  (0.0ms) SAVEPOINT active_record_1
53129
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53130
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53131
+  (0.1ms) rollback transaction
53132
+  (0.2ms) begin transaction
53133
+ ----------------------------------------------------------
53134
+ ClarkKent::ReportsControllerTest: test_0002_should get new
53135
+ ----------------------------------------------------------
53136
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53137
+  (0.1ms) SAVEPOINT active_record_1
53138
+ 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"]]
53139
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53140
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53141
+ Processing by ClarkKent::ReportsController#new as HTML
53142
+ Parameters: {"current_user_id"=>"1"}
53143
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
53144
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
53145
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53146
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (49.2ms)
53147
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (58.8ms)
53148
+ Completed 200 OK in 246ms (Views: 242.9ms | ActiveRecord: 0.3ms)
53149
+  (0.6ms) rollback transaction
53150
+  (0.1ms) begin transaction
53151
+ ----------------------------------------------------------------------
53152
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
53153
+ ----------------------------------------------------------------------
53154
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53155
+  (0.0ms) SAVEPOINT active_record_1
53156
+ 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"]]
53157
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53158
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53159
+ Processing by ClarkKent::ReportsController#show as HTML
53160
+ Parameters: {"created_at_from"=>"2017-02-21", "created_at_until"=>"2017-02-22", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
53161
+ ClarkKent::Report Load (0.2ms) 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]]
53162
+ 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
53163
+ 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"]]
53164
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53165
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
53166
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.0ms)
53167
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53168
+ User Load (0.1ms) SELECT "users".* FROM "users"
53169
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.7ms)
53170
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
53171
+  (0.2ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
53172
+  (0.3ms) 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]]
53173
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (7.7ms)
53174
+ 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]]
53175
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
53176
+ (SELECT u.name
53177
+ FROM users u
53178
+ WHERE u.id = orders.user_id)
53179
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
53180
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53181
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53182
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53183
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53184
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.6ms)
53185
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (44.0ms)
53186
+ Completed 200 OK in 59ms (Views: 45.1ms | ActiveRecord: 1.8ms)
53187
+  (0.4ms) rollback transaction
53188
+  (0.1ms) begin transaction
53189
+ --------------------------------------------------------------
53190
+ ClarkKent::ReportsControllerTest: test_0005_should show report
53191
+ --------------------------------------------------------------
53192
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53193
+  (0.1ms) SAVEPOINT active_record_1
53194
+ SQL (0.5ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
53195
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53196
+ User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53197
+ Processing by ClarkKent::ReportsController#show as HTML
53198
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
53199
+ 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]]
53200
+ 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
53201
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
53202
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
53203
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
53204
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
53205
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
53206
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53207
+ User Load (0.0ms) SELECT "users".* FROM "users"
53208
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.9ms)
53209
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
53210
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
53211
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (5.7ms)
53212
+ Completed 200 OK in 12ms (Views: 7.4ms | ActiveRecord: 0.5ms)
53213
+  (0.4ms) rollback transaction
53214
+  (0.1ms) begin transaction
53215
+ ----------------------------------------------------------------
53216
+ ClarkKent::ReportsControllerTest: test_0009_should update report
53217
+ ----------------------------------------------------------------
53218
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53219
+  (0.1ms) SAVEPOINT active_record_1
53220
+ SQL (0.5ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
53221
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53222
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53223
+ Processing by ClarkKent::ReportsController#update as HTML
53224
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
53225
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53226
+  (0.1ms) SAVEPOINT active_record_1
53227
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-02-22 23:34:08 UTC], ["id", 1]]
53228
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53229
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.0ms)
53230
+ Completed 200 OK in 13ms (Views: 6.1ms | ActiveRecord: 0.4ms)
53231
+  (0.4ms) rollback transaction
53232
+  (0.1ms) begin transaction
53233
+ -----------------------------------------------------------------
53234
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
53235
+ -----------------------------------------------------------------
53236
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53237
+  (0.1ms) SAVEPOINT active_record_1
53238
+ 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"]]
53239
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53240
+  (0.0ms) SAVEPOINT active_record_1
53241
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53242
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53243
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
53244
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53245
+ Processing by ClarkKent::ReportsController#destroy as HTML
53246
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
53247
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
53248
+  (0.0ms) SAVEPOINT active_record_1
53249
+ 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"]]
53250
+ 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]]
53251
+ 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]]
53252
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
53253
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53254
+ Redirected to http://test.host/reports/reports
53255
+ Completed 302 Found in 6ms (ActiveRecord: 0.4ms)
53256
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
53257
+  (0.5ms) rollback transaction
53258
+  (0.0ms) begin transaction
53259
+ --------------------------------------------------------------------------------
53260
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
53261
+ --------------------------------------------------------------------------------
53262
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53263
+  (0.1ms) SAVEPOINT active_record_1
53264
+ 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"]]
53265
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53266
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53267
+ Processing by ClarkKent::ReportsController#create as HTML
53268
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
53269
+  (0.0ms) SAVEPOINT active_record_1
53270
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
53271
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
53272
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
53273
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53274
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (6.3ms)
53275
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (6.8ms)
53276
+ Completed 409 Conflict in 11ms (Views: 9.2ms | ActiveRecord: 0.2ms)
53277
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
53278
+  (0.4ms) rollback transaction
53279
+  (0.1ms) begin transaction
53280
+ -------------------------------------------------------------------------
53281
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
53282
+ -------------------------------------------------------------------------
53283
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53284
+  (0.1ms) SAVEPOINT active_record_1
53285
+ 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"]]
53286
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53287
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53288
+ Processing by ClarkKent::ReportsController#show as HTML
53289
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
53290
+ 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]]
53291
+ 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
53292
+ 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"]]
53293
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53294
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
53295
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
53296
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53297
+ User Load (0.0ms) SELECT "users".* FROM "users"
53298
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.1ms)
53299
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
53300
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
53301
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (2.6ms)
53302
+ Completed 200 OK in 12ms (Views: 6.4ms | ActiveRecord: 0.5ms)
53303
+  (0.4ms) rollback transaction
53304
+  (0.1ms) begin transaction
53305
+ ----------------------------------------------------------------
53306
+ ClarkKent::ReportsControllerTest: test_0003_should create report
53307
+ ----------------------------------------------------------------
53308
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53309
+  (0.0ms) SAVEPOINT active_record_1
53310
+ 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"]]
53311
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53312
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53313
+ Processing by ClarkKent::ReportsController#create as HTML
53314
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
53315
+  (0.0ms) SAVEPOINT active_record_1
53316
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53317
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53318
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
53319
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.3ms)
53320
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
53321
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (5.9ms)
53322
+ 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]]
53323
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (3.1ms)
53324
+ 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]]
53325
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (3.2ms)
53326
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (24.8ms)
53327
+ Completed 200 OK in 32ms (Views: 29.0ms | ActiveRecord: 0.7ms)
53328
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
53329
+  (0.1ms) SAVEPOINT active_record_1
53330
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
53331
+ 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]]
53332
+ 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]]
53333
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
53334
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53335
+  (0.5ms) rollback transaction
53336
+  (0.1ms) begin transaction
53337
+ ------------------------------------------------------------
53338
+ ClarkKent::ReportsControllerTest: test_0001_should get index
53339
+ ------------------------------------------------------------
53340
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53341
+  (0.3ms) SAVEPOINT active_record_1
53342
+ SQL (1.0ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
53343
+  (0.2ms) RELEASE SAVEPOINT active_record_1
53344
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53345
+ Processing by ClarkKent::ReportsController#index as HTML
53346
+ Parameters: {"current_user_id"=>"1"}
53347
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
53348
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
53349
+ 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]]
53350
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53351
+ 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]]
53352
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
53353
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
53354
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (15.8ms)
53355
+ Completed 200 OK in 21ms (Views: 17.2ms | ActiveRecord: 0.5ms)
53356
+  (0.5ms) rollback transaction
53357
+  (0.1ms) begin transaction
53358
+ -----------------------------------------------------------
53359
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
53360
+ -----------------------------------------------------------
53361
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53362
+  (0.0ms) SAVEPOINT active_record_1
53363
+ 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"]]
53364
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53365
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53366
+ Processing by ClarkKent::ReportsController#edit as HTML
53367
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
53368
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53369
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
53370
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.3ms)
53371
+ 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"]]
53372
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.7ms)
53373
+ 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]]
53374
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
53375
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (4.1ms)
53376
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
53377
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
53378
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
53379
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
53380
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
53381
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
53382
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (10.6ms)
53383
+ 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]]
53384
+ 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"]]
53385
+ 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]]
53386
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (22.6ms)
53387
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (26.6ms)
53388
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (32.1ms)
53389
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (49.1ms)
53390
+ Completed 200 OK in 53ms (Views: 51.3ms | ActiveRecord: 0.7ms)
53391
+  (0.5ms) rollback transaction
53392
+  (0.1ms) begin transaction
53393
+ -------------------------------------------------------------------------------------
53394
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
53395
+ -------------------------------------------------------------------------------------
53396
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53397
+  (0.1ms) SAVEPOINT active_record_1
53398
+ 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"]]
53399
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53400
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53401
+ Processing by ClarkKent::ReportFiltersController#create as HTML
53402
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
53403
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53404
+  (0.1ms) SAVEPOINT active_record_1
53405
+ SQL (0.3ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53406
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53407
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53408
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53409
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (3.2ms)
53410
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (11.0ms)
53411
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (15.0ms)
53412
+ Completed 200 OK in 41ms (Views: 18.4ms | ActiveRecord: 1.0ms)
53413
+ 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]]
53414
+  (0.5ms) rollback transaction
53415
+  (0.1ms) begin transaction
53416
+ ----------------------------------------------------------------------------------
53417
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
53418
+ ----------------------------------------------------------------------------------
53419
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53420
+  (0.0ms) SAVEPOINT active_record_1
53421
+ 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"]]
53422
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53423
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53424
+ Processing by ClarkKent::ReportFiltersController#create as HTML
53425
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
53426
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53427
+  (0.1ms) SAVEPOINT active_record_1
53428
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53429
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53430
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53431
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.5ms)
53432
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (5.4ms)
53433
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (6.2ms)
53434
+ Completed 200 OK in 18ms (Views: 6.5ms | ActiveRecord: 0.5ms)
53435
+ 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]]
53436
+  (0.4ms) rollback transaction
53437
+  (0.1ms) begin transaction
53438
+ ------------------------------------------------------------------------------------------
53439
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
53440
+ ------------------------------------------------------------------------------------------
53441
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53442
+  (0.1ms) SAVEPOINT active_record_1
53443
+ 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"]]
53444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53445
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53446
+  (0.0ms) SAVEPOINT active_record_1
53447
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53448
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53449
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
53450
+ Parameters: {"id"=>"1"}
53451
+ 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]]
53452
+ ClarkKent::ReportEmail Load (0.2ms) SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53453
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53454
+ User Load (0.1ms) SELECT "users".* FROM "users"
53455
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (3.2ms)
53456
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (15.3ms)
53457
+ Completed 200 OK in 24ms (Views: 19.9ms | ActiveRecord: 0.5ms)
53458
+  (0.6ms) rollback transaction
53459
+  (0.1ms) begin transaction
53460
+ ---------------------------------------------------------------------------------------
53461
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
53462
+ ---------------------------------------------------------------------------------------
53463
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53464
+  (0.1ms) SAVEPOINT active_record_1
53465
+ 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"]]
53466
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53467
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53468
+  (0.0ms) SAVEPOINT active_record_1
53469
+ SQL (0.4ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53470
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53471
+ Processing by ClarkKent::ReportFiltersController#show as HTML
53472
+ Parameters: {"id"=>"1"}
53473
+ 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]]
53474
+ 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]]
53475
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53476
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
53477
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.0ms)
53478
+ Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.2ms)
53479
+  (0.5ms) rollback transaction
53480
+  (0.1ms) begin transaction
53481
+ ---------------------------------------------------------------------------------------
53482
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
53483
+ ---------------------------------------------------------------------------------------
53484
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53485
+  (0.0ms) SAVEPOINT active_record_1
53486
+ SQL (0.6ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
53487
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53488
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53489
+  (0.0ms) SAVEPOINT active_record_1
53490
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53491
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53492
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
53493
+ Parameters: {"id"=>"1"}
53494
+ 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]]
53495
+ 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]]
53496
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53497
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (6.3ms)
53498
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (17.7ms)
53499
+ Completed 200 OK in 21ms (Views: 18.2ms | ActiveRecord: 0.2ms)
53500
+  (0.5ms) rollback transaction
53501
+  (0.1ms) begin transaction
53502
+ -----------------------------------------------------------------------------------------
53503
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
53504
+ -----------------------------------------------------------------------------------------
53505
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53506
+  (0.0ms) SAVEPOINT active_record_1
53507
+ 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"]]
53508
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53509
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53510
+  (0.0ms) SAVEPOINT active_record_1
53511
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53512
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53513
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
53514
+ Parameters: {"id"=>"1"}
53515
+ 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]]
53516
+ 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]]
53517
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53518
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.4ms)
53519
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (10.2ms)
53520
+ Completed 200 OK in 14ms (Views: 10.9ms | ActiveRecord: 0.2ms)
53521
+  (0.5ms) rollback transaction
53522
+  (0.1ms) begin transaction
53523
+ -----------------------------------------------------------------------------
53524
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
53525
+ -----------------------------------------------------------------------------
53526
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53527
+  (0.0ms) SAVEPOINT active_record_1
53528
+ 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"]]
53529
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53530
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53531
+ Processing by ClarkKent::ReportFiltersController#create as HTML
53532
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
53533
+ ClarkKent::Report Load (0.4ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53534
+  (0.1ms) SAVEPOINT active_record_1
53535
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53536
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53537
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53538
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.4ms)
53539
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (11.9ms)
53540
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (12.1ms)
53541
+ Completed 200 OK in 19ms (Views: 12.4ms | ActiveRecord: 0.7ms)
53542
+ 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]]
53543
+  (0.4ms) rollback transaction
53544
+  (0.1ms) begin transaction
53545
+ -----------------------------------------------------------------------------------------
53546
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
53547
+ -----------------------------------------------------------------------------------------
53548
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53549
+  (0.0ms) SAVEPOINT active_record_1
53550
+ 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"]]
53551
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53552
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53553
+  (0.1ms) SAVEPOINT active_record_1
53554
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53555
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53556
+ Processing by ClarkKent::ReportFiltersController#show as HTML
53557
+ Parameters: {"id"=>"1"}
53558
+ 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]]
53559
+ 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]]
53560
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53561
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.0ms)
53562
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.9ms)
53563
+ Completed 200 OK in 7ms (Views: 2.3ms | ActiveRecord: 0.2ms)
53564
+  (0.5ms) rollback transaction
53565
+  (0.1ms) begin transaction
53566
+ ------------------------------------------------------------------------------------------
53567
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
53568
+ ------------------------------------------------------------------------------------------
53569
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53570
+  (0.0ms) SAVEPOINT active_record_1
53571
+ 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"]]
53572
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53573
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53574
+  (0.0ms) SAVEPOINT active_record_1
53575
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53576
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53577
+ Processing by ClarkKent::ReportFiltersController#show as HTML
53578
+ Parameters: {"id"=>"1"}
53579
+ 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]]
53580
+ 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]]
53581
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53582
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53583
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.4ms)
53584
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.2ms)
53585
+ Completed 200 OK in 6ms (Views: 2.4ms | ActiveRecord: 0.2ms)
53586
+  (0.5ms) rollback transaction
53587
+  (0.1ms) begin transaction
53588
+ ------------------------------------------------------------------------------------------------
53589
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
53590
+ ------------------------------------------------------------------------------------------------
53591
+  (0.0ms) SAVEPOINT active_record_1
53592
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
53593
+  (0.0ms) rollback transaction
53594
+  (0.0ms) begin transaction
53595
+ ---------------------------------------------------
53596
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
53597
+ ---------------------------------------------------
53598
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
53599
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53600
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
53601
+  (0.0ms) SAVEPOINT active_record_1
53602
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
53603
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53604
+  (0.0ms) SAVEPOINT active_record_1
53605
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-02-22 23:34:08 UTC], ["updated_at", 2017-02-22 23:34:08 UTC]]
53606
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53607
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53608
+ 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"]]
53609
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53610
+ 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]]
53611
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53612
+ 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]]
53613
+ 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"]]
53614
+ 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"]]
53615
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53616
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53617
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53618
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53619
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
53620
+  (0.5ms) rollback transaction
53621
+  (0.1ms) begin transaction
53622
+ -----------------------------------------------------------------------------------------
53623
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
53624
+ -----------------------------------------------------------------------------------------
53625
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
53626
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53627
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
53628
+  (0.0ms) SAVEPOINT active_record_1
53629
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
53630
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53631
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53632
+ 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"]]
53633
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53634
+ 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]]
53635
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53636
+ 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]]
53637
+ 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"]]
53638
+ 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"]]
53639
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53640
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53641
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53642
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53643
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
53644
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (0.5ms)
53645
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 160.3ms
53646
+ Sent mail to taproot@gmail.com (8.7ms)
53647
+ Date: Wed, 22 Feb 2017 16:34:09 -0700
53648
+ From: reservations@invitedhome.com
53649
+ To: taproot@gmail.com
53650
+ Message-ID: <58ae1ff157df2_179793fc537c3fa1467345@Erics-MacBook-Pro.local.mail>
53651
+ Subject: Your report has a problem
53652
+ Mime-Version: 1.0
53653
+ Content-Type: text/html;
53654
+ charset=UTF-8
53655
+ Content-Transfer-Encoding: 7bit
53656
+
53657
+ Your report could not be created due to the following problem:
53658
+ <strong>At least one date range is required.</strong>
53659
+  (0.5ms) rollback transaction
53660
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
53661
+  (1.8ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
53662
+  (0.1ms) select sqlite_version(*)
53663
+  (1.0ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
53664
+  (0.9ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
53665
+  (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)
53666
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
53667
+  (0.1ms)  SELECT sql
53668
+ FROM sqlite_master
53669
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
53670
+ UNION ALL
53671
+ SELECT sql
53672
+ FROM sqlite_temp_master
53673
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
53674
+ 
53675
+  (1.0ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
53676
+  (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)
53677
+  (1.0ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
53678
+  (0.1ms)  SELECT sql
53679
+ FROM sqlite_master
53680
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
53681
+ UNION ALL
53682
+ SELECT sql
53683
+ FROM sqlite_temp_master
53684
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
53685
+ 
53686
+  (1.0ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
53687
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
53688
+  (0.8ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
53689
+  (1.2ms) CREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar, "created_at" datetime, "updated_at" datetime)
53690
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
53691
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
53692
+  (0.1ms) SELECT version FROM "schema_migrations"
53693
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
53694
+  (0.8ms) INSERT INTO schema_migrations (version) VALUES
53695
+ ('20131226170042'),
53696
+ ('20131226170112'),
53697
+ ('20140114010048'),
53698
+ ('20140129051754'),
53699
+ ('20150304233739');
53700
+
53701
+ 
53702
+  (1.1ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
53703
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
53704
+  (0.1ms) begin transaction
53705
+ SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-22 23:37:29 UTC], ["updated_at", 2017-02-22 23:37:29 UTC]]
53706
+  (0.8ms) commit transaction
53707
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
53708
+  (0.0ms) begin transaction
53709
+  (0.0ms) commit transaction
53710
+  (0.1ms) begin transaction
53711
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-22 23:37:29 UTC], ["updated_at", 2017-02-22 23:37:29 UTC]]
53712
+  (0.8ms) commit transaction
53713
+  (0.0ms) begin transaction
53714
+ 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]]
53715
+  (0.8ms) commit transaction
53716
+  (0.1ms) begin transaction
53717
+ 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]]
53718
+  (0.8ms) commit transaction
53719
+  (0.1ms) begin transaction
53720
+ 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]]
53721
+  (0.7ms) commit transaction
53722
+  (0.1ms) begin transaction
53723
+ 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]]
53724
+  (0.9ms) commit transaction
53725
+  (0.1ms) begin transaction
53726
+ SQL (0.4ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
53727
+  (0.7ms) commit transaction
53728
+  (0.1ms) begin transaction
53729
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
53730
+  (0.8ms) commit transaction
53731
+  (0.1ms) begin transaction
53732
+ SQL (0.4ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53733
+  (0.8ms) commit transaction
53734
+  (0.1ms) begin transaction
53735
+ -----------------------------------------------------------------------------------------
53736
+ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
53737
+ -----------------------------------------------------------------------------------------
53738
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
53739
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53740
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
53741
+  (0.0ms) SAVEPOINT active_record_1
53742
+ SQL (0.2ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
53743
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53744
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53745
+ 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"]]
53746
+ Department Load (0.2ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53747
+ 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]]
53748
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53749
+ 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]]
53750
+ 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"]]
53751
+ 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"]]
53752
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53753
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53754
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53755
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53756
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb
53757
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_mailer/report_error.html.erb (1.8ms)
53758
+ ClarkKent::ReportMailer#report_error: processed outbound mail in 181.2ms
53759
+ Sent mail to taproot@gmail.com (7.6ms)
53760
+ Date: Wed, 22 Feb 2017 16:37:30 -0700
53761
+ From: reservations@invitedhome.com
53762
+ To: taproot@gmail.com
53763
+ Message-ID: <58ae20ba97ed0_17a953ff82bc3fa249716@Erics-MacBook-Pro.local.mail>
53764
+ Subject: Your report has a problem
53765
+ Mime-Version: 1.0
53766
+ Content-Type: text/html;
53767
+ charset=UTF-8
53768
+ Content-Transfer-Encoding: 7bit
53769
+
53770
+ Your report could not be created due to the following problem:
53771
+ <strong>At least one date range is required.</strong>
53772
+  (0.4ms) rollback transaction
53773
+  (0.1ms) begin transaction
53774
+ ---------------------------------------------------
53775
+ ClarkKent::ReportEmailTest: test_sends_report_to_s3
53776
+ ---------------------------------------------------
53777
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "taproot@gmail.com"], ["LIMIT", 1]]
53778
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53779
+ SQL (0.3ms) UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = ? [["id", 1]]
53780
+  (0.0ms) SAVEPOINT active_record_1
53781
+ SQL (0.1ms) INSERT INTO "clark_kent_report_emails" ("report_id", "name") VALUES (?, ?) [["report_id", 1], ["name", "test_emailer"]]
53782
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53783
+  (0.0ms) SAVEPOINT active_record_1
53784
+ SQL (0.4ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53785
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53786
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53787
+ 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"]]
53788
+ Department Load (0.0ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53789
+ 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]]
53790
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53791
+ 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]]
53792
+ 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"]]
53793
+ 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"]]
53794
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53795
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53796
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53797
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
53798
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
53799
+  (0.8ms) rollback transaction
53800
+  (0.1ms) begin transaction
53801
+ --------------------------------------------------------------------------
53802
+ ClarkKent::ReportColumnTest: test_0001_rejects report sort if no order_sql
53803
+ --------------------------------------------------------------------------
53804
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53805
+  (0.1ms) SAVEPOINT active_record_1
53806
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53807
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53808
+  (0.1ms) rollback transaction
53809
+  (0.1ms) begin transaction
53810
+ ----------------------------------------------------------------------------------
53811
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_date_report_filter
53812
+ ----------------------------------------------------------------------------------
53813
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53814
+  (0.1ms) SAVEPOINT active_record_1
53815
+ SQL (0.5ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
53816
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53817
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53818
+ Processing by ClarkKent::ReportFiltersController#create as HTML
53819
+ Parameters: {"report_filter"=>{"duration"=>"week", "filter_name"=>"created_at", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report", "kind_of_day"=>"Monday", "offset"=>"last_week"}}
53820
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53821
+  (0.1ms) SAVEPOINT active_record_1
53822
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53823
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53824
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53825
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.4ms)
53826
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (11.1ms)
53827
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (14.7ms)
53828
+ Completed 200 OK in 22ms (Views: 18.4ms | ActiveRecord: 0.4ms)
53829
+ ClarkKent::ReportFilter Load (0.2ms) SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT ? [["LIMIT", 1]]
53830
+  (0.4ms) rollback transaction
53831
+  (0.1ms) begin transaction
53832
+ -----------------------------------------------------------------------------------------
53833
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_string_filter
53834
+ -----------------------------------------------------------------------------------------
53835
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53836
+  (0.0ms) SAVEPOINT active_record_1
53837
+ 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"]]
53838
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53839
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53840
+  (0.1ms) SAVEPOINT active_record_1
53841
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53842
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53843
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
53844
+ Parameters: {"id"=>"1"}
53845
+ 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]]
53846
+ 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]]
53847
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53848
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_edit.html.erb (0.4ms)
53849
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (45.2ms)
53850
+ Completed 200 OK in 51ms (Views: 48.1ms | ActiveRecord: 0.2ms)
53851
+  (0.6ms) rollback transaction
53852
+  (0.1ms) begin transaction
53853
+ -----------------------------------------------------------------------------------------
53854
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_string_filter
53855
+ -----------------------------------------------------------------------------------------
53856
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53857
+  (0.1ms) SAVEPOINT active_record_1
53858
+ 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"]]
53859
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53860
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53861
+  (0.0ms) SAVEPOINT active_record_1
53862
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53863
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53864
+ Processing by ClarkKent::ReportFiltersController#show as HTML
53865
+ Parameters: {"id"=>"1"}
53866
+ 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]]
53867
+ 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]]
53868
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53869
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.5ms)
53870
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (4.9ms)
53871
+ Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.1ms)
53872
+  (0.5ms) rollback transaction
53873
+  (0.1ms) begin transaction
53874
+ -----------------------------------------------------------------------------
53875
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_a_report_filter
53876
+ -----------------------------------------------------------------------------
53877
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53878
+  (0.0ms) SAVEPOINT active_record_1
53879
+ 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"]]
53880
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53881
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53882
+ Processing by ClarkKent::ReportFiltersController#create as HTML
53883
+ Parameters: {"report_filter"=>{"filter_name"=>"user_email", "filter_value"=>"taproot@gmail.com", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
53884
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53885
+  (0.0ms) SAVEPOINT active_record_1
53886
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_email"], ["filter_value", "taproot@gmail.com"], ["type", "ClarkKent::ReportStringFilter"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53887
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53888
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53889
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_string_filter_show.html.erb (0.1ms)
53890
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (9.4ms)
53891
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (9.6ms)
53892
+ Completed 200 OK in 13ms (Views: 9.8ms | ActiveRecord: 0.6ms)
53893
+ 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]]
53894
+  (0.4ms) rollback transaction
53895
+  (0.1ms) begin transaction
53896
+ -------------------------------------------------------------------------------------
53897
+ ClarkKent::ReportFiltersControllerTest: test_it_should_create_an_object_report_filter
53898
+ -------------------------------------------------------------------------------------
53899
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53900
+  (0.0ms) SAVEPOINT active_record_1
53901
+ 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"]]
53902
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53903
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53904
+ Processing by ClarkKent::ReportFiltersController#create as HTML
53905
+ Parameters: {"report_filter"=>{"filter_name"=>"user_id", "filter_value"=>"1", "filterable_id"=>"1", "filterable_type"=>"ClarkKent::Report"}}
53906
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53907
+  (0.1ms) SAVEPOINT active_record_1
53908
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53909
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53910
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53911
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53912
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (1.1ms)
53913
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (6.2ms)
53914
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show_wrapper.html.erb (6.4ms)
53915
+ Completed 200 OK in 20ms (Views: 6.6ms | ActiveRecord: 0.5ms)
53916
+ 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]]
53917
+  (0.4ms) rollback transaction
53918
+  (0.1ms) begin transaction
53919
+ ---------------------------------------------------------------------------------------
53920
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_a_date_filter
53921
+ ---------------------------------------------------------------------------------------
53922
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53923
+  (0.0ms) SAVEPOINT active_record_1
53924
+ 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"]]
53925
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53926
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53927
+  (0.0ms) SAVEPOINT active_record_1
53928
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53929
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53930
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
53931
+ Parameters: {"id"=>"1"}
53932
+ 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]]
53933
+ 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]]
53934
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53935
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_edit.html.erb (7.1ms)
53936
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (14.8ms)
53937
+ Completed 200 OK in 17ms (Views: 15.1ms | ActiveRecord: 0.1ms)
53938
+  (0.6ms) rollback transaction
53939
+  (0.1ms) begin transaction
53940
+ ---------------------------------------------------------------------------------------
53941
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_a_date_filter
53942
+ ---------------------------------------------------------------------------------------
53943
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53944
+  (0.0ms) SAVEPOINT active_record_1
53945
+ 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"]]
53946
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53947
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53948
+  (0.0ms) SAVEPOINT active_record_1
53949
+ SQL (0.2ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "type", "duration", "kind_of_day", "offset", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "created_at"], ["type", "ClarkKent::ReportDateFilter"], ["duration", "week"], ["kind_of_day", "Monday"], ["offset", "last_week"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53950
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53951
+ Processing by ClarkKent::ReportFiltersController#show as HTML
53952
+ Parameters: {"id"=>"1"}
53953
+ 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]]
53954
+ 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]]
53955
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53956
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_date_filter_show.html.erb (0.1ms)
53957
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (1.9ms)
53958
+ Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.2ms)
53959
+  (0.4ms) rollback transaction
53960
+  (0.1ms) begin transaction
53961
+ ------------------------------------------------------------------------------------------
53962
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_edit_form_for_an_object_filter
53963
+ ------------------------------------------------------------------------------------------
53964
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53965
+  (0.0ms) SAVEPOINT active_record_1
53966
+ 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"]]
53967
+  (0.1ms) RELEASE SAVEPOINT active_record_1
53968
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53969
+  (0.1ms) SAVEPOINT active_record_1
53970
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53971
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53972
+ Processing by ClarkKent::ReportFiltersController#edit as HTML
53973
+ Parameters: {"id"=>"1"}
53974
+ 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]]
53975
+ 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]]
53976
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53977
+ User Load (0.2ms) SELECT "users".* FROM "users"
53978
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_edit.html.erb (2.9ms)
53979
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_form.html.erb (10.9ms)
53980
+ Completed 200 OK in 14ms (Views: 11.1ms | ActiveRecord: 0.3ms)
53981
+  (0.5ms) rollback transaction
53982
+  (0.1ms) begin transaction
53983
+ ------------------------------------------------------------------------------------------
53984
+ ClarkKent::ReportFiltersControllerTest: test_should_get_the_show_view_for_an_object_filter
53985
+ ------------------------------------------------------------------------------------------
53986
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
53987
+  (0.0ms) SAVEPOINT active_record_1
53988
+ 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"]]
53989
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53990
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
53991
+  (0.0ms) SAVEPOINT active_record_1
53992
+ SQL (0.1ms) INSERT INTO "clark_kent_report_filters" ("filterable_id", "filterable_type", "filter_name", "filter_value", "type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["filter_name", "user_id"], ["filter_value", "1"], ["type", "ClarkKent::ReportObjectFilter"], ["created_at", 2017-02-22 23:37:30 UTC], ["updated_at", 2017-02-22 23:37:30 UTC]]
53993
+  (0.0ms) RELEASE SAVEPOINT active_record_1
53994
+ Processing by ClarkKent::ReportFiltersController#show as HTML
53995
+ Parameters: {"id"=>"1"}
53996
+ 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]]
53997
+ 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]]
53998
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
53999
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54000
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_object_filter_show.html.erb (0.4ms)
54001
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_show.html.erb (2.1ms)
54002
+ Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.2ms)
54003
+  (0.5ms) rollback transaction
54004
+  (0.1ms) begin transaction
54005
+ -------------------------
54006
+ ClarkKentTest: test_truth
54007
+ -------------------------
54008
+  (0.0ms) rollback transaction
54009
+  (0.0ms) begin transaction
54010
+ ------------------------------------------------------------------------------------------------
54011
+ ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
54012
+ ------------------------------------------------------------------------------------------------
54013
+  (0.0ms) SAVEPOINT active_record_1
54014
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
54015
+  (0.0ms) rollback transaction
54016
+  (0.1ms) begin transaction
54017
+ -------------------------------------------------------------------------
54018
+ ClarkKent::ReportsControllerTest: test_0007_should show report run errors
54019
+ -------------------------------------------------------------------------
54020
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54021
+  (0.1ms) SAVEPOINT active_record_1
54022
+ 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"]]
54023
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54024
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54025
+ Processing by ClarkKent::ReportsController#show as HTML
54026
+ Parameters: {"current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
54027
+ 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]]
54028
+ 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
54029
+ 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"]]
54030
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54031
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54032
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
54033
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.0ms)
54034
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54035
+ User Load (0.0ms) SELECT "users".* FROM "users"
54036
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.0ms)
54037
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
54038
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
54039
+  (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]]
54040
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.9ms)
54041
+ 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]]
54042
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
54043
+ (SELECT u.name
54044
+ FROM users u
54045
+ WHERE u.id = orders.user_id)
54046
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
54047
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54048
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54049
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54050
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54051
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.0ms)
54052
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (42.1ms)
54053
+ Completed 200 OK in 258ms (Views: 242.8ms | ActiveRecord: 1.9ms)
54054
+  (0.4ms) rollback transaction
54055
+  (0.1ms) begin transaction
54056
+ -----------------------------------------------------------
54057
+ ClarkKent::ReportsControllerTest: test_0008_should get edit
54058
+ -----------------------------------------------------------
54059
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54060
+  (0.0ms) SAVEPOINT active_record_1
54061
+ 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"]]
54062
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54063
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54064
+ Processing by ClarkKent::ReportsController#edit as HTML
54065
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
54066
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54067
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
54068
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.5ms)
54069
+ 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"]]
54070
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (4.6ms)
54071
+ 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]]
54072
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (2.1ms)
54073
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (6.1ms)
54074
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
54075
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
54076
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
54077
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
54078
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.6ms)
54079
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.8ms)
54080
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (15.1ms)
54081
+ 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]]
54082
+ 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"]]
54083
+ User Load (0.4ms) 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]]
54084
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (40.8ms)
54085
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (44.8ms)
54086
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (52.2ms)
54087
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (90.8ms)
54088
+ Completed 200 OK in 98ms (Views: 93.3ms | ActiveRecord: 0.9ms)
54089
+  (0.4ms) rollback transaction
54090
+  (0.1ms) begin transaction
54091
+ --------------------------------------------------------------------------------
54092
+ ClarkKent::ReportsControllerTest: test_0004_should render errors during creation
54093
+ --------------------------------------------------------------------------------
54094
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54095
+  (0.0ms) SAVEPOINT active_record_1
54096
+ SQL (0.6ms) INSERT INTO "clark_kent_report_emails" ("report_id", "when_to_send", "name") VALUES (?, ?, ?) [["report_id", 1], ["when_to_send", "Monday"], ["name", "Owner Arrival"]]
54097
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54098
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54099
+ Processing by ClarkKent::ReportsController#create as HTML
54100
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
54101
+  (0.1ms) SAVEPOINT active_record_1
54102
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
54103
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
54104
+ User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
54105
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54106
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (12.5ms)
54107
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (16.5ms)
54108
+ Completed 409 Conflict in 24ms (Views: 21.4ms | ActiveRecord: 0.8ms)
54109
+ ClarkKent::Report Load (0.4ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
54110
+  (0.5ms) rollback transaction
54111
+  (0.1ms) begin transaction
54112
+ ----------------------------------------------------------
54113
+ ClarkKent::ReportsControllerTest: test_0002_should get new
54114
+ ----------------------------------------------------------
54115
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54116
+  (0.0ms) SAVEPOINT active_record_1
54117
+ 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"]]
54118
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54119
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54120
+ Processing by ClarkKent::ReportsController#new as HTML
54121
+ Parameters: {"current_user_id"=>"1"}
54122
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application
54123
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
54124
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54125
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (7.2ms)
54126
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/new.html.erb within layouts/application (8.1ms)
54127
+ Completed 200 OK in 11ms (Views: 10.5ms | ActiveRecord: 0.1ms)
54128
+  (0.6ms) rollback transaction
54129
+  (0.2ms) begin transaction
54130
+ ----------------------------------------------------------------------
54131
+ ClarkKent::ReportsControllerTest: test_0006_should show report results
54132
+ ----------------------------------------------------------------------
54133
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54134
+  (0.0ms) SAVEPOINT active_record_1
54135
+ 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"]]
54136
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54137
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54138
+ Processing by ClarkKent::ReportsController#show as HTML
54139
+ Parameters: {"created_at_from"=>"2017-02-21", "created_at_until"=>"2017-02-22", "current_user_id"=>"1", "run_report"=>"true", "id"=>"1"}
54140
+ 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]]
54141
+ 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
54142
+ 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"]]
54143
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54144
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54145
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
54146
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
54147
+ User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54148
+ User Load (0.0ms) SELECT "users".* FROM "users"
54149
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.3ms)
54150
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
54151
+  (0.1ms) SELECT COUNT(*) FROM "orders" WHERE (orders.user_id > 0)
54152
+  (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]]
54153
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (1.4ms)
54154
+ 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]]
54155
+ Order Load (0.1ms) SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
54156
+ (SELECT u.name
54157
+ FROM users u
54158
+ WHERE u.id = orders.user_id)
54159
+ as user_name FROM "orders" WHERE (orders.user_id > 0) LIMIT ? OFFSET ? [["LIMIT", 10], ["OFFSET", 0]]
54160
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54161
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54162
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54163
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54164
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (0.7ms)
54165
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (12.6ms)
54166
+ Completed 200 OK in 25ms (Views: 14.4ms | ActiveRecord: 1.5ms)
54167
+  (0.4ms) rollback transaction
54168
+  (0.1ms) begin transaction
54169
+ ----------------------------------------------------------------
54170
+ ClarkKent::ReportsControllerTest: test_0003_should create report
54171
+ ----------------------------------------------------------------
54172
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54173
+  (0.1ms) SAVEPOINT active_record_1
54174
+ 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"]]
54175
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54176
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54177
+ Processing by ClarkKent::ReportsController#create as HTML
54178
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}}
54179
+  (0.1ms) SAVEPOINT active_record_1
54180
+ SQL (0.2ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "sharing_scope_type", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_type", ""], ["created_at", 2017-02-22 23:37:31 UTC], ["updated_at", 2017-02-22 23:37:31 UTC]]
54181
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54182
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application
54183
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.6ms)
54184
+ 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"]]
54185
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.6ms)
54186
+ 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]]
54187
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.4ms)
54188
+ 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]]
54189
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.7ms)
54190
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (10.3ms)
54191
+ Completed 200 OK in 17ms (Views: 13.3ms | ActiveRecord: 0.6ms)
54192
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = ? LIMIT ? [["name", "delete me"], ["LIMIT", 1]]
54193
+  (0.1ms) SAVEPOINT active_record_1
54194
+ 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"]]
54195
+ 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]]
54196
+ 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]]
54197
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
54198
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54199
+  (0.5ms) rollback transaction
54200
+  (0.1ms) begin transaction
54201
+ ------------------------------------------------------------
54202
+ ClarkKent::ReportsControllerTest: test_0001_should get index
54203
+ ------------------------------------------------------------
54204
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54205
+  (0.1ms) SAVEPOINT active_record_1
54206
+ 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"]]
54207
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54208
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54209
+ Processing by ClarkKent::ReportsController#index as HTML
54210
+ Parameters: {"current_user_id"=>"1"}
54211
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application
54212
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
54213
+ 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]]
54214
+ Department Load (0.1ms) SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54215
+ 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]]
54216
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
54217
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
54218
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/index.html.erb within layouts/application (11.2ms)
54219
+ Completed 200 OK in 17ms (Views: 12.9ms | ActiveRecord: 0.5ms)
54220
+  (0.5ms) rollback transaction
54221
+  (0.0ms) begin transaction
54222
+ --------------------------------------------------------------
54223
+ ClarkKent::ReportsControllerTest: test_0005_should show report
54224
+ --------------------------------------------------------------
54225
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54226
+  (0.0ms) SAVEPOINT active_record_1
54227
+ 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"]]
54228
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54229
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54230
+ Processing by ClarkKent::ReportsController#show as HTML
54231
+ Parameters: {"current_user_id"=>"1", "id"=>"1"}
54232
+ 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]]
54233
+ 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
54234
+ Rendering /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application
54235
+  (0.1ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
54236
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
54237
+  (0.0ms) SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
54238
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
54239
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54240
+ User Load (0.0ms) SELECT "users".* FROM "users"
54241
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.9ms)
54242
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
54243
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
54244
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/show.html.erb within layouts/application (5.9ms)
54245
+ Completed 200 OK in 11ms (Views: 7.9ms | ActiveRecord: 0.4ms)
54246
+  (0.5ms) rollback transaction
54247
+  (0.1ms) begin transaction
54248
+ ----------------------------------------------------------------
54249
+ ClarkKent::ReportsControllerTest: test_0009_should update report
54250
+ ----------------------------------------------------------------
54251
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54252
+  (0.0ms) SAVEPOINT active_record_1
54253
+ 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"]]
54254
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54255
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54256
+ Processing by ClarkKent::ReportsController#update as HTML
54257
+ Parameters: {"current_user_id"=>"1", "report"=>{"name"=>"", "resource_type"=>"Order", "sharing_scope_id"=>"", "sharing_scope_type"=>""}, "id"=>"1"}
54258
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54259
+  (0.0ms) SAVEPOINT active_record_1
54260
+ SQL (0.2ms) UPDATE "clark_kent_reports" SET "name" = ?, "sharing_scope_type" = ?, "updated_at" = ? WHERE "clark_kent_reports"."id" = ? [["name", ""], ["sharing_scope_type", ""], ["updated_at", 2017-02-22 23:37:31 UTC], ["id", 1]]
54261
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54262
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.2ms)
54263
+ Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 0.3ms)
54264
+  (0.4ms) rollback transaction
54265
+  (0.1ms) begin transaction
54266
+ -----------------------------------------------------------------
54267
+ ClarkKent::ReportsControllerTest: test_0010_should destroy report
54268
+ -----------------------------------------------------------------
54269
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54270
+  (0.1ms) SAVEPOINT active_record_1
54271
+ 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"]]
54272
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54273
+  (0.0ms) SAVEPOINT active_record_1
54274
+ SQL (0.1ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "delete me"], ["resource_type", "Order"], ["created_at", 2017-02-22 23:37:31 UTC], ["updated_at", 2017-02-22 23:37:31 UTC]]
54275
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54276
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
54277
+ User Load (0.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]]
54278
+ Processing by ClarkKent::ReportsController#destroy as HTML
54279
+ Parameters: {"current_user_id"=>"1", "id"=>"2"}
54280
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
54281
+  (0.1ms) SAVEPOINT active_record_1
54282
+ 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"]]
54283
+ 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]]
54284
+ 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]]
54285
+ SQL (0.1ms) DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
54286
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54287
+ Redirected to http://test.host/reports/reports
54288
+ Completed 302 Found in 7ms (ActiveRecord: 0.6ms)
54289
+  (0.1ms) SELECT COUNT(*) FROM "clark_kent_reports"
54290
+  (0.4ms) rollback transaction
54291
+  (0.1ms) begin transaction
54292
+ ------------------------------------------------------------------------
54293
+ ClarkKent::ReportableTest: test_0001_it adds required filters if present
54294
+ ------------------------------------------------------------------------
54295
+  (0.0ms) SAVEPOINT active_record_1
54296
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "Order"], ["created_at", 2017-02-22 23:37:31 UTC], ["updated_at", 2017-02-22 23:37:31 UTC]]
54297
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54298
+ 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]]
54299
+ 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"]]
54300
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54301
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54302
+  (0.4ms) rollback transaction
54303
+  (0.1ms) begin transaction
54304
+ --------------------------------------------------------------------------
54305
+ ClarkKent::ReportableTest: test_0002_it works without any required filters
54306
+ --------------------------------------------------------------------------
54307
+  (0.0ms) SAVEPOINT active_record_1
54308
+ SQL (0.5ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-22 23:37:31 UTC], ["updated_at", 2017-02-22 23:37:31 UTC]]
54309
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54310
+ 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]]
54311
+ 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"]]
54312
+ ClarkKent::ReportColumn Load (0.1ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
54313
+  (0.5ms) rollback transaction
54314
+  (0.1ms) begin transaction
54315
+ --------------------------------------------------------------------------
54316
+ ClarkKent::ReportableTest: test_0003_doesn't blow up if order_sql is blank
54317
+ --------------------------------------------------------------------------
54318
+  (0.1ms) SAVEPOINT active_record_1
54319
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("name", "resource_type", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test one"], ["resource_type", "TestReportable"], ["created_at", 2017-02-22 23:37:31 UTC], ["updated_at", 2017-02-22 23:37:31 UTC]]
54320
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54321
+  (0.0ms) SAVEPOINT active_record_1
54322
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 2], ["LIMIT", 1]]
54323
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54324
+ 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]]
54325
+ 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"]]
54326
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 2], ["LIMIT", 1]]
54327
+  (0.4ms) rollback transaction
54328
+  (0.1ms) begin transaction
54329
+ -------------------------------------------------------------------------------
54330
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
54331
+ -------------------------------------------------------------------------------
54332
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54333
+ Processing by ClarkKent::ReportColumnsController#create as JS
54334
+ Parameters: {"report_column"=>{"name"=>"user_name", "report_id"=>"1"}}
54335
+ Unpermitted parameter: name
54336
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54337
+ Unpermitted parameter: name
54338
+  (0.1ms) SAVEPOINT active_record_1
54339
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
54340
+  (0.2ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54341
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54342
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54343
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54344
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54345
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54346
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (15.9ms)
54347
+ Completed 409 Conflict in 47ms (Views: 43.9ms | ActiveRecord: 0.9ms)
54348
+  (0.1ms) rollback transaction
54349
+  (0.1ms) begin transaction
54350
+ -----------------------------------------------------
54351
+ ClarkKent::ReportsHelperTest: test_it_displays_a_date
54352
+ -----------------------------------------------------
54353
+  (0.1ms) rollback transaction
54354
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
54355
+  (1.2ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
54356
+  (0.1ms) select sqlite_version(*)
54357
+  (0.9ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
54358
+  (1.1ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
54359
+  (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)
54360
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
54361
+  (0.1ms)  SELECT sql
54362
+ FROM sqlite_master
54363
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
54364
+ UNION ALL
54365
+ SELECT sql
54366
+ FROM sqlite_temp_master
54367
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
54368
+ 
54369
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
54370
+  (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)
54371
+  (1.0ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
54372
+  (0.1ms)  SELECT sql
54373
+ FROM sqlite_master
54374
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
54375
+ UNION ALL
54376
+ SELECT sql
54377
+ FROM sqlite_temp_master
54378
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
54379
+ 
54380
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
54381
+  (0.9ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
54382
+  (1.0ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
54383
+  (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)
54384
+  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
54385
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
54386
+  (0.1ms) SELECT version FROM "schema_migrations"
54387
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
54388
+  (0.8ms) INSERT INTO schema_migrations (version) VALUES
54389
+ ('20131226170042'),
54390
+ ('20131226170112'),
54391
+ ('20140114010048'),
54392
+ ('20140129051754'),
54393
+ ('20150304233739');
54394
+
54395
+ 
54396
+  (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)
54397
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
54398
+  (0.2ms) begin transaction
54399
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-22 23:38:54 UTC], ["updated_at", 2017-02-22 23:38:54 UTC]]
54400
+  (0.7ms) commit transaction
54401
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
54402
+  (0.0ms) begin transaction
54403
+  (0.0ms) commit transaction
54404
+  (0.1ms) begin transaction
54405
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-22 23:38:54 UTC], ["updated_at", 2017-02-22 23:38:54 UTC]]
54406
+  (0.8ms) commit transaction
54407
+  (0.0ms) begin transaction
54408
+ 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]]
54409
+  (0.9ms) commit transaction
54410
+  (0.1ms) begin transaction
54411
+ 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]]
54412
+  (0.7ms) commit transaction
54413
+  (0.0ms) begin transaction
54414
+ SQL (0.7ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
54415
+  (0.8ms) commit transaction
54416
+  (0.0ms) begin transaction
54417
+ 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]]
54418
+  (0.7ms) commit transaction
54419
+  (0.1ms) begin transaction
54420
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
54421
+  (0.7ms) commit transaction
54422
+  (0.1ms) begin transaction
54423
+ SQL (0.4ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
54424
+  (0.7ms) commit transaction
54425
+  (0.1ms) begin transaction
54426
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-22 23:38:54 UTC], ["updated_at", 2017-02-22 23:38:54 UTC]]
54427
+  (0.8ms) commit transaction
54428
+  (0.1ms) begin transaction
54429
+ -------------------------------------------------------------------------------
54430
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
54431
+ -------------------------------------------------------------------------------
54432
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54433
+ Processing by ClarkKent::ReportColumnsController#create as JS
54434
+ Parameters: {"report_column"=>{"name"=>"user_name", "report_id"=>"1"}}
54435
+ Unpermitted parameter: name
54436
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54437
+ Unpermitted parameter: name
54438
+  (0.1ms) SAVEPOINT active_record_1
54439
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
54440
+  (0.2ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54441
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54442
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54443
+  (0.4ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54444
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54445
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54446
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (56.4ms)
54447
+ Completed 409 Conflict in 99ms (Views: 88.4ms | ActiveRecord: 1.2ms)
54448
+  (0.2ms) rollback transaction
54449
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
54450
+  (1.8ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
54451
+  (0.1ms) select sqlite_version(*)
54452
+  (0.8ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
54453
+  (1.0ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
54454
+  (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)
54455
+  (0.9ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
54456
+  (0.1ms)  SELECT sql
54457
+ FROM sqlite_master
54458
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
54459
+ UNION ALL
54460
+ SELECT sql
54461
+ FROM sqlite_temp_master
54462
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
54463
+ 
54464
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
54465
+  (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)
54466
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
54467
+  (0.1ms)  SELECT sql
54468
+ FROM sqlite_master
54469
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
54470
+ UNION ALL
54471
+ SELECT sql
54472
+ FROM sqlite_temp_master
54473
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
54474
+ 
54475
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
54476
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
54477
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
54478
+  (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)
54479
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
54480
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
54481
+  (0.1ms) SELECT version FROM "schema_migrations"
54482
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
54483
+  (0.7ms) INSERT INTO schema_migrations (version) VALUES
54484
+ ('20131226170042'),
54485
+ ('20131226170112'),
54486
+ ('20140114010048'),
54487
+ ('20140129051754'),
54488
+ ('20150304233739');
54489
+
54490
+ 
54491
+  (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)
54492
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
54493
+  (0.1ms) begin transaction
54494
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-22 23:39:25 UTC], ["updated_at", 2017-02-22 23:39:25 UTC]]
54495
+  (0.6ms) commit transaction
54496
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
54497
+  (0.0ms) begin transaction
54498
+  (0.0ms) commit transaction
54499
+  (0.1ms) begin transaction
54500
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-22 23:39:25 UTC], ["updated_at", 2017-02-22 23:39:25 UTC]]
54501
+  (0.6ms) commit transaction
54502
+  (0.0ms) begin transaction
54503
+ SQL (0.7ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "user_name"], ["column_order", 1]]
54504
+  (0.6ms) commit transaction
54505
+  (0.0ms) begin transaction
54506
+ SQL (1.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
54507
+  (0.7ms) commit transaction
54508
+  (0.1ms) begin transaction
54509
+ 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]]
54510
+  (0.6ms) commit transaction
54511
+  (0.0ms) begin transaction
54512
+ 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]]
54513
+  (0.6ms) commit transaction
54514
+  (0.0ms) begin transaction
54515
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
54516
+  (0.6ms) commit transaction
54517
+  (0.1ms) begin transaction
54518
+ SQL (0.4ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
54519
+  (0.7ms) commit transaction
54520
+  (0.1ms) begin transaction
54521
+ SQL (0.4ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-22 23:39:25 UTC], ["updated_at", 2017-02-22 23:39:25 UTC]]
54522
+  (0.9ms) commit transaction
54523
+  (0.1ms) begin transaction
54524
+ -------------------------------------------------------------------------------
54525
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
54526
+ -------------------------------------------------------------------------------
54527
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54528
+ Processing by ClarkKent::ReportColumnsController#create as JS
54529
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1"}}
54530
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54531
+  (0.1ms) SAVEPOINT active_record_1
54532
+ SQL (0.5ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name") VALUES (?, ?) [["report_id", 1], ["column_name", "user_name"]]
54533
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54534
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (3.9ms)
54535
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (37.6ms)
54536
+ Completed 200 OK in 74ms (Views: 68.3ms | ActiveRecord: 0.8ms)
54537
+  (0.4ms) rollback transaction
54538
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
54539
+  (1.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)
54540
+  (0.1ms) select sqlite_version(*)
54541
+  (0.8ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
54542
+  (0.9ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
54543
+  (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)
54544
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
54545
+  (0.1ms)  SELECT sql
54546
+ FROM sqlite_master
54547
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
54548
+ UNION ALL
54549
+ SELECT sql
54550
+ FROM sqlite_temp_master
54551
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
54552
+ 
54553
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
54554
+  (0.8ms) CREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_type" varchar, "sharing_scope_type" varchar, "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime)
54555
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
54556
+  (0.1ms)  SELECT sql
54557
+ FROM sqlite_master
54558
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
54559
+ UNION ALL
54560
+ SELECT sql
54561
+ FROM sqlite_temp_master
54562
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
54563
+ 
54564
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
54565
+  (0.8ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
54566
+  (0.9ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
54567
+  (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)
54568
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
54569
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
54570
+  (0.1ms) SELECT version FROM "schema_migrations"
54571
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
54572
+  (0.9ms) INSERT INTO schema_migrations (version) VALUES
54573
+ ('20131226170042'),
54574
+ ('20131226170112'),
54575
+ ('20140114010048'),
54576
+ ('20140129051754'),
54577
+ ('20150304233739');
54578
+
54579
+ 
54580
+  (1.1ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
54581
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
54582
+  (0.2ms) begin transaction
54583
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-22 23:40:41 UTC], ["updated_at", 2017-02-22 23:40:41 UTC]]
54584
+  (0.6ms) commit transaction
54585
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
54586
+  (0.0ms) begin transaction
54587
+  (0.0ms) commit transaction
54588
+  (0.1ms) begin transaction
54589
+ SQL (0.4ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-22 23:40:41 UTC], ["updated_at", 2017-02-22 23:40:41 UTC]]
54590
+  (0.7ms) commit transaction
54591
+  (0.1ms) begin transaction
54592
+ 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]]
54593
+  (0.8ms) commit transaction
54594
+  (0.1ms) begin transaction
54595
+ 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]]
54596
+  (0.8ms) commit transaction
54597
+  (0.1ms) begin transaction
54598
+ 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]]
54599
+  (0.8ms) commit transaction
54600
+  (0.0ms) begin transaction
54601
+ 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]]
54602
+  (0.8ms) commit transaction
54603
+  (0.0ms) begin transaction
54604
+ SQL (0.3ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
54605
+  (0.7ms) commit transaction
54606
+  (0.1ms) begin transaction
54607
+ SQL (0.4ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
54608
+  (0.8ms) commit transaction
54609
+  (0.1ms) begin transaction
54610
+ SQL (0.3ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-22 23:40:41 UTC], ["updated_at", 2017-02-22 23:40:41 UTC]]
54611
+  (0.9ms) commit transaction
54612
+  (0.1ms) begin transaction
54613
+ -------------------------------------------------------------------------------
54614
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
54615
+ -------------------------------------------------------------------------------
54616
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54617
+ Processing by ClarkKent::ReportColumnsController#create as JS
54618
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1"}}
54619
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54620
+  (0.1ms) SAVEPOINT active_record_1
54621
+ SQL (0.3ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name") VALUES (?, ?) [["report_id", 1], ["column_name", "user_name"]]
54622
+  (0.0ms) RELEASE SAVEPOINT active_record_1
54623
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (3.7ms)
54624
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (34.2ms)
54625
+ Completed 200 OK in 71ms (Views: 66.8ms | ActiveRecord: 0.6ms)
54626
+  (0.5ms) rollback transaction
54627
+  (0.1ms) begin transaction
54628
+ ---------------------------------------------------------------------------------------------------
54629
+ ClarkKent::ReportColumnsControllerTest: test_0002_should reject a report column with no column_name
54630
+ ---------------------------------------------------------------------------------------------------
54631
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54632
+ Processing by ClarkKent::ReportColumnsController#create as JS
54633
+ Parameters: {"report_column"=>{"report_id"=>"1"}}
54634
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54635
+  (0.0ms) SAVEPOINT active_record_1
54636
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
54637
+  (0.2ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54638
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54639
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54640
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54641
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54642
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54643
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (55.1ms)
54644
+ Completed 409 Conflict in 95ms (Views: 87.1ms | ActiveRecord: 0.9ms)
54645
+  (0.1ms) rollback transaction
54646
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
54647
+  (1.7ms) CREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar, "column_order" integer, "report_sort" varchar, "summary_method" varchar)
54648
+  (0.1ms) select sqlite_version(*)
54649
+  (1.1ms) CREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")
54650
+  (1.4ms) CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar, "name" varchar)
54651
+  (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)
54652
+  (0.8ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
54653
+  (0.1ms)  SELECT sql
54654
+ FROM sqlite_master
54655
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
54656
+ UNION ALL
54657
+ SELECT sql
54658
+ FROM sqlite_temp_master
54659
+ WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
54660
+ 
54661
+  (1.1ms) CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
54662
+  (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)
54663
+  (0.8ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
54664
+  (0.1ms)  SELECT sql
54665
+ FROM sqlite_master
54666
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
54667
+ UNION ALL
54668
+ SELECT sql
54669
+ FROM sqlite_temp_master
54670
+ WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
54671
+ 
54672
+  (0.9ms) CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
54673
+  (1.1ms) CREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer)
54674
+  (1.0ms) CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
54675
+  (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)
54676
+  (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "age" integer, "department_id" integer)
54677
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
54678
+  (0.1ms) SELECT version FROM "schema_migrations"
54679
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
54680
+  (0.7ms) INSERT INTO schema_migrations (version) VALUES
54681
+ ('20131226170042'),
54682
+ ('20131226170112'),
54683
+ ('20140114010048'),
54684
+ ('20140129051754'),
54685
+ ('20150304233739');
54686
+
54687
+ 
54688
+  (1.1ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
54689
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
54690
+  (0.1ms) begin transaction
54691
+ SQL (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", 2017-02-22 23:43:59 UTC], ["updated_at", 2017-02-22 23:43:59 UTC]]
54692
+  (3.2ms) commit transaction
54693
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
54694
+  (0.1ms) begin transaction
54695
+  (0.1ms) commit transaction
54696
+  (0.1ms) begin transaction
54697
+ SQL (0.8ms) INSERT INTO "clark_kent_reports" ("resource_type", "created_at", "updated_at") VALUES (?, ?, ?) [["resource_type", "Order"], ["created_at", 2017-02-22 23:43:59 UTC], ["updated_at", 2017-02-22 23:43:59 UTC]]
54698
+  (1.3ms) commit transaction
54699
+  (0.1ms) begin transaction
54700
+ SQL (2.1ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "user_name"], ["column_order", 1]]
54701
+  (1.1ms) commit transaction
54702
+  (0.1ms) begin transaction
54703
+ SQL (0.5ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "id"], ["column_order", 2]]
54704
+  (4.4ms) commit transaction
54705
+  (0.1ms) begin transaction
54706
+ SQL (0.5ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "amount"], ["column_order", 3]]
54707
+  (0.8ms) commit transaction
54708
+  (0.1ms) begin transaction
54709
+ SQL (0.5ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name", "column_order") VALUES (?, ?, ?) [["report_id", 1], ["column_name", "description"], ["column_order", 4]]
54710
+  (0.8ms) commit transaction
54711
+  (0.1ms) begin transaction
54712
+ SQL (0.4ms) INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
54713
+  (3.5ms) commit transaction
54714
+  (0.1ms) begin transaction
54715
+ SQL (0.3ms) INSERT INTO "users" ("name", "email", "department_id") VALUES (?, ?, ?) [["name", "Michael Hedges"], ["email", "taproot@gmail.com"], ["department_id", 1]]
54716
+  (0.5ms) commit transaction
54717
+  (0.1ms) begin transaction
54718
+ SQL (0.4ms) INSERT INTO "orders" ("user_id", "amount", "description", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["user_id", 1], ["amount", 1], ["description", "Guitar strings"], ["created_at", 2017-02-22 23:43:59 UTC], ["updated_at", 2017-02-22 23:43:59 UTC]]
54719
+  (0.7ms) commit transaction
54720
+  (0.1ms) begin transaction
54721
+ --------------------------------------------------------------------------------------------------
54722
+ ClarkKent::ReportColumnsControllerTest: test_0003_should reject a report column with unusable sort
54723
+ --------------------------------------------------------------------------------------------------
54724
+ ClarkKent::Report Load (0.3ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54725
+ Processing by ClarkKent::ReportColumnsController#create as JS
54726
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1", "report_sort"=>"ascending"}}
54727
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54728
+  (0.1ms) SAVEPOINT active_record_1
54729
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54730
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
54731
+  (0.2ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54732
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54733
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54734
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54735
+ ClarkKent::ReportColumn Load (0.2ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54736
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (81.3ms)
54737
+ Completed 409 Conflict in 132ms (Views: 122.7ms | ActiveRecord: 1.0ms)
54738
+  (0.1ms) rollback transaction
54739
+  (0.0ms) begin transaction
54740
+ -------------------------------------------------------------------------------
54741
+ ClarkKent::ReportColumnsControllerTest: test_0001_should create a report column
54742
+ -------------------------------------------------------------------------------
54743
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54744
+ Processing by ClarkKent::ReportColumnsController#create as JS
54745
+ Parameters: {"report_column"=>{"column_name"=>"user_name", "report_id"=>"1"}}
54746
+ ClarkKent::Report Load (0.0ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54747
+  (0.1ms) SAVEPOINT active_record_1
54748
+ SQL (0.5ms) INSERT INTO "clark_kent_report_columns" ("report_id", "column_name") VALUES (?, ?) [["report_id", 1], ["column_name", "user_name"]]
54749
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54750
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.8ms)
54751
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (31.9ms)
54752
+ Completed 200 OK in 70ms (Views: 66.9ms | ActiveRecord: 0.7ms)
54753
+  (1.3ms) rollback transaction
54754
+  (0.1ms) begin transaction
54755
+ ---------------------------------------------------------------------------------------------------
54756
+ ClarkKent::ReportColumnsControllerTest: test_0002_should reject a report column with no column_name
54757
+ ---------------------------------------------------------------------------------------------------
54758
+ ClarkKent::Report Load (0.2ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT ? [["LIMIT", 1]]
54759
+ Processing by ClarkKent::ReportColumnsController#create as JS
54760
+ Parameters: {"report_column"=>{"report_id"=>"1"}}
54761
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54762
+  (0.0ms) SAVEPOINT active_record_1
54763
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
54764
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54765
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54766
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54767
+  (0.1ms) SELECT "clark_kent_report_columns"."column_name" FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
54768
+ ClarkKent::Report Load (0.1ms) SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
54769
+ ClarkKent::ReportColumn Load (0.4ms) SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT ? [["report_id", 1], ["LIMIT", 1]]
54770
+ Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_form.html.erb (11.9ms)
54771
+ Completed 409 Conflict in 14ms (Views: 11.3ms | ActiveRecord: 1.0ms)
54772
+  (0.1ms) rollback transaction