clark_kent 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/clark_kent/report_filters_controller.rb +1 -1
- data/app/helpers/clark_kent/application_helper.rb +10 -2
- data/app/models/clark_kent/report.rb +18 -16
- data/app/models/clark_kent/report_column.rb +8 -1
- data/app/models/clark_kent/report_config.rb +5 -1
- data/app/models/clark_kent/reportable.rb +16 -11
- data/app/models/clark_kent/sharing_scope_kind.rb +0 -4
- data/app/views/clark_kent/report_filters/_object_filter_edit.html.erb +1 -1
- data/app/views/clark_kent/reports/show.html.erb +2 -2
- data/lib/clark_kent/version.rb +1 -1
- data/test/controllers/clark_kent/reports_controller_test.rb +1 -0
- data/test/dummy/app/controllers/orders_controller.rb +5 -0
- data/test/dummy/app/models/reporting/order.rb +6 -6
- data/test/dummy/app/views/orders/show.html.erb +14 -0
- data/test/dummy/config/routes.rb +2 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +2952 -0
- data/test/dummy/log/test.log +3051 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0ec37c0a58c1be93659732a3efc73581 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0fd54fd98cd2fa0085b77e6743046927 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8aa37926d964a9eb59cf9b940e4fe2f4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0ec37c0a58c1be93659732a3efc73581 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0fd54fd98cd2fa0085b77e6743046927 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8aa37926d964a9eb59cf9b940e4fe2f4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- metadata +10 -6
data/test/dummy/log/test.log
CHANGED
@@ -16803,3 +16803,3054 @@ ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_no
|
|
16803
16803
|
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
16804
16804
|
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
16805
16805
|
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
16806
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
16807
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
16808
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
16809
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
16810
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
16811
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
16812
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
16813
|
+
FROM sqlite_master
|
16814
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
16815
|
+
UNION ALL
|
16816
|
+
SELECT sql
|
16817
|
+
FROM sqlite_temp_master
|
16818
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
16819
|
+
[0m
|
16820
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
16821
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
16822
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
16823
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
16824
|
+
FROM sqlite_master
|
16825
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16826
|
+
UNION ALL
|
16827
|
+
SELECT sql
|
16828
|
+
FROM sqlite_temp_master
|
16829
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16830
|
+
[0m
|
16831
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
16832
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
16833
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
16834
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
16835
|
+
[1m[35m (1.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
16836
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
16837
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
16838
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
16839
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
16840
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
16841
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
16842
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
16843
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
16844
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
16845
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16846
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 17:51:47.198715"], ["resource_type", "Order"], ["updated_at", "2015-04-27 17:51:47.198715"]]
|
16847
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16848
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16849
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
16850
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16851
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16852
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
16853
|
+
[1m[35m (1.0ms)[0m commit transaction
|
16854
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16855
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
16856
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16857
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16858
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
16859
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16860
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16861
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
16862
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16863
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16864
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
16865
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16866
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16867
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 17:51:47.250014"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 17:51:47.250014"], ["user_id", 1]]
|
16868
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16869
|
+
---------------------------------------------------
|
16870
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
16871
|
+
---------------------------------------------------
|
16872
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
16873
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
16874
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
16875
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16876
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
16877
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16878
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16879
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-04-27 17:51:47.345650"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 17:51:47.345650"]]
|
16880
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16881
|
+
-----------------------------------------------------------------------------------------
|
16882
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
16883
|
+
-----------------------------------------------------------------------------------------
|
16884
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
16885
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16886
|
+
[1m[36mSQL (1.9ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
16887
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16888
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
16889
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16890
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
16891
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16892
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
16893
|
+
[1m[35mDepartment Load (0.3ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16894
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 2]]
|
16895
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16896
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
16897
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
16898
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
16899
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
16900
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
16901
|
+
-------------------------
|
16902
|
+
ClarkKentTest: test_truth
|
16903
|
+
-------------------------
|
16904
|
+
------------------------------------------------------------------------------------------------
|
16905
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
16906
|
+
------------------------------------------------------------------------------------------------
|
16907
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16908
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
16909
|
+
-----------------------------------------------------------
|
16910
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
16911
|
+
-----------------------------------------------------------
|
16912
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16913
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16914
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
16915
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
16916
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
16917
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16918
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 17:51:47.428334"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-04-27 17:51:47.428334"]]
|
16919
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16920
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16921
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.5ms)
|
16922
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
16923
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.2ms)
|
16924
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
16925
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.7ms)
|
16926
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
16927
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.7ms)
|
16928
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (19.0ms)
|
16929
|
+
Completed 200 OK in 78ms (Views: 73.1ms | ActiveRecord: 2.0ms)
|
16930
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
16931
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1[0m
|
16932
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16933
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
16934
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
16935
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
16936
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
16937
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
16938
|
+
------------------------------------------------------------
|
16939
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
16940
|
+
------------------------------------------------------------
|
16941
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16942
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16943
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16944
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-04-27 17:51:47.516023"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 17:51:47.516023"]]
|
16945
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16946
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
16947
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
16948
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
16949
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
16950
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16951
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
16952
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
16953
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 3]]
|
16954
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
16955
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16956
|
+
Redirected to http://test.host/reports/reports
|
16957
|
+
Completed 302 Found in 7ms (ActiveRecord: 1.5ms)
|
16958
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
16959
|
+
------------------------------------------------------
|
16960
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
16961
|
+
------------------------------------------------------
|
16962
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16963
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16964
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
16965
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
16966
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16967
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
16968
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.4ms)
|
16969
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
16970
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.0ms)
|
16971
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
16972
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.8ms)
|
16973
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.3ms)
|
16974
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
16975
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
|
16976
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
16977
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
16978
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
16979
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
16980
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (7.0ms)
|
16981
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
16982
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
16983
|
+
[1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
|
16984
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (20.1ms)
|
16985
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (22.1ms)
|
16986
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
16987
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 2]]
|
16988
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (6.3ms)
|
16989
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (6.9ms)
|
16990
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (32.3ms)
|
16991
|
+
Completed 200 OK in 47ms (Views: 44.5ms | ActiveRecord: 1.8ms)
|
16992
|
+
-------------------------------------------------------
|
16993
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
16994
|
+
-------------------------------------------------------
|
16995
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
16996
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16997
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
16998
|
+
Parameters: {"current_user_id"=>"1"}
|
16999
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
17000
|
+
[1m[35mClarkKent::Report Exists (0.3ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
17001
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17002
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
17003
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ?[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
17004
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
17005
|
+
Completed 200 OK in 14ms (Views: 12.4ms | ActiveRecord: 1.0ms)
|
17006
|
+
-----------------------------------------------------
|
17007
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
17008
|
+
-----------------------------------------------------
|
17009
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17010
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17011
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
17012
|
+
Parameters: {"current_user_id"=>"1"}
|
17013
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
17014
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17015
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (44.1ms)
|
17016
|
+
Completed 200 OK in 50ms (Views: 49.5ms | ActiveRecord: 0.3ms)
|
17017
|
+
---------------------------------------------------------
|
17018
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
17019
|
+
---------------------------------------------------------
|
17020
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17021
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17022
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17023
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
17024
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17025
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
17026
|
+
[1m[36m (0.3ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17027
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17028
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17029
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.0ms)
|
17030
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17031
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17032
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.0ms)
|
17033
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.7ms)
|
17034
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.6ms)
|
17035
|
+
Completed 200 OK in 62ms (Views: 53.9ms | ActiveRecord: 1.1ms)
|
17036
|
+
-----------------------------------------------------------------
|
17037
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
17038
|
+
-----------------------------------------------------------------
|
17039
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17040
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17041
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17042
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
17043
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17044
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
17045
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17046
|
+
[1m[36mClarkKent::ReportColumn Load (0.6ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17047
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17048
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17049
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17050
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17051
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
17052
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17053
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17054
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.5ms)
|
17055
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
17056
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
17057
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count[0m
|
17058
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.4ms)
|
17059
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
17060
|
+
[1m[36mOrder Load (0.1ms)[0m [1mSELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
17061
|
+
(SELECT u.name
|
17062
|
+
FROM users u
|
17063
|
+
WHERE u.id = orders.user_id)
|
17064
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0[0m
|
17065
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.1ms)
|
17066
|
+
Completed 200 OK in 28ms (Views: 18.8ms | ActiveRecord: 2.3ms)
|
17067
|
+
--------------------------------------------------------------------
|
17068
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
17069
|
+
--------------------------------------------------------------------
|
17070
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17071
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17072
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17073
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
17074
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17075
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
17076
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17077
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17078
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17079
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17080
|
+
[1m[35m (0.2ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17081
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17082
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
17083
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17084
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17085
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.8ms)
|
17086
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.2ms)
|
17087
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
17088
|
+
Completed 200 OK in 14ms (Views: 8.3ms | ActiveRecord: 1.5ms)
|
17089
|
+
-----------------------------------------------------------
|
17090
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
17091
|
+
-----------------------------------------------------------
|
17092
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17093
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17094
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
17095
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
17096
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17097
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17098
|
+
[1m[35m (0.0ms)[0m commit transaction
|
17099
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17100
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.6ms)
|
17101
|
+
Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.3ms)
|
17102
|
+
[1m[36m (2.4ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
17103
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
17104
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
17105
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
17106
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
17107
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
17108
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
17109
|
+
FROM sqlite_master
|
17110
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
17111
|
+
UNION ALL
|
17112
|
+
SELECT sql
|
17113
|
+
FROM sqlite_temp_master
|
17114
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
17115
|
+
[0m
|
17116
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
17117
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
17118
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
17119
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
17120
|
+
FROM sqlite_master
|
17121
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
17122
|
+
UNION ALL
|
17123
|
+
SELECT sql
|
17124
|
+
FROM sqlite_temp_master
|
17125
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
17126
|
+
[0m
|
17127
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
17128
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
17129
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
17130
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
17131
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
17132
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
17133
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
17134
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
17135
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
17136
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
17137
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
17138
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
17139
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
17140
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
17141
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17142
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 17:53:19.464028"], ["resource_type", "Order"], ["updated_at", "2015-04-27 17:53:19.464028"]]
|
17143
|
+
[1m[35m (0.8ms)[0m commit transaction
|
17144
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17145
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
17146
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
17147
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17148
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
17149
|
+
[1m[35m (1.2ms)[0m commit transaction
|
17150
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17151
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
17152
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
17153
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17154
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
17155
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17156
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17157
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
17158
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
17159
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17160
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
17161
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17162
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17163
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 17:53:19.516531"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 17:53:19.516531"], ["user_id", 1]]
|
17164
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17165
|
+
------------------------------------------------------------------------------------------------
|
17166
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
17167
|
+
------------------------------------------------------------------------------------------------
|
17168
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17169
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17170
|
+
-----------------------------------------------------------
|
17171
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
17172
|
+
-----------------------------------------------------------
|
17173
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17174
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17175
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
17176
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
17177
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
17178
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
17179
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-27 17:53:19.595485"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 17:53:19.595485"]]
|
17180
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17181
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (4.4ms)
|
17182
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
17183
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (14.3ms)
|
17184
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
17185
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.9ms)
|
17186
|
+
[1m[35mClarkKent::ReportEmail Load (0.2ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
17187
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (8.2ms)
|
17188
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (40.9ms)
|
17189
|
+
Completed 200 OK in 65ms (Views: 59.1ms | ActiveRecord: 2.4ms)
|
17190
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
17191
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
17192
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17193
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
17194
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
17195
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
17196
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 2]]
|
17197
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17198
|
+
------------------------------------------------------------
|
17199
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
17200
|
+
------------------------------------------------------------
|
17201
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17202
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17203
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17204
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-27 17:53:19.667635"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 17:53:19.667635"]]
|
17205
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
17206
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
17207
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
17208
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
17209
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 3]]
|
17210
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17211
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
17212
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 3]]
|
17213
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 3]]
|
17214
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 3]]
|
17215
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17216
|
+
Redirected to http://test.host/reports/reports
|
17217
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
|
17218
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
17219
|
+
------------------------------------------------------
|
17220
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
17221
|
+
------------------------------------------------------
|
17222
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17223
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17224
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
17225
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
17226
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
17227
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.9ms)
|
17228
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17229
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (3.3ms)
|
17230
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
17231
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.0ms)
|
17232
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.5ms)
|
17233
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
17234
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
17235
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
17236
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
17237
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
17238
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
17239
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (7.0ms)
|
17240
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
17241
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.2ms)
|
17242
|
+
Completed 200 OK in 16ms (Views: 15.0ms | ActiveRecord: 0.5ms)
|
17243
|
+
-------------------------------------------------------
|
17244
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
17245
|
+
-------------------------------------------------------
|
17246
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17247
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17248
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
17249
|
+
Parameters: {"current_user_id"=>"1"}
|
17250
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
17251
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
17252
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17253
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
17254
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
17255
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
17256
|
+
Completed 200 OK in 17ms (Views: 16.1ms | ActiveRecord: 0.7ms)
|
17257
|
+
-----------------------------------------------------
|
17258
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
17259
|
+
-----------------------------------------------------
|
17260
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17261
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17262
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
17263
|
+
Parameters: {"current_user_id"=>"1"}
|
17264
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
17265
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17266
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (43.3ms)
|
17267
|
+
Completed 200 OK in 52ms (Views: 50.9ms | ActiveRecord: 0.3ms)
|
17268
|
+
---------------------------------------------------------
|
17269
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
17270
|
+
---------------------------------------------------------
|
17271
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17272
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17273
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17274
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
17275
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17276
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
17277
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17278
|
+
[1m[35m (0.2ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17279
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17280
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (2.1ms)
|
17281
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17282
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17283
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.5ms)
|
17284
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (1.0ms)
|
17285
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (1.2ms)
|
17286
|
+
Completed 200 OK in 28ms (Views: 21.7ms | ActiveRecord: 1.3ms)
|
17287
|
+
-----------------------------------------------------------------
|
17288
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
17289
|
+
-----------------------------------------------------------------
|
17290
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17291
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17292
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17293
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
17294
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17295
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
17296
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17297
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17298
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17299
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17300
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17301
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.4ms)
|
17302
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17303
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
17304
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.9ms)
|
17305
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.4ms)
|
17306
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
17307
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count
|
17308
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (6.0ms)
|
17309
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
17310
|
+
[1m[35mOrder Load (0.1ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
17311
|
+
(SELECT u.name
|
17312
|
+
FROM users u
|
17313
|
+
WHERE u.id = orders.user_id)
|
17314
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0
|
17315
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (0.8ms)
|
17316
|
+
Completed 200 OK in 24ms (Views: 18.5ms | ActiveRecord: 1.7ms)
|
17317
|
+
--------------------------------------------------------------------
|
17318
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
17319
|
+
--------------------------------------------------------------------
|
17320
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17321
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17322
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17323
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
17324
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17325
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
17326
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17327
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17328
|
+
[1m[36m (0.5ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17329
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17330
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17331
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
17332
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17333
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17334
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
|
17335
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
17336
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
|
17337
|
+
Completed 200 OK in 17ms (Views: 7.6ms | ActiveRecord: 1.7ms)
|
17338
|
+
-----------------------------------------------------------
|
17339
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
17340
|
+
-----------------------------------------------------------
|
17341
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17342
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17343
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
17344
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
17345
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17346
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17347
|
+
[1m[35m (0.0ms)[0m commit transaction
|
17348
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.9ms)
|
17349
|
+
Completed 200 OK in 3ms (Views: 1.2ms | ActiveRecord: 0.2ms)
|
17350
|
+
---------------------------------------------------
|
17351
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
17352
|
+
---------------------------------------------------
|
17353
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
17354
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17355
|
+
[1m[36mSQL (1.5ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
17356
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17357
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
17358
|
+
[1m[35m (0.9ms)[0m commit transaction
|
17359
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17360
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 17:53:19.923395"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 17:53:19.923395"]]
|
17361
|
+
[1m[36m (1.5ms)[0m [1mcommit transaction[0m
|
17362
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
17363
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
17364
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17365
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17366
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
|
17367
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
17368
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
17369
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17370
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17371
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17372
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17373
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17374
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17375
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
17376
|
+
-----------------------------------------------------------------------------------------
|
17377
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
17378
|
+
-----------------------------------------------------------------------------------------
|
17379
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
17380
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17381
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
17382
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17383
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
17384
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
17385
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
17386
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
17387
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17388
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17389
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 2]]
|
17390
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
17391
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
17392
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17393
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17394
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17395
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17396
|
+
-------------------------
|
17397
|
+
ClarkKentTest: test_truth
|
17398
|
+
-------------------------
|
17399
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
17400
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
17401
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
17402
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
17403
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
17404
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
17405
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
17406
|
+
FROM sqlite_master
|
17407
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
17408
|
+
UNION ALL
|
17409
|
+
SELECT sql
|
17410
|
+
FROM sqlite_temp_master
|
17411
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
17412
|
+
[0m
|
17413
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
17414
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
17415
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
17416
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
17417
|
+
FROM sqlite_master
|
17418
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
17419
|
+
UNION ALL
|
17420
|
+
SELECT sql
|
17421
|
+
FROM sqlite_temp_master
|
17422
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
17423
|
+
[0m
|
17424
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
17425
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
17426
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
17427
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
17428
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
17429
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
17430
|
+
[1m[35m (1.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
17431
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
17432
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
17433
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
17434
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
17435
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
17436
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
17437
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
17438
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17439
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 17:54:28.752624"], ["resource_type", "Order"], ["updated_at", "2015-04-27 17:54:28.752624"]]
|
17440
|
+
[1m[35m (0.8ms)[0m commit transaction
|
17441
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17442
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
17443
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
17444
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17445
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
17446
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17447
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17448
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
17449
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17450
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17451
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
17452
|
+
[1m[35m (0.8ms)[0m commit transaction
|
17453
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17454
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
17455
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
17456
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17457
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
17458
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17459
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17460
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 17:54:28.803767"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 17:54:28.803767"], ["user_id", 1]]
|
17461
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
17462
|
+
---------------------------------------------------
|
17463
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
17464
|
+
---------------------------------------------------
|
17465
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
17466
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17467
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
17468
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17469
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
17470
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17471
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17472
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-04-27 17:54:28.878641"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 17:54:28.878641"]]
|
17473
|
+
[1m[35m (0.8ms)[0m commit transaction
|
17474
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
17475
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17476
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17477
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17478
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
17479
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17480
|
+
[1m[36mClarkKent::ReportColumn Load (0.3ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
17481
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17482
|
+
[1m[36mClarkKent::ReportFilter Load (0.3ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17483
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17484
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17485
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17486
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17487
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
17488
|
+
-----------------------------------------------------------------------------------------
|
17489
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
17490
|
+
-----------------------------------------------------------------------------------------
|
17491
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
17492
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17493
|
+
[1m[36mSQL (0.9ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
17494
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17495
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
17496
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17497
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
17498
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17499
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17500
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17501
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 2]]
|
17502
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17503
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
17504
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17505
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17506
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17507
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17508
|
+
-------------------------
|
17509
|
+
ClarkKentTest: test_truth
|
17510
|
+
-------------------------
|
17511
|
+
-----------------------------------------------------------
|
17512
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
17513
|
+
-----------------------------------------------------------
|
17514
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17515
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17516
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
17517
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
17518
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
17519
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17520
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 17:54:29.016959"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-04-27 17:54:29.016959"]]
|
17521
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17522
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17523
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.5ms)
|
17524
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
17525
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.9ms)
|
17526
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
17527
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.6ms)
|
17528
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
17529
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.8ms)
|
17530
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (20.2ms)
|
17531
|
+
Completed 200 OK in 44ms (Views: 40.5ms | ActiveRecord: 1.7ms)
|
17532
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
17533
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1[0m
|
17534
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17535
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
17536
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
17537
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
17538
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
17539
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17540
|
+
------------------------------------------------------------
|
17541
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
17542
|
+
------------------------------------------------------------
|
17543
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17544
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17545
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17546
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-04-27 17:54:29.067841"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 17:54:29.067841"]]
|
17547
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17548
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
17549
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
17550
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
17551
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
17552
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17553
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
17554
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
17555
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 3]]
|
17556
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
17557
|
+
[1m[35m (0.9ms)[0m commit transaction
|
17558
|
+
Redirected to http://test.host/reports/reports
|
17559
|
+
Completed 302 Found in 6ms (ActiveRecord: 1.8ms)
|
17560
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
17561
|
+
------------------------------------------------------
|
17562
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
17563
|
+
------------------------------------------------------
|
17564
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17565
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17566
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
17567
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
17568
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17569
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17570
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.4ms)
|
17571
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17572
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.1ms)
|
17573
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
17574
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
|
17575
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.3ms)
|
17576
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
17577
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
|
17578
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
17579
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
17580
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
17581
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
17582
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (8.3ms)
|
17583
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
17584
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17585
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
|
17586
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (16.9ms)
|
17587
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (18.4ms)
|
17588
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17589
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 2]]
|
17590
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (2.6ms)
|
17591
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (2.8ms)
|
17592
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (24.3ms)
|
17593
|
+
Completed 200 OK in 70ms (Views: 67.9ms | ActiveRecord: 1.2ms)
|
17594
|
+
-------------------------------------------------------
|
17595
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
17596
|
+
-------------------------------------------------------
|
17597
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17598
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17599
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
17600
|
+
Parameters: {"current_user_id"=>"1"}
|
17601
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
17602
|
+
[1m[35mClarkKent::Report Exists (0.3ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
17603
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17604
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
17605
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ?[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
17606
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
17607
|
+
Completed 200 OK in 13ms (Views: 11.7ms | ActiveRecord: 0.9ms)
|
17608
|
+
-----------------------------------------------------
|
17609
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
17610
|
+
-----------------------------------------------------
|
17611
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17612
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17613
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
17614
|
+
Parameters: {"current_user_id"=>"1"}
|
17615
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
17616
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17617
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (58.9ms)
|
17618
|
+
Completed 200 OK in 66ms (Views: 65.3ms | ActiveRecord: 0.4ms)
|
17619
|
+
---------------------------------------------------------
|
17620
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
17621
|
+
---------------------------------------------------------
|
17622
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17623
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17624
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17625
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
17626
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17627
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
17628
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17629
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17630
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17631
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
|
17632
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17633
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17634
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (3.1ms)
|
17635
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.9ms)
|
17636
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.8ms)
|
17637
|
+
Completed 200 OK in 24ms (Views: 16.9ms | ActiveRecord: 1.2ms)
|
17638
|
+
-----------------------------------------------------------------
|
17639
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
17640
|
+
-----------------------------------------------------------------
|
17641
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17642
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17643
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17644
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
17645
|
+
[1m[35mClarkKent::Report Load (0.3ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17646
|
+
[1m[36mClarkKent::ReportColumn Load (0.3ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
17647
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17648
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17649
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17650
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17651
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17652
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17653
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
17654
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17655
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17656
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
17657
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
17658
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
17659
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count[0m
|
17660
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (3.7ms)
|
17661
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
17662
|
+
[1m[36mOrder Load (0.2ms)[0m [1mSELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
17663
|
+
(SELECT u.name
|
17664
|
+
FROM users u
|
17665
|
+
WHERE u.id = orders.user_id)
|
17666
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0[0m
|
17667
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.1ms)
|
17668
|
+
Completed 200 OK in 28ms (Views: 18.1ms | ActiveRecord: 2.0ms)
|
17669
|
+
--------------------------------------------------------------------
|
17670
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
17671
|
+
--------------------------------------------------------------------
|
17672
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17673
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17674
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17675
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
17676
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17677
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
17678
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17679
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17680
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17681
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17682
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17683
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17684
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
17685
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17686
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17687
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
17688
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.2ms)
|
17689
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
|
17690
|
+
Completed 200 OK in 13ms (Views: 5.9ms | ActiveRecord: 1.2ms)
|
17691
|
+
-----------------------------------------------------------
|
17692
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
17693
|
+
-----------------------------------------------------------
|
17694
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17695
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17696
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
17697
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
17698
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17699
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17700
|
+
[1m[35m (0.0ms)[0m commit transaction
|
17701
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17702
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.9ms)
|
17703
|
+
Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.2ms)
|
17704
|
+
------------------------------------------------------------------------------------------------
|
17705
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
17706
|
+
------------------------------------------------------------------------------------------------
|
17707
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17708
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
17709
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
17710
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
17711
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
17712
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
17713
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
17714
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
17715
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
17716
|
+
FROM sqlite_master
|
17717
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
17718
|
+
UNION ALL
|
17719
|
+
SELECT sql
|
17720
|
+
FROM sqlite_temp_master
|
17721
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
17722
|
+
[0m
|
17723
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
17724
|
+
[1m[36m (1.4ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
17725
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
17726
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
17727
|
+
FROM sqlite_master
|
17728
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
17729
|
+
UNION ALL
|
17730
|
+
SELECT sql
|
17731
|
+
FROM sqlite_temp_master
|
17732
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
17733
|
+
[0m
|
17734
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
17735
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
17736
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
17737
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
17738
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
17739
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
17740
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
17741
|
+
[1m[36m (0.2ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
17742
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
17743
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
17744
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
17745
|
+
[1m[36m (1.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
17746
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
17747
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
17748
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17749
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 19:37:53.290067"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:37:53.290067"]]
|
17750
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17751
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17752
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
17753
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17754
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17755
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
17756
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17757
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17758
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
17759
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17760
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17761
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
17762
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17763
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17764
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
17765
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17766
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17767
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
17768
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17769
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17770
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 19:37:53.343008"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 19:37:53.343008"], ["user_id", 1]]
|
17771
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
17772
|
+
-------------------------
|
17773
|
+
ClarkKentTest: test_truth
|
17774
|
+
-------------------------
|
17775
|
+
---------------------------------------------------
|
17776
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
17777
|
+
---------------------------------------------------
|
17778
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
17779
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17780
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
17781
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
17782
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
17783
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
17784
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17785
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:37:53.437663"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 19:37:53.437663"]]
|
17786
|
+
[1m[35m (0.8ms)[0m commit transaction
|
17787
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
17788
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17789
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17790
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17791
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
17792
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17793
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
17794
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17795
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17796
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17797
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17798
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17799
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17800
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
17801
|
+
-----------------------------------------------------------------------------------------
|
17802
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
17803
|
+
-----------------------------------------------------------------------------------------
|
17804
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
17805
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17806
|
+
[1m[36mSQL (1.1ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
17807
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17808
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
17809
|
+
[1m[35m (0.6ms)[0m commit transaction
|
17810
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
17811
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17812
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17813
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17814
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 2]]
|
17815
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17816
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
17817
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17818
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17819
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17820
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17821
|
+
-----------------------------------------------------------
|
17822
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
17823
|
+
-----------------------------------------------------------
|
17824
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17825
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17826
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
17827
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
17828
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
17829
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17830
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 19:37:53.593143"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-04-27 19:37:53.593143"]]
|
17831
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
17832
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17833
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.8ms)
|
17834
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
17835
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.4ms)
|
17836
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
17837
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.4ms)
|
17838
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
17839
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (2.1ms)
|
17840
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (22.2ms)
|
17841
|
+
Completed 200 OK in 61ms (Views: 55.0ms | ActiveRecord: 2.2ms)
|
17842
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
17843
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1[0m
|
17844
|
+
[1m[35m (0.0ms)[0m begin transaction
|
17845
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
17846
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
17847
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
17848
|
+
[1m[35mSQL (0.6ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
17849
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
17850
|
+
------------------------------------------------------------
|
17851
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
17852
|
+
------------------------------------------------------------
|
17853
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17854
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17855
|
+
[1m[35m (0.1ms)[0m begin transaction
|
17856
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:37:53.660741"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:37:53.660741"]]
|
17857
|
+
[1m[35m (0.8ms)[0m commit transaction
|
17858
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
17859
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
17860
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
17861
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
17862
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17863
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
17864
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
17865
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 3]]
|
17866
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
17867
|
+
[1m[35m (0.7ms)[0m commit transaction
|
17868
|
+
Redirected to http://test.host/reports/reports
|
17869
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.2ms)
|
17870
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
17871
|
+
------------------------------------------------------
|
17872
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
17873
|
+
------------------------------------------------------
|
17874
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17875
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17876
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
17877
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
17878
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17879
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17880
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.9ms)
|
17881
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17882
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.7ms)
|
17883
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
17884
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
|
17885
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.9ms)
|
17886
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
17887
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
|
17888
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
17889
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
17890
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
17891
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
|
17892
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (7.7ms)
|
17893
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
17894
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17895
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
|
17896
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (22.3ms)
|
17897
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (24.3ms)
|
17898
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
17899
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 2]]
|
17900
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (2.3ms)
|
17901
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (2.5ms)
|
17902
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (29.6ms)
|
17903
|
+
Completed 200 OK in 77ms (Views: 74.7ms | ActiveRecord: 1.3ms)
|
17904
|
+
-------------------------------------------------------
|
17905
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
17906
|
+
-------------------------------------------------------
|
17907
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17908
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17909
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
17910
|
+
Parameters: {"current_user_id"=>"1"}
|
17911
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
17912
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
17913
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
17914
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
17915
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ?[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
17916
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
17917
|
+
Completed 200 OK in 14ms (Views: 12.8ms | ActiveRecord: 0.7ms)
|
17918
|
+
-----------------------------------------------------
|
17919
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
17920
|
+
-----------------------------------------------------
|
17921
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17922
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17923
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
17924
|
+
Parameters: {"current_user_id"=>"1"}
|
17925
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
17926
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
17927
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (70.9ms)
|
17928
|
+
Completed 200 OK in 77ms (Views: 75.9ms | ActiveRecord: 0.3ms)
|
17929
|
+
---------------------------------------------------------
|
17930
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
17931
|
+
---------------------------------------------------------
|
17932
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17933
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17934
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17935
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
17936
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
17937
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
17938
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17939
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17940
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17941
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
|
17942
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17943
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17944
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.8ms)
|
17945
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.6ms)
|
17946
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.8ms)
|
17947
|
+
Completed 200 OK in 24ms (Views: 17.7ms | ActiveRecord: 1.0ms)
|
17948
|
+
-----------------------------------------------------------------
|
17949
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
17950
|
+
-----------------------------------------------------------------
|
17951
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17952
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17953
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17954
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
17955
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17956
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
17957
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17958
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17959
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17960
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17961
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17962
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17963
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
17964
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
17965
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
17966
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
17967
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
17968
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "orders"
|
17969
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count[0m
|
17970
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (6.5ms)
|
17971
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
17972
|
+
[1m[36mOrder Load (0.2ms)[0m [1mSELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
17973
|
+
(SELECT u.name
|
17974
|
+
FROM users u
|
17975
|
+
WHERE u.id = orders.user_id)
|
17976
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0[0m
|
17977
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17978
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
17979
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
17980
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
17981
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.3ms)
|
17982
|
+
Completed 200 OK in 32ms (Views: 24.8ms | ActiveRecord: 2.2ms)
|
17983
|
+
--------------------------------------------------------------------
|
17984
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
17985
|
+
--------------------------------------------------------------------
|
17986
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17987
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
17988
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
17989
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
17990
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
17991
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
17992
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17993
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
17994
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
17995
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17996
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17997
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
17998
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
17999
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18000
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18001
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
|
18002
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
18003
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
|
18004
|
+
Completed 200 OK in 13ms (Views: 7.0ms | ActiveRecord: 1.4ms)
|
18005
|
+
-----------------------------------------------------------
|
18006
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
18007
|
+
-----------------------------------------------------------
|
18008
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18009
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18010
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
18011
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
18012
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18013
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
18014
|
+
[1m[35m (0.0ms)[0m commit transaction
|
18015
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18016
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.5ms)
|
18017
|
+
Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.3ms)
|
18018
|
+
------------------------------------------------------------------------------------------------
|
18019
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
18020
|
+
------------------------------------------------------------------------------------------------
|
18021
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18022
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18023
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
18024
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
18025
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
18026
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
18027
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
18028
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
18029
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
18030
|
+
FROM sqlite_master
|
18031
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
18032
|
+
UNION ALL
|
18033
|
+
SELECT sql
|
18034
|
+
FROM sqlite_temp_master
|
18035
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
18036
|
+
[0m
|
18037
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
18038
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
18039
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
18040
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
18041
|
+
FROM sqlite_master
|
18042
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
18043
|
+
UNION ALL
|
18044
|
+
SELECT sql
|
18045
|
+
FROM sqlite_temp_master
|
18046
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
18047
|
+
[0m
|
18048
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
18049
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
18050
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
18051
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
18052
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
18053
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
18054
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
18055
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
18056
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
18057
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
18058
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
18059
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
18060
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
18061
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
18062
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18063
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 19:38:12.396672"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:38:12.396672"]]
|
18064
|
+
[1m[35m (0.9ms)[0m commit transaction
|
18065
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
18066
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
18067
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18068
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18069
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
18070
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18071
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18072
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
18073
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18074
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18075
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
18076
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18077
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18078
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
18079
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18080
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18081
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
18082
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18083
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18084
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 19:38:12.447002"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 19:38:12.447002"], ["user_id", 1]]
|
18085
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18086
|
+
-------------------------
|
18087
|
+
ClarkKentTest: test_truth
|
18088
|
+
-------------------------
|
18089
|
+
------------------------------------------------------------------------------------------------
|
18090
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
18091
|
+
------------------------------------------------------------------------------------------------
|
18092
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18093
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18094
|
+
---------------------------------------------------
|
18095
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
18096
|
+
---------------------------------------------------
|
18097
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
18098
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18099
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
18100
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
18101
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
18102
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18103
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18104
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:38:12.532614"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 19:38:12.532614"]]
|
18105
|
+
[1m[35m (0.9ms)[0m commit transaction
|
18106
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
18107
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18108
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18109
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18110
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
18111
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18112
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18113
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18114
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18115
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18116
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18117
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18118
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18119
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
18120
|
+
-----------------------------------------------------------------------------------------
|
18121
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
18122
|
+
-----------------------------------------------------------------------------------------
|
18123
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
18124
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18125
|
+
[1m[36mSQL (0.9ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
18126
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18127
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
18128
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18129
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
18130
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18131
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18132
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18133
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 2]]
|
18134
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18135
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18136
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18137
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18138
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18139
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18140
|
+
-----------------------------------------------------------
|
18141
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
18142
|
+
-----------------------------------------------------------
|
18143
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18144
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18145
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
18146
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
18147
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
18148
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18149
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 19:38:12.657665"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-04-27 19:38:12.657665"]]
|
18150
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
18151
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18152
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (4.4ms)
|
18153
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
18154
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.3ms)
|
18155
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
18156
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.8ms)
|
18157
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
18158
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (2.0ms)
|
18159
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (19.4ms)
|
18160
|
+
Completed 200 OK in 44ms (Views: 37.9ms | ActiveRecord: 2.2ms)
|
18161
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
18162
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1[0m
|
18163
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18164
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
18165
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
18166
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
18167
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
18168
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18169
|
+
------------------------------------------------------------
|
18170
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
18171
|
+
------------------------------------------------------------
|
18172
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18173
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18174
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18175
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:38:12.706236"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:38:12.706236"]]
|
18176
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18177
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
18178
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
18179
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
18180
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
18181
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18182
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
18183
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
18184
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 3]]
|
18185
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
18186
|
+
[1m[35m (0.9ms)[0m commit transaction
|
18187
|
+
Redirected to http://test.host/reports/reports
|
18188
|
+
Completed 302 Found in 6ms (ActiveRecord: 1.6ms)
|
18189
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
18190
|
+
------------------------------------------------------
|
18191
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
18192
|
+
------------------------------------------------------
|
18193
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18194
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18195
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
18196
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
18197
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18198
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18199
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.4ms)
|
18200
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18201
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.1ms)
|
18202
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18203
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.0ms)
|
18204
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.3ms)
|
18205
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
18206
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
18207
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
18208
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
18209
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
18210
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
18211
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (6.5ms)
|
18212
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
18213
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.3ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18214
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
|
18215
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (18.3ms)
|
18216
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (19.9ms)
|
18217
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18218
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 2]]
|
18219
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (34.5ms)
|
18220
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (34.9ms)
|
18221
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (57.2ms)
|
18222
|
+
Completed 200 OK in 73ms (Views: 70.2ms | ActiveRecord: 1.5ms)
|
18223
|
+
-------------------------------------------------------
|
18224
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
18225
|
+
-------------------------------------------------------
|
18226
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18227
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18228
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
18229
|
+
Parameters: {"current_user_id"=>"1"}
|
18230
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
18231
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
18232
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18233
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
18234
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ?[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
18235
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
18236
|
+
Completed 200 OK in 13ms (Views: 11.7ms | ActiveRecord: 0.8ms)
|
18237
|
+
-----------------------------------------------------
|
18238
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
18239
|
+
-----------------------------------------------------
|
18240
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18241
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18242
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
18243
|
+
Parameters: {"current_user_id"=>"1"}
|
18244
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
18245
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18246
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (39.1ms)
|
18247
|
+
Completed 200 OK in 44ms (Views: 43.5ms | ActiveRecord: 0.2ms)
|
18248
|
+
---------------------------------------------------------
|
18249
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
18250
|
+
---------------------------------------------------------
|
18251
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18252
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18253
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18254
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
18255
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18256
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
18257
|
+
[1m[36mOrder Load (0.1ms)[0m [1mSELECT "orders".* FROM "orders"[0m
|
18258
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments"
|
18259
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18260
|
+
Completed 500 Internal Server Error in 34ms
|
18261
|
+
-----------------------------------------------------------------
|
18262
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
18263
|
+
-----------------------------------------------------------------
|
18264
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18265
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18266
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18267
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
18268
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18269
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
18270
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18271
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18272
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18273
|
+
[1m[36mOrder Load (0.2ms)[0m [1mSELECT "orders".* FROM "orders"[0m
|
18274
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments"
|
18275
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18276
|
+
[1m[35mOrder Load (0.1ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
18277
|
+
(SELECT u.name
|
18278
|
+
FROM users u
|
18279
|
+
WHERE u.id = orders.user_id)
|
18280
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0
|
18281
|
+
Completed 500 Internal Server Error in 32ms
|
18282
|
+
--------------------------------------------------------------------
|
18283
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
18284
|
+
--------------------------------------------------------------------
|
18285
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18286
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18287
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18288
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
18289
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18290
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
18291
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18292
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18293
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18294
|
+
[1m[35mOrder Load (0.2ms)[0m SELECT "orders".* FROM "orders"
|
18295
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments"[0m
|
18296
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
18297
|
+
Completed 500 Internal Server Error in 33ms
|
18298
|
+
-----------------------------------------------------------
|
18299
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
18300
|
+
-----------------------------------------------------------
|
18301
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18302
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18303
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
18304
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
18305
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
18306
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18307
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
18308
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18309
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.7ms)
|
18310
|
+
Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.4ms)
|
18311
|
+
[1m[36m (1.9ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
18312
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
18313
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
18314
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
18315
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
18316
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
18317
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
18318
|
+
FROM sqlite_master
|
18319
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
18320
|
+
UNION ALL
|
18321
|
+
SELECT sql
|
18322
|
+
FROM sqlite_temp_master
|
18323
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
18324
|
+
[0m
|
18325
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
18326
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
18327
|
+
[1m[35m (1.3ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
18328
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
18329
|
+
FROM sqlite_master
|
18330
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
18331
|
+
UNION ALL
|
18332
|
+
SELECT sql
|
18333
|
+
FROM sqlite_temp_master
|
18334
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
18335
|
+
[0m
|
18336
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
18337
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
18338
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
18339
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
18340
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
18341
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
18342
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
18343
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
18344
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
18345
|
+
[1m[36m (1.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
18346
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
18347
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
18348
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
18349
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
18350
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18351
|
+
[1m[36mSQL (0.9ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 19:40:28.281190"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:40:28.281190"]]
|
18352
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18353
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
18354
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
18355
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18356
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18357
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
18358
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18359
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18360
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
18361
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18362
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18363
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
18364
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18365
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
18366
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
18367
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18368
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18369
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
18370
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18371
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
18372
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 19:40:28.339969"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 19:40:28.339969"], ["user_id", 1]]
|
18373
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
18374
|
+
-------------------------
|
18375
|
+
ClarkKentTest: test_truth
|
18376
|
+
-------------------------
|
18377
|
+
------------------------------------------------------------------------------------------------
|
18378
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
18379
|
+
------------------------------------------------------------------------------------------------
|
18380
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18381
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18382
|
+
---------------------------------------------------
|
18383
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
18384
|
+
---------------------------------------------------
|
18385
|
+
[1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
18386
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18387
|
+
[1m[35mSQL (1.7ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
18388
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
18389
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
18390
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
18391
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18392
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:40:28.432825"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 19:40:28.432825"]]
|
18393
|
+
[1m[35m (0.9ms)[0m commit transaction
|
18394
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
18395
|
+
[1m[35mClarkKent::Report Load (0.3ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18396
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18397
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18398
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
18399
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18400
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18401
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18402
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18403
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18404
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18405
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18406
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18407
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "orders"
|
18408
|
+
-----------------------------------------------------------------------------------------
|
18409
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
18410
|
+
-----------------------------------------------------------------------------------------
|
18411
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
18412
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18413
|
+
[1m[36mSQL (0.9ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
18414
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18415
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
18416
|
+
[1m[35m (0.6ms)[0m commit transaction
|
18417
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
18418
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18419
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18420
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18421
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 2]]
|
18422
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18423
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18424
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18425
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18426
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18427
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18428
|
+
-----------------------------------------------------------
|
18429
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
18430
|
+
-----------------------------------------------------------
|
18431
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18432
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18433
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
18434
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
18435
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
18436
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18437
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 19:40:28.571313"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-04-27 19:40:28.571313"]]
|
18438
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18439
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18440
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.2ms)
|
18441
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
18442
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.1ms)
|
18443
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
18444
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.5ms)
|
18445
|
+
[1m[36mClarkKent::ReportEmail Load (0.3ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
18446
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (2.5ms)
|
18447
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (19.4ms)
|
18448
|
+
Completed 200 OK in 41ms (Views: 37.2ms | ActiveRecord: 1.8ms)
|
18449
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
18450
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1[0m
|
18451
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18452
|
+
[1m[36mClarkKent::ReportFilter Load (0.3ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
18453
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
18454
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
18455
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
18456
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18457
|
+
------------------------------------------------------------
|
18458
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
18459
|
+
------------------------------------------------------------
|
18460
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18461
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18462
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18463
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:40:28.620752"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:40:28.620752"]]
|
18464
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18465
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
18466
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
18467
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
18468
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
18469
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18470
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
18471
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
18472
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 3]]
|
18473
|
+
[1m[36mSQL (0.5ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
18474
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18475
|
+
Redirected to http://test.host/reports/reports
|
18476
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.5ms)
|
18477
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
18478
|
+
------------------------------------------------------
|
18479
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
18480
|
+
------------------------------------------------------
|
18481
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18482
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18483
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
18484
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
18485
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18486
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18487
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.5ms)
|
18488
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18489
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.3ms)
|
18490
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18491
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (4.3ms)
|
18492
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (6.5ms)
|
18493
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.9ms)
|
18494
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (1.5ms)
|
18495
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.6ms)
|
18496
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.9ms)
|
18497
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.7ms)
|
18498
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (1.4ms)
|
18499
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (13.9ms)
|
18500
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
18501
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.4ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18502
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
|
18503
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (19.3ms)
|
18504
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (20.9ms)
|
18505
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18506
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 2]]
|
18507
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (35.7ms)
|
18508
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (35.9ms)
|
18509
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (59.7ms)
|
18510
|
+
Completed 200 OK in 81ms (Views: 78.7ms | ActiveRecord: 1.4ms)
|
18511
|
+
-------------------------------------------------------
|
18512
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
18513
|
+
-------------------------------------------------------
|
18514
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18515
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18516
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
18517
|
+
Parameters: {"current_user_id"=>"1"}
|
18518
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
18519
|
+
[1m[35mClarkKent::Report Exists (0.3ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
18520
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18521
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
18522
|
+
[1m[36mClarkKent::Report Load (0.3ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ?[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
18523
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
18524
|
+
Completed 200 OK in 14ms (Views: 12.7ms | ActiveRecord: 1.3ms)
|
18525
|
+
-----------------------------------------------------
|
18526
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
18527
|
+
-----------------------------------------------------
|
18528
|
+
[1m[36mClarkKent::Report Load (0.4ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18529
|
+
[1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18530
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
18531
|
+
Parameters: {"current_user_id"=>"1"}
|
18532
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
18533
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18534
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (41.0ms)
|
18535
|
+
Completed 200 OK in 46ms (Views: 45.4ms | ActiveRecord: 0.3ms)
|
18536
|
+
---------------------------------------------------------
|
18537
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
18538
|
+
---------------------------------------------------------
|
18539
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18540
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18541
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18542
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
18543
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18544
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
18545
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18546
|
+
[1m[35m (0.4ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18547
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18548
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
|
18549
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18550
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18551
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.7ms)
|
18552
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
|
18553
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.5ms)
|
18554
|
+
Completed 200 OK in 21ms (Views: 15.4ms | ActiveRecord: 1.3ms)
|
18555
|
+
-----------------------------------------------------------------
|
18556
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
18557
|
+
-----------------------------------------------------------------
|
18558
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18559
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18560
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18561
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
18562
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18563
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
18564
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18565
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18566
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18567
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18568
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18569
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18570
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.5ms)
|
18571
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18572
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18573
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.3ms)
|
18574
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
18575
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
18576
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count[0m
|
18577
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.1ms)
|
18578
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
18579
|
+
[1m[36mOrder Load (0.3ms)[0m [1mSELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
18580
|
+
(SELECT u.name
|
18581
|
+
FROM users u
|
18582
|
+
WHERE u.id = orders.user_id)
|
18583
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0[0m
|
18584
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18585
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
18586
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18587
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
18588
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.1ms)
|
18589
|
+
Completed 200 OK in 30ms (Views: 21.9ms | ActiveRecord: 2.2ms)
|
18590
|
+
--------------------------------------------------------------------
|
18591
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
18592
|
+
--------------------------------------------------------------------
|
18593
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18594
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18595
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18596
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
18597
|
+
[1m[35mClarkKent::Report Load (0.3ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18598
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
18599
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18600
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18601
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18602
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18603
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18604
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18605
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
18606
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18607
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18608
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
18609
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
18610
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
18611
|
+
Completed 200 OK in 12ms (Views: 5.0ms | ActiveRecord: 1.3ms)
|
18612
|
+
-----------------------------------------------------------
|
18613
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
18614
|
+
-----------------------------------------------------------
|
18615
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18616
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18617
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
18618
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
18619
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18620
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18621
|
+
[1m[35m (0.1ms)[0m commit transaction
|
18622
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18623
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.3ms)
|
18624
|
+
Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.4ms)
|
18625
|
+
[1m[35mOrder Load (0.2ms)[0m SELECT "orders".* FROM "orders"
|
18626
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments"[0m
|
18627
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
18628
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
18629
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
18630
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
18631
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
18632
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
18633
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
18634
|
+
FROM sqlite_master
|
18635
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
18636
|
+
UNION ALL
|
18637
|
+
SELECT sql
|
18638
|
+
FROM sqlite_temp_master
|
18639
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
18640
|
+
[0m
|
18641
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
18642
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
18643
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
18644
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
18645
|
+
FROM sqlite_master
|
18646
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
18647
|
+
UNION ALL
|
18648
|
+
SELECT sql
|
18649
|
+
FROM sqlite_temp_master
|
18650
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
18651
|
+
[0m
|
18652
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
18653
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
18654
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
18655
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
18656
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
18657
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
18658
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
18659
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
18660
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
18661
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
18662
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
18663
|
+
[1m[36m (1.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
18664
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
18665
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
18666
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18667
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 19:41:27.305878"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:41:27.305878"]]
|
18668
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18669
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
18670
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
18671
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18672
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18673
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
18674
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18675
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18676
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
18677
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18678
|
+
[1m[35m (0.2ms)[0m begin transaction
|
18679
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
18680
|
+
[1m[35m (0.8ms)[0m commit transaction
|
18681
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18682
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
18683
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18684
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18685
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
18686
|
+
[1m[35m (0.6ms)[0m commit transaction
|
18687
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18688
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 19:41:27.365156"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 19:41:27.365156"], ["user_id", 1]]
|
18689
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18690
|
+
-------------------------
|
18691
|
+
ClarkKentTest: test_truth
|
18692
|
+
-------------------------
|
18693
|
+
------------------------------------------------------------------------------------------------
|
18694
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
18695
|
+
------------------------------------------------------------------------------------------------
|
18696
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18697
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
18698
|
+
---------------------------------------------------
|
18699
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
18700
|
+
---------------------------------------------------
|
18701
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
18702
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18703
|
+
[1m[35mSQL (2.3ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
18704
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18705
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
18706
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18707
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18708
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:41:27.454455"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 19:41:27.454455"]]
|
18709
|
+
[1m[35m (1.3ms)[0m commit transaction
|
18710
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
18711
|
+
[1m[35mClarkKent::Report Load (0.4ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18712
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18713
|
+
[1m[35mDepartment Load (0.2ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18714
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
18715
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18716
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18717
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18718
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18719
|
+
[1m[35mClarkKent::ReportColumn Load (0.4ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18720
|
+
[1m[36mClarkKent::ReportColumn Load (0.4ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18721
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18722
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18723
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "orders"
|
18724
|
+
-----------------------------------------------------------------------------------------
|
18725
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
18726
|
+
-----------------------------------------------------------------------------------------
|
18727
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
18728
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18729
|
+
[1m[36mSQL (1.5ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
18730
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18731
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
18732
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18733
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
18734
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18735
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18736
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18737
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 2]]
|
18738
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18739
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18740
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18741
|
+
[1m[36mClarkKent::ReportFilter Load (0.4ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18742
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18743
|
+
[1m[36mClarkKent::ReportColumn Load (0.3ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18744
|
+
-----------------------------------------------------------
|
18745
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
18746
|
+
-----------------------------------------------------------
|
18747
|
+
[1m[35mClarkKent::Report Load (0.3ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18748
|
+
[1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18749
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
18750
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
18751
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
18752
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18753
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 19:41:27.606116"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-04-27 19:41:27.606116"]]
|
18754
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
18755
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18756
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (4.4ms)
|
18757
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
18758
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.0ms)
|
18759
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
18760
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (3.0ms)
|
18761
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
18762
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.8ms)
|
18763
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (25.8ms)
|
18764
|
+
Completed 200 OK in 53ms (Views: 48.5ms | ActiveRecord: 1.6ms)
|
18765
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
18766
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1[0m
|
18767
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18768
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
18769
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
18770
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
18771
|
+
[1m[35mSQL (0.7ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
18772
|
+
[1m[36m (1.3ms)[0m [1mcommit transaction[0m
|
18773
|
+
------------------------------------------------------------
|
18774
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
18775
|
+
------------------------------------------------------------
|
18776
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18777
|
+
[1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18778
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18779
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:41:27.667295"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:41:27.667295"]]
|
18780
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18781
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
18782
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
18783
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
18784
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
18785
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18786
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
18787
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
18788
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 3]]
|
18789
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
18790
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18791
|
+
Redirected to http://test.host/reports/reports
|
18792
|
+
Completed 302 Found in 6ms (ActiveRecord: 1.2ms)
|
18793
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
18794
|
+
------------------------------------------------------
|
18795
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
18796
|
+
------------------------------------------------------
|
18797
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18798
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18799
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
18800
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
18801
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18802
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18803
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.6ms)
|
18804
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18805
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.7ms)
|
18806
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
18807
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
|
18808
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.9ms)
|
18809
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
18810
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
|
18811
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.7ms)
|
18812
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (1.0ms)
|
18813
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
|
18814
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (1.5ms)
|
18815
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (10.6ms)
|
18816
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
18817
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18818
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
|
18819
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (19.1ms)
|
18820
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (20.7ms)
|
18821
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
18822
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 2]]
|
18823
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (37.7ms)
|
18824
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (38.0ms)
|
18825
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (61.8ms)
|
18826
|
+
Completed 200 OK in 82ms (Views: 79.4ms | ActiveRecord: 1.4ms)
|
18827
|
+
-------------------------------------------------------
|
18828
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
18829
|
+
-------------------------------------------------------
|
18830
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18831
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18832
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
18833
|
+
Parameters: {"current_user_id"=>"1"}
|
18834
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
18835
|
+
[1m[35mClarkKent::Report Exists (0.4ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
18836
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18837
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
18838
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ?[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
18839
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
18840
|
+
Completed 200 OK in 20ms (Views: 18.6ms | ActiveRecord: 1.2ms)
|
18841
|
+
-----------------------------------------------------
|
18842
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
18843
|
+
-----------------------------------------------------
|
18844
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18845
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18846
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
18847
|
+
Parameters: {"current_user_id"=>"1"}
|
18848
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
18849
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
18850
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (56.2ms)
|
18851
|
+
Completed 200 OK in 64ms (Views: 62.9ms | ActiveRecord: 0.3ms)
|
18852
|
+
---------------------------------------------------------
|
18853
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
18854
|
+
---------------------------------------------------------
|
18855
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18856
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18857
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18858
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
18859
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
18860
|
+
[1m[35mClarkKent::ReportColumn Load (0.6ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
18861
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18862
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18863
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18864
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.8ms)
|
18865
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18866
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18867
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.9ms)
|
18868
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.8ms)
|
18869
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (1.0ms)
|
18870
|
+
Completed 200 OK in 26ms (Views: 18.0ms | ActiveRecord: 1.3ms)
|
18871
|
+
-----------------------------------------------------------------
|
18872
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
18873
|
+
-----------------------------------------------------------------
|
18874
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18875
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18876
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18877
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
18878
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18879
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
18880
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18881
|
+
[1m[36mClarkKent::ReportColumn Load (0.3ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18882
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18883
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18884
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18885
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18886
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.7ms)
|
18887
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18888
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18889
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.7ms)
|
18890
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.2ms)
|
18891
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
18892
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count[0m
|
18893
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.1ms)
|
18894
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
18895
|
+
[1m[36mOrder Load (0.7ms)[0m [1mSELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
18896
|
+
(SELECT u.name
|
18897
|
+
FROM users u
|
18898
|
+
WHERE u.id = orders.user_id)
|
18899
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0[0m
|
18900
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18901
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
18902
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18903
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
18904
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.2ms)
|
18905
|
+
Completed 200 OK in 40ms (Views: 30.2ms | ActiveRecord: 3.4ms)
|
18906
|
+
--------------------------------------------------------------------
|
18907
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
18908
|
+
--------------------------------------------------------------------
|
18909
|
+
[1m[35mClarkKent::Report Load (0.4ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18910
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18911
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
18912
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
18913
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18914
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
18915
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18916
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
18917
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
18918
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18919
|
+
[1m[35m (0.2ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18920
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
18921
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
18922
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
18923
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
|
18924
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (3.0ms)
|
18925
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
18926
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
|
18927
|
+
Completed 200 OK in 16ms (Views: 8.6ms | ActiveRecord: 1.7ms)
|
18928
|
+
-----------------------------------------------------------
|
18929
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
18930
|
+
-----------------------------------------------------------
|
18931
|
+
[1m[35mClarkKent::Report Load (0.5ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
18932
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
18933
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
18934
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
18935
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
18936
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18937
|
+
[1m[35m (0.1ms)[0m commit transaction
|
18938
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
18939
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.0ms)
|
18940
|
+
Completed 200 OK in 8ms (Views: 3.9ms | ActiveRecord: 0.4ms)
|
18941
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
18942
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
18943
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
18944
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
18945
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
18946
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
18947
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
18948
|
+
FROM sqlite_master
|
18949
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
18950
|
+
UNION ALL
|
18951
|
+
SELECT sql
|
18952
|
+
FROM sqlite_temp_master
|
18953
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
18954
|
+
[0m
|
18955
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
18956
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
18957
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
18958
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
18959
|
+
FROM sqlite_master
|
18960
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
18961
|
+
UNION ALL
|
18962
|
+
SELECT sql
|
18963
|
+
FROM sqlite_temp_master
|
18964
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
18965
|
+
[0m
|
18966
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
18967
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
18968
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
18969
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
18970
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
18971
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
18972
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
18973
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
18974
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
18975
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
18976
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
18977
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
18978
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
18979
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
18980
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18981
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 19:41:57.524570"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:41:57.524570"]]
|
18982
|
+
[1m[35m (2.2ms)[0m commit transaction
|
18983
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18984
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
18985
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18986
|
+
[1m[35m (0.1ms)[0m begin transaction
|
18987
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
18988
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18989
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
18990
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
18991
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18992
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18993
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
18994
|
+
[1m[35m (0.7ms)[0m commit transaction
|
18995
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18996
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
18997
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
18998
|
+
[1m[35m (0.0ms)[0m begin transaction
|
18999
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
19000
|
+
[1m[35m (0.7ms)[0m commit transaction
|
19001
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19002
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 19:41:57.583618"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 19:41:57.583618"], ["user_id", 1]]
|
19003
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19004
|
+
---------------------------------------------------
|
19005
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
19006
|
+
---------------------------------------------------
|
19007
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
19008
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19009
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
19010
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19011
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
19012
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
19013
|
+
[1m[35m (0.0ms)[0m begin transaction
|
19014
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:41:57.660348"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 19:41:57.660348"]]
|
19015
|
+
[1m[35m (0.8ms)[0m commit transaction
|
19016
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
19017
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19018
|
+
[1m[36mClarkKent::ReportFilter Load (0.2ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19019
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
19020
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 1]]
|
19021
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19022
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
19023
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19024
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
19025
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19026
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19027
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19028
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19029
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "orders"
|
19030
|
+
-----------------------------------------------------------------------------------------
|
19031
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
19032
|
+
-----------------------------------------------------------------------------------------
|
19033
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
19034
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19035
|
+
[1m[36mSQL (1.1ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
19036
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19037
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
19038
|
+
[1m[35m (0.7ms)[0m commit transaction
|
19039
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
19040
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19041
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19042
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
19043
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1[0m [["id", 2]]
|
19044
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19045
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
19046
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19047
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
19048
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19049
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19050
|
+
-------------------------
|
19051
|
+
ClarkKentTest: test_truth
|
19052
|
+
-------------------------
|
19053
|
+
------------------------------------------------------------------------------------------------
|
19054
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
19055
|
+
------------------------------------------------------------------------------------------------
|
19056
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19057
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
19058
|
+
-----------------------------------------------------------
|
19059
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
19060
|
+
-----------------------------------------------------------
|
19061
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19062
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19063
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
19064
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
19065
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
19066
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19067
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "sharing_scope_id", "sharing_scope_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 19:41:57.807655"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-04-27 19:41:57.807655"]]
|
19068
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
19069
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
19070
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.3ms)
|
19071
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
19072
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.4ms)
|
19073
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
19074
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.4ms)
|
19075
|
+
[1m[36mClarkKent::ReportEmail Load (0.2ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
19076
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.9ms)
|
19077
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (17.9ms)
|
19078
|
+
Completed 200 OK in 43ms (Views: 38.7ms | ActiveRecord: 2.0ms)
|
19079
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
19080
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1[0m
|
19081
|
+
[1m[35m (0.0ms)[0m begin transaction
|
19082
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
19083
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 2]]
|
19084
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 2]]
|
19085
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
19086
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19087
|
+
------------------------------------------------------------
|
19088
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
19089
|
+
------------------------------------------------------------
|
19090
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19091
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19092
|
+
[1m[35m (0.0ms)[0m begin transaction
|
19093
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-04-27 19:41:57.857369"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:41:57.857369"]]
|
19094
|
+
[1m[35m (1.2ms)[0m commit transaction
|
19095
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
19096
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
19097
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
19098
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
19099
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19100
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
19101
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 3]]
|
19102
|
+
[1m[35mClarkKent::ReportEmail Load (0.2ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 3]]
|
19103
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
19104
|
+
[1m[35m (0.8ms)[0m commit transaction
|
19105
|
+
Redirected to http://test.host/reports/reports
|
19106
|
+
Completed 302 Found in 7ms (ActiveRecord: 1.6ms)
|
19107
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
19108
|
+
------------------------------------------------------
|
19109
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
19110
|
+
------------------------------------------------------
|
19111
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19112
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19113
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
19114
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
19115
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19116
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19117
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.4ms)
|
19118
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19119
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.4ms)
|
19120
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
19121
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.1ms)
|
19122
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.9ms)
|
19123
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.7ms)
|
19124
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.9ms)
|
19125
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
19126
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
19127
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.6ms)
|
19128
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.7ms)
|
19129
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (8.3ms)
|
19130
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
19131
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.3ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
19132
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 1]]
|
19133
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (53.3ms)
|
19134
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (54.5ms)
|
19135
|
+
[1m[36mClarkKent::ReportDateFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."type" IN ('ClarkKent::ReportDateFilter') AND "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
19136
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" INNER JOIN "clark_kent_user_report_emails" ON "users"."id" = "clark_kent_user_report_emails"."user_id" WHERE "clark_kent_user_report_emails"."report_email_id" = ? [["report_email_id", 2]]
|
19137
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (2.7ms)
|
19138
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (2.9ms)
|
19139
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (59.8ms)
|
19140
|
+
Completed 200 OK in 75ms (Views: 72.5ms | ActiveRecord: 1.3ms)
|
19141
|
+
-------------------------------------------------------
|
19142
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
19143
|
+
-------------------------------------------------------
|
19144
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19145
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19146
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
19147
|
+
Parameters: {"current_user_id"=>"1"}
|
19148
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
19149
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
19150
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19151
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
19152
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ?[0m [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
19153
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
19154
|
+
Completed 200 OK in 13ms (Views: 11.9ms | ActiveRecord: 0.9ms)
|
19155
|
+
-----------------------------------------------------
|
19156
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
19157
|
+
-----------------------------------------------------
|
19158
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19159
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19160
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
19161
|
+
Parameters: {"current_user_id"=>"1"}
|
19162
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
19163
|
+
[1m[35mDepartment Load (0.3ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
19164
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (53.4ms)
|
19165
|
+
Completed 200 OK in 59ms (Views: 57.9ms | ActiveRecord: 0.6ms)
|
19166
|
+
---------------------------------------------------------
|
19167
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
19168
|
+
---------------------------------------------------------
|
19169
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19170
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19171
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19172
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
19173
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19174
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
19175
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19176
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19177
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19178
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
|
19179
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19180
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
19181
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.4ms)
|
19182
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.7ms)
|
19183
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.8ms)
|
19184
|
+
Completed 200 OK in 22ms (Views: 15.3ms | ActiveRecord: 1.2ms)
|
19185
|
+
-----------------------------------------------------------------
|
19186
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
19187
|
+
-----------------------------------------------------------------
|
19188
|
+
[1m[35mClarkKent::Report Load (0.3ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19189
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19190
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19191
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
19192
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19193
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
19194
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19195
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19196
|
+
[1m[35mClarkKent::ReportColumn Load (0.3ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19197
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19198
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19199
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19200
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.4ms)
|
19201
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19202
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
19203
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
|
19204
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
19205
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "orders"
|
19206
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count[0m
|
19207
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (5.0ms)
|
19208
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
19209
|
+
[1m[36mOrder Load (0.1ms)[0m [1mSELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
19210
|
+
(SELECT u.name
|
19211
|
+
FROM users u
|
19212
|
+
WHERE u.id = orders.user_id)
|
19213
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0[0m
|
19214
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19215
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19216
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19217
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19218
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.2ms)
|
19219
|
+
Completed 200 OK in 30ms (Views: 21.9ms | ActiveRecord: 2.4ms)
|
19220
|
+
--------------------------------------------------------------------
|
19221
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
19222
|
+
--------------------------------------------------------------------
|
19223
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19224
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19225
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19226
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
19227
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19228
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
19229
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19230
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19231
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19232
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19233
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19234
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19235
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
19236
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19237
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
19238
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.6ms)
|
19239
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
19240
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
|
19241
|
+
Completed 200 OK in 14ms (Views: 6.7ms | ActiveRecord: 1.5ms)
|
19242
|
+
-----------------------------------------------------------
|
19243
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
19244
|
+
-----------------------------------------------------------
|
19245
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19246
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19247
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
19248
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
19249
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19250
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19251
|
+
[1m[35m (0.1ms)[0m commit transaction
|
19252
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19253
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (2.0ms)
|
19254
|
+
Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.3ms)
|
19255
|
+
[1m[36m (1.7ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
19256
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
19257
|
+
[1m[36m (1.4ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
19258
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
19259
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
19260
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
19261
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
19262
|
+
FROM sqlite_master
|
19263
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
19264
|
+
UNION ALL
|
19265
|
+
SELECT sql
|
19266
|
+
FROM sqlite_temp_master
|
19267
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
19268
|
+
[0m
|
19269
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
19270
|
+
[1m[36m (1.4ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
19271
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
19272
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
19273
|
+
FROM sqlite_master
|
19274
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
19275
|
+
UNION ALL
|
19276
|
+
SELECT sql
|
19277
|
+
FROM sqlite_temp_master
|
19278
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
19279
|
+
[0m
|
19280
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
19281
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
19282
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
19283
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
19284
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
19285
|
+
[1m[36m (1.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
19286
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
19287
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
19288
|
+
[1m[35m (1.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
19289
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
19290
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
19291
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
19292
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
19293
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
19294
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19295
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-27 19:42:32.497953"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:42:32.497953"]]
|
19296
|
+
[1m[35m (0.8ms)[0m commit transaction
|
19297
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19298
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
19299
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19300
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19301
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
19302
|
+
[1m[35m (0.6ms)[0m commit transaction
|
19303
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19304
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
19305
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19306
|
+
[1m[35m (0.0ms)[0m begin transaction
|
19307
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
19308
|
+
[1m[35m (0.6ms)[0m commit transaction
|
19309
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19310
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
19311
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
19312
|
+
[1m[35m (0.0ms)[0m begin transaction
|
19313
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
19314
|
+
[1m[35m (0.8ms)[0m commit transaction
|
19315
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19316
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-27 19:42:32.549088"], ["description", "Guitar strings"], ["updated_at", "2015-04-27 19:42:32.549088"], ["user_id", 1]]
|
19317
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19318
|
+
------------------------------------------------------------------------------------------------
|
19319
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
19320
|
+
------------------------------------------------------------------------------------------------
|
19321
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19322
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
19323
|
+
-------------------------
|
19324
|
+
ClarkKentTest: test_truth
|
19325
|
+
-------------------------
|
19326
|
+
-----------------------------------------------------------
|
19327
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
19328
|
+
-----------------------------------------------------------
|
19329
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19330
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19331
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
19332
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
19333
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
19334
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19335
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-27 19:42:32.630360"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:42:32.630360"]]
|
19336
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
19337
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (20.3ms)
|
19338
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
19339
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (5.0ms)
|
19340
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
19341
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.7ms)
|
19342
|
+
[1m[35mClarkKent::ReportEmail Load (0.2ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
19343
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (7.2ms)
|
19344
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (41.8ms)
|
19345
|
+
Completed 200 OK in 67ms (Views: 60.5ms | ActiveRecord: 2.4ms)
|
19346
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
19347
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
19348
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19349
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
19350
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
19351
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
19352
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 2]]
|
19353
|
+
[1m[35m (0.7ms)[0m commit transaction
|
19354
|
+
------------------------------------------------------------
|
19355
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
19356
|
+
------------------------------------------------------------
|
19357
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19358
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19359
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19360
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-27 19:42:32.706349"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-27 19:42:32.706349"]]
|
19361
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
19362
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
19363
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
19364
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
19365
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 3]]
|
19366
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19367
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
19368
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 3]]
|
19369
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 3]]
|
19370
|
+
[1m[35mSQL (0.9ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 3]]
|
19371
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19372
|
+
Redirected to http://test.host/reports/reports
|
19373
|
+
Completed 302 Found in 7ms (ActiveRecord: 2.2ms)
|
19374
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
19375
|
+
------------------------------------------------------
|
19376
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
19377
|
+
------------------------------------------------------
|
19378
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19379
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19380
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
19381
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
19382
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19383
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.8ms)
|
19384
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19385
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.3ms)
|
19386
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
19387
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.0ms)
|
19388
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.8ms)
|
19389
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
19390
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
19391
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
19392
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.6ms)
|
19393
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
19394
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
19395
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (7.4ms)
|
19396
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
19397
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.3ms)
|
19398
|
+
Completed 200 OK in 15ms (Views: 13.8ms | ActiveRecord: 0.4ms)
|
19399
|
+
-------------------------------------------------------
|
19400
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
19401
|
+
-------------------------------------------------------
|
19402
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19403
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19404
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
19405
|
+
Parameters: {"current_user_id"=>"1"}
|
19406
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
19407
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
19408
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19409
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
19410
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
19411
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
19412
|
+
Completed 200 OK in 20ms (Views: 19.0ms | ActiveRecord: 0.8ms)
|
19413
|
+
-----------------------------------------------------
|
19414
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
19415
|
+
-----------------------------------------------------
|
19416
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19417
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19418
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
19419
|
+
Parameters: {"current_user_id"=>"1"}
|
19420
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
19421
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
19422
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (42.7ms)
|
19423
|
+
Completed 200 OK in 48ms (Views: 47.0ms | ActiveRecord: 0.3ms)
|
19424
|
+
---------------------------------------------------------
|
19425
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
19426
|
+
---------------------------------------------------------
|
19427
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19428
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19429
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19430
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
19431
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19432
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
19433
|
+
[1m[36m (0.2ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19434
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19435
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19436
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (3.2ms)
|
19437
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19438
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
19439
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (2.0ms)
|
19440
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
|
19441
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.7ms)
|
19442
|
+
Completed 200 OK in 26ms (Views: 19.7ms | ActiveRecord: 1.2ms)
|
19443
|
+
-----------------------------------------------------------------
|
19444
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
19445
|
+
-----------------------------------------------------------------
|
19446
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19447
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19448
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19449
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-27", "created_at_from"=>"2015-04-26", "id"=>"1"}
|
19450
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19451
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
19452
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19453
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19454
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19455
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19456
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19457
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.6ms)
|
19458
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19459
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
19460
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.5ms)
|
19461
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
19462
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
19463
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count
|
19464
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.8ms)
|
19465
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
19466
|
+
[1m[35mOrder Load (0.2ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
19467
|
+
(SELECT u.name
|
19468
|
+
FROM users u
|
19469
|
+
WHERE u.id = orders.user_id)
|
19470
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0
|
19471
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19472
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19473
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19474
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19475
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.3ms)
|
19476
|
+
Completed 200 OK in 30ms (Views: 22.9ms | ActiveRecord: 2.3ms)
|
19477
|
+
--------------------------------------------------------------------
|
19478
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
19479
|
+
--------------------------------------------------------------------
|
19480
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19481
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19482
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19483
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
19484
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19485
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
19486
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19487
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19488
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19489
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19490
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19491
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.8ms)
|
19492
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19493
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
19494
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.4ms)
|
19495
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
19496
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
19497
|
+
Completed 200 OK in 46ms (Views: 39.7ms | ActiveRecord: 1.1ms)
|
19498
|
+
-----------------------------------------------------------
|
19499
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
19500
|
+
-----------------------------------------------------------
|
19501
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19502
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19503
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
19504
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
19505
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19506
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19507
|
+
[1m[35m (0.0ms)[0m commit transaction
|
19508
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.8ms)
|
19509
|
+
Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.1ms)
|
19510
|
+
---------------------------------------------------
|
19511
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
19512
|
+
---------------------------------------------------
|
19513
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
19514
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19515
|
+
[1m[36mSQL (1.5ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
19516
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19517
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
19518
|
+
[1m[35m (0.8ms)[0m commit transaction
|
19519
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19520
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-04-27 19:42:32.957763"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-27 19:42:32.957763"]]
|
19521
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
19522
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
19523
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19524
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19525
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19526
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
|
19527
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19528
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
19529
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19530
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
19531
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19532
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19533
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19534
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19535
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
19536
|
+
-----------------------------------------------------------------------------------------
|
19537
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
19538
|
+
-----------------------------------------------------------------------------------------
|
19539
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
19540
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19541
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
19542
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19543
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
19544
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
19545
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
19546
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19547
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19548
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19549
|
+
[1m[35mClarkKent::ReportEmail Load (0.2ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 2]]
|
19550
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19551
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
19552
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19553
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
19554
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19555
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19556
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
19557
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
19558
|
+
[1m[36m (1.3ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
19559
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
19560
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_report_filters" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "filterable_id" integer, "filterable_type" varchar(255) DEFAULT 'ClarkKent::Report', "string" varchar(255) DEFAULT 'ClarkKent::Report', "filter_name" varchar(255), "filter_value" varchar(255), "type" varchar(255), "duration" varchar(255), "kind_of_day" varchar(255), "offset" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
19561
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
19562
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
19563
|
+
FROM sqlite_master
|
19564
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
19565
|
+
UNION ALL
|
19566
|
+
SELECT sql
|
19567
|
+
FROM sqlite_temp_master
|
19568
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
19569
|
+
[0m
|
19570
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
19571
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
19572
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
19573
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
19574
|
+
FROM sqlite_master
|
19575
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
19576
|
+
UNION ALL
|
19577
|
+
SELECT sql
|
19578
|
+
FROM sqlite_temp_master
|
19579
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
19580
|
+
[0m
|
19581
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
19582
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_user_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "report_email_id" integer) [0m
|
19583
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
19584
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
19585
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
19586
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
19587
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
19588
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
19589
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
19590
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
19591
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
19592
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
19593
|
+
[1m[35m (1.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
19594
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
19595
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19596
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-04-29 18:14:45.711957"], ["resource_type", "Order"], ["updated_at", "2015-04-29 18:14:45.711957"]]
|
19597
|
+
[1m[35m (0.7ms)[0m commit transaction
|
19598
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19599
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
19600
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
19601
|
+
[1m[35m (0.0ms)[0m begin transaction
|
19602
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "id"], ["column_order", 2], ["report_id", 1]]
|
19603
|
+
[1m[35m (0.7ms)[0m commit transaction
|
19604
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19605
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
19606
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19607
|
+
[1m[35m (0.0ms)[0m begin transaction
|
19608
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?)[0m [["column_name", "description"], ["column_order", 4], ["report_id", 1]]
|
19609
|
+
[1m[35m (0.7ms)[0m commit transaction
|
19610
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19611
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
19612
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
19613
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19614
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
19615
|
+
[1m[35m (0.8ms)[0m commit transaction
|
19616
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19617
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-04-29 18:14:45.764371"], ["description", "Guitar strings"], ["updated_at", "2015-04-29 18:14:45.764371"], ["user_id", 1]]
|
19618
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19619
|
+
-------------------------
|
19620
|
+
ClarkKentTest: test_truth
|
19621
|
+
-------------------------
|
19622
|
+
------------------------------------------------------------------------------------------------
|
19623
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
19624
|
+
------------------------------------------------------------------------------------------------
|
19625
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19626
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
19627
|
+
-----------------------------------------------------------
|
19628
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
19629
|
+
-----------------------------------------------------------
|
19630
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19631
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19632
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
19633
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
19634
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
19635
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19636
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-29 18:14:45.857419"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-29 18:14:45.857419"]]
|
19637
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19638
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (5.0ms)
|
19639
|
+
[1m[35mClarkKent::ReportFilter Load (0.2ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
19640
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (14.1ms)
|
19641
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
19642
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (3.2ms)
|
19643
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
19644
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (7.5ms)
|
19645
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (43.4ms)
|
19646
|
+
Completed 200 OK in 78ms (Views: 73.5ms | ActiveRecord: 2.2ms)
|
19647
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
19648
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
19649
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19650
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::Report"]]
|
19651
|
+
[1m[36mClarkKent::ReportColumn Load (0.0ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 2]]
|
19652
|
+
[1m[35mClarkKent::ReportEmail Load (0.0ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 2]]
|
19653
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 2]]
|
19654
|
+
[1m[35m (0.9ms)[0m commit transaction
|
19655
|
+
------------------------------------------------------------
|
19656
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
19657
|
+
------------------------------------------------------------
|
19658
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19659
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19660
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19661
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-29 18:14:45.946648"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-04-29 18:14:45.946648"]]
|
19662
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
19663
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
19664
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
19665
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
19666
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 3]]
|
19667
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19668
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 3], ["filterable_type", "ClarkKent::Report"]]
|
19669
|
+
[1m[35mClarkKent::ReportColumn Load (0.0ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 3]]
|
19670
|
+
[1m[36mClarkKent::ReportEmail Load (0.0ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 3]]
|
19671
|
+
[1m[35mSQL (0.2ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 3]]
|
19672
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
19673
|
+
Redirected to http://test.host/reports/reports
|
19674
|
+
Completed 302 Found in 6ms (ActiveRecord: 1.5ms)
|
19675
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
19676
|
+
------------------------------------------------------
|
19677
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
19678
|
+
------------------------------------------------------
|
19679
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19680
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19681
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
19682
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
19683
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19684
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.9ms)
|
19685
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19686
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.3ms)
|
19687
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
19688
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (1.4ms)
|
19689
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (3.5ms)
|
19690
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
19691
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
19692
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.4ms)
|
19693
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
19694
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
19695
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
19696
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (8.1ms)
|
19697
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ? [["report_id", 1]]
|
19698
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.1ms)
|
19699
|
+
Completed 200 OK in 15ms (Views: 14.0ms | ActiveRecord: 0.4ms)
|
19700
|
+
-------------------------------------------------------
|
19701
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
19702
|
+
-------------------------------------------------------
|
19703
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19704
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19705
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
19706
|
+
Parameters: {"current_user_id"=>"1"}
|
19707
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
19708
|
+
[1m[35mClarkKent::Report Exists (0.2ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
19709
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19710
|
+
[1m[35mClarkKent::Report Exists (0.1ms)[0m SELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1 [["sharing_scope_id", 1], ["sharing_scope_type", "Department"]]
|
19711
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
19712
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
19713
|
+
Completed 200 OK in 23ms (Views: 22.3ms | ActiveRecord: 0.8ms)
|
19714
|
+
-----------------------------------------------------
|
19715
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
19716
|
+
-----------------------------------------------------
|
19717
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19718
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19719
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
19720
|
+
Parameters: {"current_user_id"=>"1"}
|
19721
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
19722
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
19723
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (63.0ms)
|
19724
|
+
Completed 200 OK in 68ms (Views: 67.7ms | ActiveRecord: 0.2ms)
|
19725
|
+
---------------------------------------------------------
|
19726
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
19727
|
+
---------------------------------------------------------
|
19728
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19729
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19730
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19731
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
19732
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19733
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
19734
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19735
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19736
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19737
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
|
19738
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19739
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
19740
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.8ms)
|
19741
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
|
19742
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.6ms)
|
19743
|
+
Completed 200 OK in 23ms (Views: 16.1ms | ActiveRecord: 1.0ms)
|
19744
|
+
-----------------------------------------------------------------
|
19745
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
19746
|
+
-----------------------------------------------------------------
|
19747
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19748
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19749
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19750
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-04-29", "created_at_from"=>"2015-04-28", "id"=>"1"}
|
19751
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19752
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order[0m
|
19753
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19754
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19755
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19756
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19757
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19758
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
19759
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19760
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
19761
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.3ms)
|
19762
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
19763
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
19764
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count
|
19765
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.7ms)
|
19766
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order[0m [["report_id", 1]]
|
19767
|
+
[1m[35mOrder Load (0.1ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
19768
|
+
(SELECT u.name
|
19769
|
+
FROM users u
|
19770
|
+
WHERE u.id = orders.user_id)
|
19771
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0
|
19772
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19773
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19774
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19775
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19776
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (0.9ms)
|
19777
|
+
Completed 200 OK in 26ms (Views: 20.8ms | ActiveRecord: 1.7ms)
|
19778
|
+
--------------------------------------------------------------------
|
19779
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
19780
|
+
--------------------------------------------------------------------
|
19781
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19782
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19783
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
19784
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
19785
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = 1 ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19786
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" IN (1) ORDER BY clark_kent_report_columns.column_order
|
19787
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19788
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19789
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19790
|
+
[1m[35m (0.1ms)[0m SELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19791
|
+
[1m[36m (0.1ms)[0m [1mSELECT "clark_kent_report_filters"."filter_name" FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19792
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
19793
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
19794
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
19795
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.0ms)
|
19796
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
19797
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
19798
|
+
Completed 200 OK in 39ms (Views: 34.3ms | ActiveRecord: 0.8ms)
|
19799
|
+
-----------------------------------------------------------
|
19800
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
19801
|
+
-----------------------------------------------------------
|
19802
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19803
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
19804
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
19805
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
19806
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
19807
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
19808
|
+
[1m[35m (0.0ms)[0m commit transaction
|
19809
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.9ms)
|
19810
|
+
Completed 200 OK in 3ms (Views: 1.2ms | ActiveRecord: 0.2ms)
|
19811
|
+
---------------------------------------------------
|
19812
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
19813
|
+
---------------------------------------------------
|
19814
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
19815
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
19816
|
+
[1m[36mSQL (1.3ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
19817
|
+
[1m[35m (0.1ms)[0m begin transaction
|
19818
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
19819
|
+
[1m[35m (0.8ms)[0m commit transaction
|
19820
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19821
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_filters" ("created_at", "duration", "filter_name", "filterable_id", "filterable_type", "kind_of_day", "offset", "type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", "2015-04-29 18:14:46.201456"], ["duration", "week"], ["filter_name", "created_at"], ["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"], ["kind_of_day", "Monday"], ["offset", "this_week"], ["type", "ClarkKent::ReportDateFilter"], ["updated_at", "2015-04-29 18:14:46.201456"]]
|
19822
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
19823
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
19824
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19825
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19826
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19827
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 1]]
|
19828
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19829
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
19830
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19831
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::ReportEmail"]]
|
19832
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19833
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19834
|
+
[1m[36mClarkKent::ReportColumn Load (0.1ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19835
|
+
[1m[35mClarkKent::ReportColumn Load (0.2ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|
19836
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
19837
|
+
-----------------------------------------------------------------------------------------
|
19838
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
19839
|
+
-----------------------------------------------------------------------------------------
|
19840
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
19841
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1[0m
|
19842
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
19843
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
19844
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
19845
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
19846
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
19847
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19848
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19849
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
19850
|
+
[1m[35mClarkKent::ReportEmail Load (0.1ms)[0m SELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."id" = ? LIMIT 1 [["id", 2]]
|
19851
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
19852
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? ORDER BY clark_kent_report_columns.column_order [["report_id", 1]]
|
19853
|
+
[1m[36mClarkKent::ReportFilter Load (0.1ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ?[0m [["filterable_id", 1], ["filterable_type", "ClarkKent::Report"]]
|
19854
|
+
[1m[35mClarkKent::ReportFilter Load (0.1ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" WHERE "clark_kent_report_filters"."filterable_id" = ? AND "clark_kent_report_filters"."filterable_type" = ? [["filterable_id", 2], ["filterable_type", "ClarkKent::ReportEmail"]]
|
19855
|
+
[1m[36mClarkKent::ReportColumn Load (0.2ms)[0m [1mSELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1[0m [["report_id", 1]]
|
19856
|
+
[1m[35mClarkKent::ReportColumn Load (0.1ms)[0m SELECT "clark_kent_report_columns".* FROM "clark_kent_report_columns" WHERE "clark_kent_report_columns"."report_id" = ? AND (clark_kent_report_columns.report_sort is not NULL and clark_kent_report_columns.report_sort != '') ORDER BY clark_kent_report_columns.column_order LIMIT 1 [["report_id", 1]]
|