clark_kent 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/clark_kent/application_helper.rb +2 -1
- data/app/models/clark_kent/report_date_filter.rb +1 -1
- data/app/models/clark_kent/report_email.rb +5 -2
- data/app/models/clark_kent/reportable.rb +3 -3
- data/lib/clark_kent.rb +13 -0
- data/lib/clark_kent/version.rb +1 -1
- data/test/controllers/clark_kent/reports_controller_test.rb +2 -2
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +2 -0
- data/test/dummy/log/test.log +2668 -0
- data/test/models/clark_kent/report_email_test.rb +35 -0
- data/test/support/db_utils.rb +2 -1
- data/test/test_helper.rb +3 -0
- metadata +18 -4
- data/test/dummy/tmp/pids/server.pid +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68fdd3c6dded98611b013feca6124cb6d5a6ed7f
|
4
|
+
data.tar.gz: 6ba358c6cc701e1b894fa182ce457056ba5d7581
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dab77b0a0aee17dbc8b019b56c709809154eef49aa46316679faa8ac8e666ae5238ee77ca5eb79e3d3b8fa2a6ef402c3565d1fad05e784313d450d7acabc5708
|
7
|
+
data.tar.gz: 15c803be1105a3fd758ad36654adf735eb4dbf641fabbe0d8ed266d294b364f9abd49cae65cd0f79426ac1f6abddd8bdbd15c00f4fd9d32a5619e25129a93a6a
|
@@ -34,7 +34,8 @@ module ClarkKent
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def display_for_value(value, column_name=nil)
|
37
|
-
|
37
|
+
##TODO, genericize this link display. link info must come from model config.
|
38
|
+
return link_to(value, main_app.edit_manage_reservation_path(value)) if column_name == 'reservation_id'
|
38
39
|
return value.join(', ') if value.is_a? Array
|
39
40
|
return value.to_formatted_s(:datepicker) if value.is_a? Date
|
40
41
|
return number_to_currency(value) if value.is_a? Float or value.is_a? BigDecimal or is_decimal?(value)
|
@@ -33,7 +33,7 @@ module ClarkKent
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def begin_date
|
36
|
-
@begin_date = Date.
|
36
|
+
@begin_date = Date.today
|
37
37
|
direction, period = self.period_offset
|
38
38
|
@begin_date = @begin_date.send(direction, 1.send(period)) if direction
|
39
39
|
@begin_date = @begin_date.find_day(self.day_offset) if self.day_offset
|
@@ -19,7 +19,6 @@ module ClarkKent
|
|
19
19
|
has_many :user_report_emails, dependent: :destroy
|
20
20
|
has_many :users, through: :user_report_emails
|
21
21
|
|
22
|
-
|
23
22
|
def self.send_emails_for_today
|
24
23
|
today = Date.ih_today
|
25
24
|
todays_filters = []
|
@@ -44,7 +43,11 @@ module ClarkKent
|
|
44
43
|
SharingScopeKind.custom.each do |sharing_scope_kind|
|
45
44
|
unless report.report_filters.map(&:filter_name).include? sharing_scope_kind.basic_association_id_collection_name.to_s
|
46
45
|
associations = sharing_scope_kind.associated_containers_for(user)
|
47
|
-
|
46
|
+
if associations.respond_to? :map
|
47
|
+
params[sharing_scope_kind.basic_association_id_collection_name] = associations.map(&:id)
|
48
|
+
else
|
49
|
+
params[sharing_scope_kind.basic_association_id_collection_name] = associations.id
|
50
|
+
end
|
48
51
|
end
|
49
52
|
end
|
50
53
|
report_download_url = ClarkKent::Report.send_report_to_s3(self.id, params)
|
@@ -16,12 +16,12 @@ module ClarkKent
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def required_date_params
|
19
|
-
self::REPORT_FILTER_OPTIONS.select{|rfo| rfo.in_required_date_group}.map{|rfo| rfo.filter_params}.flatten
|
19
|
+
self::REPORT_FILTER_OPTIONS.select{|rfo| rfo.in_required_date_group}.map{|rfo| rfo.filter_params}.flatten.map(&:to_sym)
|
20
20
|
end
|
21
21
|
|
22
22
|
def validate_params(params,report)
|
23
23
|
if required_date_params.any?
|
24
|
-
missing_params = required_date_params - params.select{|k,v| v.present? }.keys
|
24
|
+
missing_params = required_date_params - params.select{|k,v| v.present? }.symbolize_keys.keys
|
25
25
|
# a bit clunky, it only requires any 2 date filters. It would be better to require at least one pair of before/after filters
|
26
26
|
if missing_params.length > (required_date_params.length - 2)
|
27
27
|
raise ClarkKent::ReportFilterError.new("At least one date range is required.")
|
@@ -30,7 +30,6 @@ module ClarkKent
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def report(params,report,count = false)
|
33
|
-
validate_params(params, report)
|
34
33
|
@selects = []
|
35
34
|
@includes = []
|
36
35
|
@joins = []
|
@@ -67,6 +66,7 @@ module ClarkKent
|
|
67
66
|
else
|
68
67
|
params = report.report_filter_params.symbolize_keys!.merge(params.symbolize_keys)
|
69
68
|
end
|
69
|
+
validate_params(params, report)
|
70
70
|
params.each do |param_type,param_value|
|
71
71
|
if param_value.present?
|
72
72
|
arel_method_name = self.arel_method_for(param_type)
|
data/lib/clark_kent.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "clark_kent/engine"
|
2
2
|
require 'simple_form'
|
3
3
|
require 'thin_man'
|
4
|
+
require 'aws-sdk'
|
4
5
|
|
5
6
|
module ClarkKent
|
6
7
|
mattr_accessor :resource_options, :user_class_name, :other_sharing_scopes, :base_controller,
|
@@ -20,3 +21,15 @@ module ClarkKent
|
|
20
21
|
end
|
21
22
|
|
22
23
|
end
|
24
|
+
|
25
|
+
class Date
|
26
|
+
def find_day(day_name)
|
27
|
+
if Date::DAYNAMES.include?(day_name.capitalize)
|
28
|
+
week_start = self if [0,7].include? self.wday
|
29
|
+
week_start ||= (self.beginning_of_week - 1.day)
|
30
|
+
week_start + Date::DAYNAMES.index(day_name.capitalize)
|
31
|
+
else
|
32
|
+
self.send(day_name)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/clark_kent/version.rb
CHANGED
@@ -39,13 +39,13 @@ module ClarkKent
|
|
39
39
|
test "should show report results" do
|
40
40
|
get :show, id: @report, current_user_id: @current_user.id, run_report: true, created_at_until: Date.today, created_at_from: Date.yesterday
|
41
41
|
assert_response :success
|
42
|
-
|
42
|
+
@response.body.must_match 'Guitar strings'
|
43
43
|
end
|
44
44
|
|
45
45
|
test "should show report run errors" do
|
46
46
|
get :show, id: @report, current_user_id: @current_user.id, run_report: true
|
47
47
|
assert_response :success
|
48
|
-
|
48
|
+
@response.body.must_match 'At least one date range is required.'
|
49
49
|
end
|
50
50
|
|
51
51
|
test "should get edit" do
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -18071,3 +18071,5 @@ Started GET "/assets/clark_kent/application.js?body=1" for 127.0.0.1 at 2015-03-
|
|
18071
18071
|
FROM sqlite_temp_master
|
18072
18072
|
WHERE name='index_clark_kent_reports_on_sharing_scope_type' AND type='index'
|
18073
18073
|
|
18074
|
+
[1m[36mClarkKent::ReportFilter Load (0.5ms)[0m [1mSELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" ASC LIMIT 1[0m
|
18075
|
+
[1m[35mClarkKent::ReportFilter Load (0.3ms)[0m SELECT "clark_kent_report_filters".* FROM "clark_kent_report_filters" ORDER BY "clark_kent_report_filters"."id" DESC LIMIT 1
|
data/test/dummy/log/test.log
CHANGED
@@ -14135,3 +14135,2671 @@ Processing by ClarkKent::ReportsController#update as HTML
|
|
14135
14135
|
[1m[35m (0.0ms)[0m commit transaction
|
14136
14136
|
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.8ms)
|
14137
14137
|
Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.2ms)
|
14138
|
+
[1m[36m (1.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
|
14139
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14140
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14141
|
+
[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))
|
14142
|
+
[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
|
14143
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14144
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14145
|
+
FROM sqlite_master
|
14146
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14147
|
+
UNION ALL
|
14148
|
+
SELECT sql
|
14149
|
+
FROM sqlite_temp_master
|
14150
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14151
|
+
[0m
|
14152
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14153
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
14154
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14155
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14156
|
+
FROM sqlite_master
|
14157
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14158
|
+
UNION ALL
|
14159
|
+
SELECT sql
|
14160
|
+
FROM sqlite_temp_master
|
14161
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14162
|
+
[0m
|
14163
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14164
|
+
[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
|
14165
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14166
|
+
[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
|
14167
|
+
[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)
|
14168
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14169
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14170
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14171
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14172
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14173
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14174
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14175
|
+
[1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14176
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14177
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14178
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:09:38.877697"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:09:38.877697"]]
|
14179
|
+
[1m[35m (0.8ms)[0m commit transaction
|
14180
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14181
|
+
[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]]
|
14182
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14183
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14184
|
+
[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]]
|
14185
|
+
[1m[35m (0.6ms)[0m commit transaction
|
14186
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14187
|
+
[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]]
|
14188
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14189
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14190
|
+
[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]]
|
14191
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14192
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14193
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("email", "name") VALUES (?, ?) [["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14194
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14195
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14196
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?)[0m [["amount", 1], ["created_at", "2015-03-16 23:09:38.922528"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:09:38.922528"], ["user_id", 1]]
|
14197
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14198
|
+
-----------------------------------------------------------
|
14199
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
14200
|
+
-----------------------------------------------------------
|
14201
|
+
[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
|
14202
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
14203
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
14204
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
14205
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
14206
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14207
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-03-16 23:09:39.003332"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:09:39.003332"]]
|
14208
|
+
[1m[35m (0.8ms)[0m commit transaction
|
14209
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (5.5ms)
|
14210
|
+
[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"]]
|
14211
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (6.1ms)
|
14212
|
+
[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", 2]]
|
14213
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (3.0ms)
|
14214
|
+
[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]]
|
14215
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (6.9ms)
|
14216
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (32.1ms)
|
14217
|
+
Completed 200 OK in 63ms (Views: 56.0ms | ActiveRecord: 2.3ms)
|
14218
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
14219
|
+
[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
|
14220
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14221
|
+
[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"]]
|
14222
|
+
[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]]
|
14223
|
+
[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]]
|
14224
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
14225
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14226
|
+
------------------------------------------------------------
|
14227
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
14228
|
+
------------------------------------------------------------
|
14229
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
14230
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
14231
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14232
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-03-16 23:09:39.072683"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:09:39.072683"]]
|
14233
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14234
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
14235
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
14236
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
14237
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
14238
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14239
|
+
[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"]]
|
14240
|
+
[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]]
|
14241
|
+
[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]]
|
14242
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
14243
|
+
[1m[35m (0.6ms)[0m commit transaction
|
14244
|
+
Redirected to http://test.host/reports/reports
|
14245
|
+
Completed 302 Found in 4ms (ActiveRecord: 1.2ms)
|
14246
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
14247
|
+
------------------------------------------------------
|
14248
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
14249
|
+
------------------------------------------------------
|
14250
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
14251
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
14252
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
14253
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
14254
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
14255
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.7ms)
|
14256
|
+
[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"]]
|
14257
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.1ms)
|
14258
|
+
[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]]
|
14259
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.8ms)
|
14260
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.0ms)
|
14261
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
14262
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
14263
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
14264
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
14265
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
14266
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
14267
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (5.5ms)
|
14268
|
+
[1m[36mClarkKent::ReportEmail Load (0.1ms)[0m [1mSELECT "clark_kent_report_emails".* FROM "clark_kent_report_emails" WHERE "clark_kent_report_emails"."report_id" = ?[0m [["report_id", 1]]
|
14269
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (0.9ms)
|
14270
|
+
Completed 200 OK in 11ms (Views: 9.6ms | ActiveRecord: 0.3ms)
|
14271
|
+
-------------------------------------------------------
|
14272
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
14273
|
+
-------------------------------------------------------
|
14274
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
14275
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
14276
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
14277
|
+
Parameters: {"current_user_id"=>"1"}
|
14278
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
|
14279
|
+
[1m[36mClarkKent::Report Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" = ? AND "clark_kent_reports"."sharing_scope_type" = ? LIMIT 1[0m [["sharing_scope_id", 1], ["sharing_scope_type", "User"]]
|
14280
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
14281
|
+
[1m[36mClarkKent::Report Load (0.1ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
14282
|
+
Completed 200 OK in 17ms (Views: 16.3ms | ActiveRecord: 0.6ms)
|
14283
|
+
-----------------------------------------------------
|
14284
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
14285
|
+
-----------------------------------------------------
|
14286
|
+
[1m[35mClarkKent::Report Load (0.3ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
14287
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
14288
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
14289
|
+
Parameters: {"current_user_id"=>"1"}
|
14290
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
|
14291
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (61.3ms)
|
14292
|
+
Completed 200 OK in 65ms (Views: 64.3ms | ActiveRecord: 0.2ms)
|
14293
|
+
---------------------------------------------------------
|
14294
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
14295
|
+
---------------------------------------------------------
|
14296
|
+
[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
|
14297
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
14298
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
14299
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
14300
|
+
[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
|
14301
|
+
[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
|
14302
|
+
[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"]]
|
14303
|
+
[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"]]
|
14304
|
+
[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"]]
|
14305
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.8ms)
|
14306
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
14307
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
14308
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.6ms)
|
14309
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.4ms)
|
14310
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.5ms)
|
14311
|
+
Completed 200 OK in 18ms (Views: 11.8ms | ActiveRecord: 1.0ms)
|
14312
|
+
-----------------------------------------------------------------
|
14313
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
14314
|
+
-----------------------------------------------------------------
|
14315
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
14316
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
14317
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
14318
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-03-16", "created_at_from"=>"2015-03-15", "id"=>"1"}
|
14319
|
+
[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
|
14320
|
+
[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
|
14321
|
+
[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"]]
|
14322
|
+
[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]]
|
14323
|
+
[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"]]
|
14324
|
+
[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"]]
|
14325
|
+
[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"]]
|
14326
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
14327
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
14328
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
|
14329
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.9ms)
|
14330
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
14331
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
14332
|
+
[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
|
14333
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.0ms)
|
14334
|
+
[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]]
|
14335
|
+
[1m[35mOrder Load (0.1ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
14336
|
+
(SELECT u.name
|
14337
|
+
FROM users u
|
14338
|
+
WHERE u.id = orders.user_id)
|
14339
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0
|
14340
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (0.8ms)
|
14341
|
+
Completed 200 OK in 18ms (Views: 12.7ms | ActiveRecord: 1.4ms)
|
14342
|
+
--------------------------------------------------------------------
|
14343
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
14344
|
+
--------------------------------------------------------------------
|
14345
|
+
[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
|
14346
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
14347
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
14348
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
14349
|
+
[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
|
14350
|
+
[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
|
14351
|
+
[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", 1], ["filterable_type", "ClarkKent::Report"]]
|
14352
|
+
[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]]
|
14353
|
+
[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"]]
|
14354
|
+
[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"]]
|
14355
|
+
[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"]]
|
14356
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
14357
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
14358
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
14359
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.9ms)
|
14360
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
14361
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
|
14362
|
+
Completed 200 OK in 10ms (Views: 4.1ms | ActiveRecord: 1.2ms)
|
14363
|
+
-----------------------------------------------------------
|
14364
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
14365
|
+
-----------------------------------------------------------
|
14366
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
14367
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
14368
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
14369
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
14370
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
14371
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14372
|
+
[1m[35m (0.0ms)[0m commit transaction
|
14373
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.8ms)
|
14374
|
+
Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.1ms)
|
14375
|
+
-------------------------
|
14376
|
+
ClarkKentTest: test_truth
|
14377
|
+
-------------------------
|
14378
|
+
------------------------------------------------------------------------------------------------
|
14379
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
14380
|
+
------------------------------------------------------------------------------------------------
|
14381
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14382
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
14383
|
+
[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
|
14384
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14385
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14386
|
+
[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))
|
14387
|
+
[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
|
14388
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14389
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14390
|
+
FROM sqlite_master
|
14391
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14392
|
+
UNION ALL
|
14393
|
+
SELECT sql
|
14394
|
+
FROM sqlite_temp_master
|
14395
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14396
|
+
[0m
|
14397
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14398
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
14399
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14400
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14401
|
+
FROM sqlite_master
|
14402
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14403
|
+
UNION ALL
|
14404
|
+
SELECT sql
|
14405
|
+
FROM sqlite_temp_master
|
14406
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14407
|
+
[0m
|
14408
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14409
|
+
[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
|
14410
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14411
|
+
[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
|
14412
|
+
[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)
|
14413
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14414
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14415
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14416
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14417
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14418
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14419
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14420
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14421
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14422
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14423
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:19:25.429995"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:19:25.429995"]]
|
14424
|
+
[1m[35m (1.0ms)[0m commit transaction
|
14425
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14426
|
+
[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]]
|
14427
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
14428
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14429
|
+
[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]]
|
14430
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14431
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14432
|
+
[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]]
|
14433
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
14434
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14435
|
+
[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]]
|
14436
|
+
[1m[35m (0.9ms)[0m commit transaction
|
14437
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14438
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name") VALUES (?, ?) [["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14439
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
14440
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14441
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?)[0m [["amount", 1], ["created_at", "2015-03-16 23:19:25.475481"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:19:25.475481"], ["user_id", 1]]
|
14442
|
+
[1m[35m (1.0ms)[0m commit transaction
|
14443
|
+
-----------------------------------------------------------------------------------------
|
14444
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
14445
|
+
-----------------------------------------------------------------------------------------
|
14446
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
14447
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
14448
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14449
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
14450
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14451
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
14452
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
14453
|
+
[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"]]
|
14454
|
+
[1m[36m (2.1ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
14455
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14456
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14457
|
+
[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))
|
14458
|
+
[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
|
14459
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14460
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14461
|
+
FROM sqlite_master
|
14462
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14463
|
+
UNION ALL
|
14464
|
+
SELECT sql
|
14465
|
+
FROM sqlite_temp_master
|
14466
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14467
|
+
[0m
|
14468
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14469
|
+
[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
|
14470
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14471
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14472
|
+
FROM sqlite_master
|
14473
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14474
|
+
UNION ALL
|
14475
|
+
SELECT sql
|
14476
|
+
FROM sqlite_temp_master
|
14477
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14478
|
+
[0m
|
14479
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14480
|
+
[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
|
14481
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14482
|
+
[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
|
14483
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
14484
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14485
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14486
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14487
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14488
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14489
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14490
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14491
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14492
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14493
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14494
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:20:59.701593"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:20:59.701593"]]
|
14495
|
+
[1m[35m (1.0ms)[0m commit transaction
|
14496
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14497
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
14498
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14499
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14500
|
+
[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]]
|
14501
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14502
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14503
|
+
[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]]
|
14504
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14505
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14506
|
+
[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]]
|
14507
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14508
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14509
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name") VALUES (?, ?) [["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14510
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14511
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14512
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "departments" ("name") VALUES (?)[0m [["name", "silly walks"]]
|
14513
|
+
[1m[35m (1.0ms)[0m commit transaction
|
14514
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
14515
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14516
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14517
|
+
[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))
|
14518
|
+
[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
|
14519
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14520
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14521
|
+
FROM sqlite_master
|
14522
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14523
|
+
UNION ALL
|
14524
|
+
SELECT sql
|
14525
|
+
FROM sqlite_temp_master
|
14526
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14527
|
+
[0m
|
14528
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14529
|
+
[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
|
14530
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14531
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14532
|
+
FROM sqlite_master
|
14533
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14534
|
+
UNION ALL
|
14535
|
+
SELECT sql
|
14536
|
+
FROM sqlite_temp_master
|
14537
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14538
|
+
[0m
|
14539
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14540
|
+
[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
|
14541
|
+
[1m[35m (1.1ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14542
|
+
[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
|
14543
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
14544
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14545
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14546
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14547
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14548
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14549
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14550
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14551
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14552
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14553
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14554
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:22:36.726594"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:22:36.726594"]]
|
14555
|
+
[1m[35m (1.0ms)[0m commit transaction
|
14556
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14557
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
14558
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
14559
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14560
|
+
[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]]
|
14561
|
+
[1m[35m (0.9ms)[0m commit transaction
|
14562
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14563
|
+
[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]]
|
14564
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
14565
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14566
|
+
[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]]
|
14567
|
+
[1m[35m (0.9ms)[0m commit transaction
|
14568
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14569
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name") VALUES (?, ?) [["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14570
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
14571
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14572
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "departments" ("name") VALUES (?)[0m [["name", "silly walks"]]
|
14573
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14574
|
+
[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
|
14575
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14576
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14577
|
+
[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))
|
14578
|
+
[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
|
14579
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14580
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14581
|
+
FROM sqlite_master
|
14582
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14583
|
+
UNION ALL
|
14584
|
+
SELECT sql
|
14585
|
+
FROM sqlite_temp_master
|
14586
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14587
|
+
[0m
|
14588
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14589
|
+
[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
|
14590
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14591
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14592
|
+
FROM sqlite_master
|
14593
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14594
|
+
UNION ALL
|
14595
|
+
SELECT sql
|
14596
|
+
FROM sqlite_temp_master
|
14597
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14598
|
+
[0m
|
14599
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14600
|
+
[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
|
14601
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14602
|
+
[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
|
14603
|
+
[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)
|
14604
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14605
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14606
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14607
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14608
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14609
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14610
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14611
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14612
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14613
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14614
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:23:06.757109"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:23:06.757109"]]
|
14615
|
+
[1m[35m (1.1ms)[0m commit transaction
|
14616
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14617
|
+
[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]]
|
14618
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
14619
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14620
|
+
[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]]
|
14621
|
+
[1m[35m (0.9ms)[0m commit transaction
|
14622
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14623
|
+
[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]]
|
14624
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
14625
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14626
|
+
[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]]
|
14627
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14628
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14629
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name") VALUES (?, ?) [["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14630
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14631
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14632
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "departments" ("name") VALUES (?)[0m [["name", "silly walks"]]
|
14633
|
+
[1m[35m (0.9ms)[0m commit transaction
|
14634
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14635
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-16 23:23:06.809089"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:23:06.809089"], ["user_id", 1]]
|
14636
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14637
|
+
-----------------------------------------------------------------------------------------
|
14638
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
14639
|
+
-----------------------------------------------------------------------------------------
|
14640
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
14641
|
+
[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
|
14642
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = NULL WHERE "clark_kent_reports"."id" = 1
|
14643
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14644
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
14645
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
14646
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
14647
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
14648
|
+
[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"]]
|
14649
|
+
[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
|
14650
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14651
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14652
|
+
[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))
|
14653
|
+
[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
|
14654
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14655
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14656
|
+
FROM sqlite_master
|
14657
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14658
|
+
UNION ALL
|
14659
|
+
SELECT sql
|
14660
|
+
FROM sqlite_temp_master
|
14661
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14662
|
+
[0m
|
14663
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14664
|
+
[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
|
14665
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14666
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14667
|
+
FROM sqlite_master
|
14668
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14669
|
+
UNION ALL
|
14670
|
+
SELECT sql
|
14671
|
+
FROM sqlite_temp_master
|
14672
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14673
|
+
[0m
|
14674
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14675
|
+
[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
|
14676
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14677
|
+
[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
|
14678
|
+
[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)
|
14679
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14680
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14681
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14682
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14683
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14684
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14685
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14686
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14687
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14688
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14689
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:23:36.222380"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:23:36.222380"]]
|
14690
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14691
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14692
|
+
[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]]
|
14693
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14694
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14695
|
+
[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]]
|
14696
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14697
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14698
|
+
[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]]
|
14699
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14700
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14701
|
+
[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]]
|
14702
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14703
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14704
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name") VALUES (?, ?) [["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14705
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14706
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14707
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "departments" ("name") VALUES (?)[0m [["name", "silly walks"]]
|
14708
|
+
[1m[35m (0.8ms)[0m commit transaction
|
14709
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14710
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-16 23:23:36.269704"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:23:36.269704"], ["user_id", 1]]
|
14711
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14712
|
+
-----------------------------------------------------------------------------------------
|
14713
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
14714
|
+
-----------------------------------------------------------------------------------------
|
14715
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
14716
|
+
[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
|
14717
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = NULL WHERE "clark_kent_reports"."id" = 1
|
14718
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14719
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
14720
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14721
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
14722
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
14723
|
+
[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"]]
|
14724
|
+
[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
|
14725
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14726
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14727
|
+
[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))
|
14728
|
+
[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
|
14729
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14730
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14731
|
+
FROM sqlite_master
|
14732
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14733
|
+
UNION ALL
|
14734
|
+
SELECT sql
|
14735
|
+
FROM sqlite_temp_master
|
14736
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14737
|
+
[0m
|
14738
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14739
|
+
[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
|
14740
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14741
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14742
|
+
FROM sqlite_master
|
14743
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14744
|
+
UNION ALL
|
14745
|
+
SELECT sql
|
14746
|
+
FROM sqlite_temp_master
|
14747
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14748
|
+
[0m
|
14749
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14750
|
+
[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
|
14751
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14752
|
+
[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
|
14753
|
+
[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)
|
14754
|
+
[1m[36m (1.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14755
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14756
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14757
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14758
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14759
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14760
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14761
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14762
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14763
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14764
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:23:49.874083"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:23:49.874083"]]
|
14765
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14766
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14767
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
14768
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
14769
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14770
|
+
[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]]
|
14771
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14772
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14773
|
+
[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]]
|
14774
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14775
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14776
|
+
[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]]
|
14777
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14778
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14779
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("email", "name") VALUES (?, ?) [["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14780
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
14781
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14782
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "departments" ("name") VALUES (?)[0m [["name", "silly walks"]]
|
14783
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14784
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14785
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-16 23:23:49.922184"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:23:49.922184"], ["user_id", 1]]
|
14786
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
14787
|
+
-----------------------------------------------------------------------------------------
|
14788
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
14789
|
+
-----------------------------------------------------------------------------------------
|
14790
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
14791
|
+
[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
|
14792
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = NULL WHERE "clark_kent_reports"."id" = 1
|
14793
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14794
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
14795
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14796
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
14797
|
+
[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]]
|
14798
|
+
[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"]]
|
14799
|
+
[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
|
14800
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14801
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14802
|
+
[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))
|
14803
|
+
[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
|
14804
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14805
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14806
|
+
FROM sqlite_master
|
14807
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14808
|
+
UNION ALL
|
14809
|
+
SELECT sql
|
14810
|
+
FROM sqlite_temp_master
|
14811
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14812
|
+
[0m
|
14813
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14814
|
+
[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
|
14815
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14816
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14817
|
+
FROM sqlite_master
|
14818
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14819
|
+
UNION ALL
|
14820
|
+
SELECT sql
|
14821
|
+
FROM sqlite_temp_master
|
14822
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14823
|
+
[0m
|
14824
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14825
|
+
[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
|
14826
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14827
|
+
[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
|
14828
|
+
[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)
|
14829
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14830
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14831
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14832
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14833
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14834
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14835
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14836
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14837
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14838
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14839
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:24:11.247244"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:24:11.247244"]]
|
14840
|
+
[1m[35m (1.0ms)[0m commit transaction
|
14841
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14842
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
14843
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
14844
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14845
|
+
[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]]
|
14846
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14847
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14848
|
+
[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]]
|
14849
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14850
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14851
|
+
[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]]
|
14852
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14853
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14854
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("email", "name") VALUES (?, ?) [["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14855
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
14856
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14857
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "departments" ("name") VALUES (?)[0m [["name", "silly walks"]]
|
14858
|
+
[1m[35m (0.9ms)[0m commit transaction
|
14859
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14860
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-16 23:24:11.295599"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:24:11.295599"], ["user_id", 1]]
|
14861
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
14862
|
+
-----------------------------------------------------------------------------------------
|
14863
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
14864
|
+
-----------------------------------------------------------------------------------------
|
14865
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
14866
|
+
[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
|
14867
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = NULL WHERE "clark_kent_reports"."id" = 1
|
14868
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14869
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
14870
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14871
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
14872
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
14873
|
+
[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"]]
|
14874
|
+
[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
|
14875
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
14876
|
+
[1m[36m (0.9ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14877
|
+
[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))
|
14878
|
+
[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
|
14879
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14880
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14881
|
+
FROM sqlite_master
|
14882
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14883
|
+
UNION ALL
|
14884
|
+
SELECT sql
|
14885
|
+
FROM sqlite_temp_master
|
14886
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14887
|
+
[0m
|
14888
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14889
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
14890
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14891
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14892
|
+
FROM sqlite_master
|
14893
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14894
|
+
UNION ALL
|
14895
|
+
SELECT sql
|
14896
|
+
FROM sqlite_temp_master
|
14897
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14898
|
+
[0m
|
14899
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14900
|
+
[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
|
14901
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14902
|
+
[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
|
14903
|
+
[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)
|
14904
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14905
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14906
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14907
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14908
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14909
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14910
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14911
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14912
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14913
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14914
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:24:44.296222"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:24:44.296222"]]
|
14915
|
+
[1m[35m (0.8ms)[0m commit transaction
|
14916
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14917
|
+
[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]]
|
14918
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
14919
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14920
|
+
[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]]
|
14921
|
+
[1m[35m (0.9ms)[0m commit transaction
|
14922
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14923
|
+
[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]]
|
14924
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14925
|
+
[1m[35m (0.0ms)[0m begin transaction
|
14926
|
+
[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]]
|
14927
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14928
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14929
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
14930
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14931
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14932
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
14933
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14934
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14935
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-16 23:24:44.345441"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:24:44.345441"], ["user_id", 1]]
|
14936
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
14937
|
+
-----------------------------------------------------------------------------------------
|
14938
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
14939
|
+
-----------------------------------------------------------------------------------------
|
14940
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
14941
|
+
[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
|
14942
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
14943
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14944
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
14945
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
14946
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
14947
|
+
[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]]
|
14948
|
+
[1m[35mClarkKent::ReportFilter Load (0.3ms)[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"]]
|
14949
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
14950
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
14951
|
+
[1m[35m (0.2ms)[0m select sqlite_version(*)
|
14952
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
14953
|
+
[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))
|
14954
|
+
[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
|
14955
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
14956
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
14957
|
+
FROM sqlite_master
|
14958
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14959
|
+
UNION ALL
|
14960
|
+
SELECT sql
|
14961
|
+
FROM sqlite_temp_master
|
14962
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
14963
|
+
[0m
|
14964
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
14965
|
+
[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
|
14966
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
14967
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
14968
|
+
FROM sqlite_master
|
14969
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14970
|
+
UNION ALL
|
14971
|
+
SELECT sql
|
14972
|
+
FROM sqlite_temp_master
|
14973
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
14974
|
+
[0m
|
14975
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
14976
|
+
[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
|
14977
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
14978
|
+
[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
|
14979
|
+
[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)
|
14980
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
14981
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
14982
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
14983
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
14984
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
14985
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
14986
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
14987
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
14988
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
14989
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14990
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:26:16.741934"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:26:16.741934"]]
|
14991
|
+
[1m[35m (0.8ms)[0m commit transaction
|
14992
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14993
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
14994
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
14995
|
+
[1m[35m (0.1ms)[0m begin transaction
|
14996
|
+
[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]]
|
14997
|
+
[1m[35m (0.7ms)[0m commit transaction
|
14998
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
14999
|
+
[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]]
|
15000
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15001
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15002
|
+
[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]]
|
15003
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15004
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15005
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15006
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15007
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15008
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15009
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15010
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15011
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-16 23:26:16.785690"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:26:16.785690"], ["user_id", 1]]
|
15012
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15013
|
+
-----------------------------------------------------------------------------------------
|
15014
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15015
|
+
-----------------------------------------------------------------------------------------
|
15016
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15017
|
+
[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
|
15018
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15019
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15020
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15021
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15022
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
15023
|
+
[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]]
|
15024
|
+
[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"]]
|
15025
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
15026
|
+
[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", 1]]
|
15027
|
+
[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]]
|
15028
|
+
[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]]
|
15029
|
+
[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"]]
|
15030
|
+
[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"]]
|
15031
|
+
[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]]
|
15032
|
+
[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]]
|
15033
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
15034
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15035
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15036
|
+
[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))
|
15037
|
+
[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
|
15038
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15039
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
15040
|
+
FROM sqlite_master
|
15041
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15042
|
+
UNION ALL
|
15043
|
+
SELECT sql
|
15044
|
+
FROM sqlite_temp_master
|
15045
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15046
|
+
[0m
|
15047
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15048
|
+
[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
|
15049
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15050
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15051
|
+
FROM sqlite_master
|
15052
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15053
|
+
UNION ALL
|
15054
|
+
SELECT sql
|
15055
|
+
FROM sqlite_temp_master
|
15056
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15057
|
+
[0m
|
15058
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15059
|
+
[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
|
15060
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15061
|
+
[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
|
15062
|
+
[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)
|
15063
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15064
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15065
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15066
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15067
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15068
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15069
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15070
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15071
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15072
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15073
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-16 23:34:19.324339"], ["resource_type", "Order"], ["updated_at", "2015-03-16 23:34:19.324339"]]
|
15074
|
+
[1m[35m (1.0ms)[0m commit transaction
|
15075
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15076
|
+
[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]]
|
15077
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
15078
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15079
|
+
[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]]
|
15080
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15081
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15082
|
+
[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]]
|
15083
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15084
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15085
|
+
[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]]
|
15086
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15087
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15088
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15089
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
15090
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15091
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15092
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15093
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15094
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-16 23:34:19.378951"], ["description", "Guitar strings"], ["updated_at", "2015-03-16 23:34:19.378951"], ["user_id", 1]]
|
15095
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15096
|
+
---------------------------------------------------
|
15097
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15098
|
+
---------------------------------------------------
|
15099
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15100
|
+
[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
|
15101
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15102
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15103
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15104
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15105
|
+
-----------------------------------------------------------------------------------------
|
15106
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15107
|
+
-----------------------------------------------------------------------------------------
|
15108
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15109
|
+
[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
|
15110
|
+
[1m[35mSQL (0.8ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15111
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15112
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15113
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15114
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
15115
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
15116
|
+
[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"]]
|
15117
|
+
[1m[36mDepartment Load (0.2ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
15118
|
+
[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]]
|
15119
|
+
[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]]
|
15120
|
+
[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]]
|
15121
|
+
[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"]]
|
15122
|
+
[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"]]
|
15123
|
+
[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]]
|
15124
|
+
[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]]
|
15125
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
15126
|
+
[1m[35m (0.5ms)[0m select sqlite_version(*)
|
15127
|
+
[1m[36m (1.4ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15128
|
+
[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))
|
15129
|
+
[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
|
15130
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15131
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15132
|
+
FROM sqlite_master
|
15133
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15134
|
+
UNION ALL
|
15135
|
+
SELECT sql
|
15136
|
+
FROM sqlite_temp_master
|
15137
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15138
|
+
[0m
|
15139
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15140
|
+
[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
|
15141
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15142
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15143
|
+
FROM sqlite_master
|
15144
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15145
|
+
UNION ALL
|
15146
|
+
SELECT sql
|
15147
|
+
FROM sqlite_temp_master
|
15148
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15149
|
+
[0m
|
15150
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15151
|
+
[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
|
15152
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15153
|
+
[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
|
15154
|
+
[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)
|
15155
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15156
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15157
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15158
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15159
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15160
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15161
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15162
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15163
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15164
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15165
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 13:14:00.328386"], ["resource_type", "Order"], ["updated_at", "2015-03-17 13:14:00.328386"]]
|
15166
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15167
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15168
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
15169
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15170
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15171
|
+
[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]]
|
15172
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15173
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15174
|
+
[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]]
|
15175
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15176
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15177
|
+
[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]]
|
15178
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15179
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15180
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15181
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15182
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15183
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15184
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15185
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15186
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 13:14:00.380920"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 13:14:00.380920"], ["user_id", 1]]
|
15187
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15188
|
+
---------------------------------------------------
|
15189
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15190
|
+
---------------------------------------------------
|
15191
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15192
|
+
[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
|
15193
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15194
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15195
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15196
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15197
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
15198
|
+
[1m[36mClarkKent::Report Load (0.2ms)[0m [1mSELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1[0m [["id", 1]]
|
15199
|
+
[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"]]
|
15200
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
15201
|
+
[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]]
|
15202
|
+
[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]]
|
15203
|
+
[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]]
|
15204
|
+
[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"]]
|
15205
|
+
[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"]]
|
15206
|
+
[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]]
|
15207
|
+
[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]]
|
15208
|
+
-----------------------------------------------------------------------------------------
|
15209
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15210
|
+
-----------------------------------------------------------------------------------------
|
15211
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
15212
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
15213
|
+
[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
|
15214
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15215
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
15216
|
+
[1m[35m (0.6ms)[0m commit transaction
|
15217
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15218
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15219
|
+
[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"]]
|
15220
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15221
|
+
[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]]
|
15222
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15223
|
+
[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]]
|
15224
|
+
[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"]]
|
15225
|
+
[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"]]
|
15226
|
+
[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]]
|
15227
|
+
[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]]
|
15228
|
+
[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
|
15229
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15230
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15231
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
15232
|
+
[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
|
15233
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15234
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15235
|
+
FROM sqlite_master
|
15236
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15237
|
+
UNION ALL
|
15238
|
+
SELECT sql
|
15239
|
+
FROM sqlite_temp_master
|
15240
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15241
|
+
[0m
|
15242
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15243
|
+
[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
|
15244
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15245
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15246
|
+
FROM sqlite_master
|
15247
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15248
|
+
UNION ALL
|
15249
|
+
SELECT sql
|
15250
|
+
FROM sqlite_temp_master
|
15251
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15252
|
+
[0m
|
15253
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15254
|
+
[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
|
15255
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15256
|
+
[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
|
15257
|
+
[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)
|
15258
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15259
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15260
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15261
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15262
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15263
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15264
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15265
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15266
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15267
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15268
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 13:21:39.244129"], ["resource_type", "Order"], ["updated_at", "2015-03-17 13:21:39.244129"]]
|
15269
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15270
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15271
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
15272
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15273
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15274
|
+
[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]]
|
15275
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15276
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15277
|
+
[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]]
|
15278
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15279
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15280
|
+
[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]]
|
15281
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15282
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15283
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15284
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15285
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15286
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15287
|
+
[1m[35m (0.9ms)[0m commit transaction
|
15288
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15289
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 13:21:39.290778"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 13:21:39.290778"], ["user_id", 1]]
|
15290
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15291
|
+
---------------------------------------------------
|
15292
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15293
|
+
---------------------------------------------------
|
15294
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15295
|
+
[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
|
15296
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15297
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15298
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15299
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15300
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15301
|
+
[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-03-17 13:21:39.334294"], ["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-03-17 13:21:39.334294"]]
|
15302
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15303
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15304
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15305
|
+
[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"]]
|
15306
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15307
|
+
[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]]
|
15308
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15309
|
+
[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]]
|
15310
|
+
[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"]]
|
15311
|
+
[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"]]
|
15312
|
+
-----------------------------------------------------------------------------------------
|
15313
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15314
|
+
-----------------------------------------------------------------------------------------
|
15315
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15316
|
+
[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
|
15317
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15318
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15319
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15320
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15321
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
15322
|
+
[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]]
|
15323
|
+
[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"]]
|
15324
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
15325
|
+
[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]]
|
15326
|
+
[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]]
|
15327
|
+
[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]]
|
15328
|
+
[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"]]
|
15329
|
+
[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"]]
|
15330
|
+
[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]]
|
15331
|
+
[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]]
|
15332
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
15333
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15334
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15335
|
+
[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))
|
15336
|
+
[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
|
15337
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15338
|
+
[1m[36m (0.2ms)[0m [1m SELECT sql
|
15339
|
+
FROM sqlite_master
|
15340
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15341
|
+
UNION ALL
|
15342
|
+
SELECT sql
|
15343
|
+
FROM sqlite_temp_master
|
15344
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15345
|
+
[0m
|
15346
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15347
|
+
[1m[36m (0.8ms)[0m [1mCREATE TABLE "clark_kent_reports" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_type" varchar(255), "sharing_scope_type" varchar(255), "sharing_scope_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
15348
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15349
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15350
|
+
FROM sqlite_master
|
15351
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15352
|
+
UNION ALL
|
15353
|
+
SELECT sql
|
15354
|
+
FROM sqlite_temp_master
|
15355
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15356
|
+
[0m
|
15357
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15358
|
+
[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
|
15359
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15360
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "orders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "amount" integer, "description" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
15361
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
15362
|
+
[1m[36m (4.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15363
|
+
[1m[35m (1.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15364
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15365
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15366
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15367
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15368
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15369
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15370
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15371
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15372
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 13:22:23.632678"], ["resource_type", "Order"], ["updated_at", "2015-03-17 13:22:23.632678"]]
|
15373
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15374
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15375
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
15376
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15377
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15378
|
+
[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]]
|
15379
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15380
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15381
|
+
[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]]
|
15382
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15383
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15384
|
+
[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]]
|
15385
|
+
[1m[35m (0.6ms)[0m commit transaction
|
15386
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15387
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15388
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15389
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15390
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15391
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15392
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15393
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 13:22:23.676440"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 13:22:23.676440"], ["user_id", 1]]
|
15394
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15395
|
+
---------------------------------------------------
|
15396
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15397
|
+
---------------------------------------------------
|
15398
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15399
|
+
[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
|
15400
|
+
[1m[35mSQL (0.9ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15401
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15402
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15403
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15404
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15405
|
+
[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-03-17 13:22:23.715364"], ["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-03-17 13:22:23.715364"]]
|
15406
|
+
[1m[35m (0.6ms)[0m commit transaction
|
15407
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15408
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15409
|
+
[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"]]
|
15410
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15411
|
+
[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]]
|
15412
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15413
|
+
[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]]
|
15414
|
+
[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"]]
|
15415
|
+
[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"]]
|
15416
|
+
-----------------------------------------------------------------------------------------
|
15417
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15418
|
+
-----------------------------------------------------------------------------------------
|
15419
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15420
|
+
[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
|
15421
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15422
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15423
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15424
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15425
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
15426
|
+
[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]]
|
15427
|
+
[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"]]
|
15428
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
15429
|
+
[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]]
|
15430
|
+
[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]]
|
15431
|
+
[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]]
|
15432
|
+
[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"]]
|
15433
|
+
[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"]]
|
15434
|
+
[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]]
|
15435
|
+
[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]]
|
15436
|
+
[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
|
15437
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15438
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15439
|
+
[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))
|
15440
|
+
[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
|
15441
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15442
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15443
|
+
FROM sqlite_master
|
15444
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15445
|
+
UNION ALL
|
15446
|
+
SELECT sql
|
15447
|
+
FROM sqlite_temp_master
|
15448
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15449
|
+
[0m
|
15450
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15451
|
+
[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
|
15452
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15453
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15454
|
+
FROM sqlite_master
|
15455
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15456
|
+
UNION ALL
|
15457
|
+
SELECT sql
|
15458
|
+
FROM sqlite_temp_master
|
15459
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15460
|
+
[0m
|
15461
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15462
|
+
[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
|
15463
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15464
|
+
[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
|
15465
|
+
[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)
|
15466
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15467
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15468
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15469
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15470
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15471
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15472
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15473
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15474
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15475
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15476
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 14:51:34.776268"], ["resource_type", "Order"], ["updated_at", "2015-03-17 14:51:34.776268"]]
|
15477
|
+
[1m[35m (1.0ms)[0m commit transaction
|
15478
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15479
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
15480
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15481
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15482
|
+
[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]]
|
15483
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15484
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15485
|
+
[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]]
|
15486
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15487
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15488
|
+
[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]]
|
15489
|
+
[1m[35m (0.6ms)[0m commit transaction
|
15490
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15491
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15492
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15493
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15494
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15495
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15496
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15497
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 14:51:34.824258"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 14:51:34.824258"], ["user_id", 1]]
|
15498
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15499
|
+
---------------------------------------------------
|
15500
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15501
|
+
---------------------------------------------------
|
15502
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15503
|
+
[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
|
15504
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15505
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15506
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15507
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15508
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15509
|
+
[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-03-17 14:51:34.873269"], ["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-03-17 14:51:34.873269"]]
|
15510
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15511
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15512
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15513
|
+
[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"]]
|
15514
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15515
|
+
[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]]
|
15516
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15517
|
+
[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]]
|
15518
|
+
[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"]]
|
15519
|
+
[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"]]
|
15520
|
+
[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]]
|
15521
|
+
[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]]
|
15522
|
+
[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]]
|
15523
|
+
[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]]
|
15524
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
15525
|
+
-----------------------------------------------------------------------------------------
|
15526
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15527
|
+
-----------------------------------------------------------------------------------------
|
15528
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
15529
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
15530
|
+
[1m[36mSQL (1.0ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
15531
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15532
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
15533
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15534
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15535
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15536
|
+
[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"]]
|
15537
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15538
|
+
[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]]
|
15539
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15540
|
+
[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]]
|
15541
|
+
[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"]]
|
15542
|
+
[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"]]
|
15543
|
+
[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]]
|
15544
|
+
[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]]
|
15545
|
+
[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
|
15546
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15547
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15548
|
+
[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))
|
15549
|
+
[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
|
15550
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15551
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15552
|
+
FROM sqlite_master
|
15553
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15554
|
+
UNION ALL
|
15555
|
+
SELECT sql
|
15556
|
+
FROM sqlite_temp_master
|
15557
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15558
|
+
[0m
|
15559
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15560
|
+
[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
|
15561
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15562
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15563
|
+
FROM sqlite_master
|
15564
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15565
|
+
UNION ALL
|
15566
|
+
SELECT sql
|
15567
|
+
FROM sqlite_temp_master
|
15568
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15569
|
+
[0m
|
15570
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15571
|
+
[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
|
15572
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15573
|
+
[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
|
15574
|
+
[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)
|
15575
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15576
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15577
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15578
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15579
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15580
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15581
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15582
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15583
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15584
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15585
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 15:18:50.832734"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:18:50.832734"]]
|
15586
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15587
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15588
|
+
[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]]
|
15589
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
15590
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15591
|
+
[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]]
|
15592
|
+
[1m[35m (0.9ms)[0m commit transaction
|
15593
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15594
|
+
[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]]
|
15595
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15596
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15597
|
+
[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]]
|
15598
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15599
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15600
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15601
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15602
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15603
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15604
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15605
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15606
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 15:18:50.885399"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 15:18:50.885399"], ["user_id", 1]]
|
15607
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15608
|
+
---------------------------------------------------
|
15609
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15610
|
+
---------------------------------------------------
|
15611
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15612
|
+
[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
|
15613
|
+
[1m[35mSQL (1.3ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15614
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15615
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15616
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15617
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15618
|
+
[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-03-17 15:18:50.935816"], ["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-03-17 15:18:50.935816"]]
|
15619
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15620
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15621
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15622
|
+
[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"]]
|
15623
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15624
|
+
[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]]
|
15625
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15626
|
+
[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]]
|
15627
|
+
[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"]]
|
15628
|
+
[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"]]
|
15629
|
+
[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]]
|
15630
|
+
[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]]
|
15631
|
+
[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]]
|
15632
|
+
[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]]
|
15633
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
15634
|
+
-----------------------------------------------------------------------------------------
|
15635
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15636
|
+
-----------------------------------------------------------------------------------------
|
15637
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
15638
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
15639
|
+
[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
|
15640
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15641
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
15642
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15643
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15644
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15645
|
+
[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"]]
|
15646
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15647
|
+
[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]]
|
15648
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15649
|
+
[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]]
|
15650
|
+
[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"]]
|
15651
|
+
[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"]]
|
15652
|
+
[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]]
|
15653
|
+
[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]]
|
15654
|
+
[1m[36m (2.0ms)[0m [1mCREATE TABLE "clark_kent_report_columns" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "column_name" varchar(255), "column_order" integer, "report_sort" varchar(255), "summary_method" varchar(255)) [0m
|
15655
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15656
|
+
[1m[36m (1.2ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15657
|
+
[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))
|
15658
|
+
[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
|
15659
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15660
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15661
|
+
FROM sqlite_master
|
15662
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15663
|
+
UNION ALL
|
15664
|
+
SELECT sql
|
15665
|
+
FROM sqlite_temp_master
|
15666
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15667
|
+
[0m
|
15668
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15669
|
+
[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
|
15670
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15671
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15672
|
+
FROM sqlite_master
|
15673
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15674
|
+
UNION ALL
|
15675
|
+
SELECT sql
|
15676
|
+
FROM sqlite_temp_master
|
15677
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15678
|
+
[0m
|
15679
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15680
|
+
[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
|
15681
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15682
|
+
[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
|
15683
|
+
[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)
|
15684
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15685
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15686
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15687
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15688
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15689
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15690
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15691
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15692
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15693
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15694
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 15:26:50.966611"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:26:50.966611"]]
|
15695
|
+
[1m[35m (1.0ms)[0m commit transaction
|
15696
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15697
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
15698
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15699
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15700
|
+
[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]]
|
15701
|
+
[1m[35m (0.9ms)[0m commit transaction
|
15702
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15703
|
+
[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]]
|
15704
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15705
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15706
|
+
[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]]
|
15707
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15708
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15709
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15710
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15711
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15712
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15713
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15714
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15715
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 15:26:51.013443"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 15:26:51.013443"], ["user_id", 1]]
|
15716
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15717
|
+
---------------------------------------------------
|
15718
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15719
|
+
---------------------------------------------------
|
15720
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15721
|
+
[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
|
15722
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15723
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15724
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15725
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
15726
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15727
|
+
[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-03-17 15:26:51.061469"], ["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-03-17 15:26:51.061469"]]
|
15728
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15729
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15730
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15731
|
+
[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"]]
|
15732
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15733
|
+
[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]]
|
15734
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15735
|
+
[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]]
|
15736
|
+
[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"]]
|
15737
|
+
[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"]]
|
15738
|
+
[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]]
|
15739
|
+
[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]]
|
15740
|
+
[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]]
|
15741
|
+
[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]]
|
15742
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
15743
|
+
-----------------------------------------------------------------------------------------
|
15744
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15745
|
+
-----------------------------------------------------------------------------------------
|
15746
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
15747
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
15748
|
+
[1m[36mSQL (1.0ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
15749
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15750
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
15751
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15752
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15753
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15754
|
+
[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"]]
|
15755
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15756
|
+
[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]]
|
15757
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15758
|
+
[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]]
|
15759
|
+
[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"]]
|
15760
|
+
[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"]]
|
15761
|
+
[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]]
|
15762
|
+
[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]]
|
15763
|
+
[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
|
15764
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15765
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15766
|
+
[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))
|
15767
|
+
[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
|
15768
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15769
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15770
|
+
FROM sqlite_master
|
15771
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15772
|
+
UNION ALL
|
15773
|
+
SELECT sql
|
15774
|
+
FROM sqlite_temp_master
|
15775
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15776
|
+
[0m
|
15777
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15778
|
+
[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
|
15779
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15780
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15781
|
+
FROM sqlite_master
|
15782
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15783
|
+
UNION ALL
|
15784
|
+
SELECT sql
|
15785
|
+
FROM sqlite_temp_master
|
15786
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15787
|
+
[0m
|
15788
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15789
|
+
[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
|
15790
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15791
|
+
[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
|
15792
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
15793
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15794
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15795
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15796
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15797
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15798
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15799
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15800
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15801
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15802
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15803
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 15:27:26.693307"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:27:26.693307"]]
|
15804
|
+
[1m[35m (1.0ms)[0m commit transaction
|
15805
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15806
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
15807
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15808
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15809
|
+
[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]]
|
15810
|
+
[1m[35m (0.9ms)[0m commit transaction
|
15811
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15812
|
+
[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]]
|
15813
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15814
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15815
|
+
[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]]
|
15816
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15817
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15818
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15819
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15820
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15821
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15822
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15823
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15824
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 15:27:26.744473"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 15:27:26.744473"], ["user_id", 1]]
|
15825
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
15826
|
+
---------------------------------------------------
|
15827
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15828
|
+
---------------------------------------------------
|
15829
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15830
|
+
[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
|
15831
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15832
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15833
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15834
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15835
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15836
|
+
[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-03-17 15:27:26.787407"], ["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-03-17 15:27:26.787407"]]
|
15837
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15838
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15839
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15840
|
+
[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"]]
|
15841
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15842
|
+
[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]]
|
15843
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15844
|
+
[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]]
|
15845
|
+
[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"]]
|
15846
|
+
[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"]]
|
15847
|
+
[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]]
|
15848
|
+
[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]]
|
15849
|
+
[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]]
|
15850
|
+
[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]]
|
15851
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
15852
|
+
-----------------------------------------------------------------------------------------
|
15853
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15854
|
+
-----------------------------------------------------------------------------------------
|
15855
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
15856
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
15857
|
+
[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
|
15858
|
+
[1m[35m (0.0ms)[0m begin transaction
|
15859
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
15860
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15861
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15862
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15863
|
+
[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"]]
|
15864
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15865
|
+
[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]]
|
15866
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15867
|
+
[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]]
|
15868
|
+
[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"]]
|
15869
|
+
[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"]]
|
15870
|
+
[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]]
|
15871
|
+
[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]]
|
15872
|
+
[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
|
15873
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15874
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15875
|
+
[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))
|
15876
|
+
[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
|
15877
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15878
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15879
|
+
FROM sqlite_master
|
15880
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15881
|
+
UNION ALL
|
15882
|
+
SELECT sql
|
15883
|
+
FROM sqlite_temp_master
|
15884
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15885
|
+
[0m
|
15886
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15887
|
+
[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
|
15888
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15889
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15890
|
+
FROM sqlite_master
|
15891
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15892
|
+
UNION ALL
|
15893
|
+
SELECT sql
|
15894
|
+
FROM sqlite_temp_master
|
15895
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
15896
|
+
[0m
|
15897
|
+
[1m[35m (0.8ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
15898
|
+
[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
|
15899
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
15900
|
+
[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
|
15901
|
+
[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)
|
15902
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
15903
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
15904
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
15905
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
15906
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
15907
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
15908
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
15909
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
15910
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
15911
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15912
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 15:31:24.157630"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:31:24.157630"]]
|
15913
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15914
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15915
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
15916
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15917
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15918
|
+
[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]]
|
15919
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15920
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15921
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "amount"], ["column_order", 3], ["report_id", 1]]
|
15922
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15923
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15924
|
+
[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]]
|
15925
|
+
[1m[35m (0.8ms)[0m commit transaction
|
15926
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
15927
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
15928
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
15929
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15930
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
15931
|
+
[1m[35m (0.9ms)[0m commit transaction
|
15932
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15933
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 15:31:24.208898"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 15:31:24.208898"], ["user_id", 1]]
|
15934
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
15935
|
+
---------------------------------------------------
|
15936
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
15937
|
+
---------------------------------------------------
|
15938
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
15939
|
+
[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
|
15940
|
+
[1m[35mSQL (1.3ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
15941
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
15942
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
15943
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
15944
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15945
|
+
[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-03-17 15:31:24.260562"], ["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-03-17 15:31:24.260562"]]
|
15946
|
+
[1m[35m (1.1ms)[0m commit transaction
|
15947
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15948
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15949
|
+
[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"]]
|
15950
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15951
|
+
[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]]
|
15952
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15953
|
+
[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]]
|
15954
|
+
[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"]]
|
15955
|
+
[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"]]
|
15956
|
+
[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]]
|
15957
|
+
[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]]
|
15958
|
+
[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]]
|
15959
|
+
[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]]
|
15960
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
15961
|
+
-----------------------------------------------------------------------------------------
|
15962
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
15963
|
+
-----------------------------------------------------------------------------------------
|
15964
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
15965
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
15966
|
+
[1m[36mSQL (1.0ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
15967
|
+
[1m[35m (0.1ms)[0m begin transaction
|
15968
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
15969
|
+
[1m[35m (0.7ms)[0m commit transaction
|
15970
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
15971
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15972
|
+
[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"]]
|
15973
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
15974
|
+
[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]]
|
15975
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
15976
|
+
[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]]
|
15977
|
+
[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"]]
|
15978
|
+
[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"]]
|
15979
|
+
[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]]
|
15980
|
+
[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]]
|
15981
|
+
[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
|
15982
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15983
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
15984
|
+
[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))
|
15985
|
+
[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
|
15986
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
15987
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15988
|
+
FROM sqlite_master
|
15989
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15990
|
+
UNION ALL
|
15991
|
+
SELECT sql
|
15992
|
+
FROM sqlite_temp_master
|
15993
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
15994
|
+
[0m
|
15995
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
15996
|
+
[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
|
15997
|
+
[1m[35m (1.0ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
15998
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
15999
|
+
FROM sqlite_master
|
16000
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16001
|
+
UNION ALL
|
16002
|
+
SELECT sql
|
16003
|
+
FROM sqlite_temp_master
|
16004
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16005
|
+
[0m
|
16006
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
16007
|
+
[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
|
16008
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
16009
|
+
[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
|
16010
|
+
[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)
|
16011
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
16012
|
+
[1m[35m (1.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
16013
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
16014
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
16015
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
16016
|
+
[1m[35m (0.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
16017
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
16018
|
+
[1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
16019
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
16020
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16021
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 15:31:55.954307"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:31:55.954307"]]
|
16022
|
+
[1m[35m (1.1ms)[0m commit transaction
|
16023
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16024
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
16025
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16026
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16027
|
+
[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]]
|
16028
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16029
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16030
|
+
[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]]
|
16031
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16032
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16033
|
+
[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]]
|
16034
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16035
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16036
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
16037
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16038
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16039
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
16040
|
+
[1m[35m (1.0ms)[0m commit transaction
|
16041
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16042
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 15:31:56.005366"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 15:31:56.005366"], ["user_id", 1]]
|
16043
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16044
|
+
---------------------------------------------------
|
16045
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
16046
|
+
---------------------------------------------------
|
16047
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
16048
|
+
[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
|
16049
|
+
[1m[35mSQL (1.1ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
16050
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16051
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
16052
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16053
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16054
|
+
[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-03-17 15:31:56.055152"], ["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-03-17 15:31:56.055152"]]
|
16055
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16056
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
16057
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16058
|
+
[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"]]
|
16059
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16060
|
+
[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]]
|
16061
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16062
|
+
[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]]
|
16063
|
+
[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"]]
|
16064
|
+
[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"]]
|
16065
|
+
[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]]
|
16066
|
+
[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]]
|
16067
|
+
[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]]
|
16068
|
+
[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]]
|
16069
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
16070
|
+
-----------------------------------------------------------------------------------------
|
16071
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
16072
|
+
-----------------------------------------------------------------------------------------
|
16073
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
16074
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16075
|
+
[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
|
16076
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16077
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
16078
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16079
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
16080
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16081
|
+
[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"]]
|
16082
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16083
|
+
[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]]
|
16084
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16085
|
+
[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]]
|
16086
|
+
[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"]]
|
16087
|
+
[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"]]
|
16088
|
+
[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]]
|
16089
|
+
[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]]
|
16090
|
+
[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
|
16091
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
16092
|
+
[1m[36m (1.1ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
16093
|
+
[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))
|
16094
|
+
[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
|
16095
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
16096
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
16097
|
+
FROM sqlite_master
|
16098
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
16099
|
+
UNION ALL
|
16100
|
+
SELECT sql
|
16101
|
+
FROM sqlite_temp_master
|
16102
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
16103
|
+
[0m
|
16104
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
16105
|
+
[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
|
16106
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
16107
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
16108
|
+
FROM sqlite_master
|
16109
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16110
|
+
UNION ALL
|
16111
|
+
SELECT sql
|
16112
|
+
FROM sqlite_temp_master
|
16113
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16114
|
+
[0m
|
16115
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
16116
|
+
[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
|
16117
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
16118
|
+
[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
|
16119
|
+
[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)
|
16120
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
16121
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
16122
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
16123
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
16124
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
16125
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
16126
|
+
[1m[36m (1.0ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
16127
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
16128
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
16129
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16130
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 15:32:07.315042"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:32:07.315042"]]
|
16131
|
+
[1m[35m (1.2ms)[0m commit transaction
|
16132
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16133
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
16134
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16135
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16136
|
+
[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]]
|
16137
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16138
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16139
|
+
[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]]
|
16140
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16141
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16142
|
+
[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]]
|
16143
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16144
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16145
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
16146
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16147
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16148
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
16149
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16150
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16151
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 15:32:07.363045"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 15:32:07.363045"], ["user_id", 1]]
|
16152
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16153
|
+
---------------------------------------------------
|
16154
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
16155
|
+
---------------------------------------------------
|
16156
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
16157
|
+
[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
|
16158
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
16159
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16160
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
16161
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16162
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16163
|
+
[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-03-17 15:32:07.406989"], ["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-03-17 15:32:07.406989"]]
|
16164
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16165
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
16166
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16167
|
+
[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"]]
|
16168
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16169
|
+
[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]]
|
16170
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16171
|
+
[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]]
|
16172
|
+
[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"]]
|
16173
|
+
[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"]]
|
16174
|
+
[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]]
|
16175
|
+
[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]]
|
16176
|
+
[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]]
|
16177
|
+
[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]]
|
16178
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
16179
|
+
-----------------------------------------------------------------------------------------
|
16180
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
16181
|
+
-----------------------------------------------------------------------------------------
|
16182
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
16183
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16184
|
+
[1m[36mSQL (1.0ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
16185
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16186
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
16187
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16188
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
16189
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16190
|
+
[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"]]
|
16191
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16192
|
+
[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]]
|
16193
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16194
|
+
[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]]
|
16195
|
+
[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"]]
|
16196
|
+
[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"]]
|
16197
|
+
[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]]
|
16198
|
+
[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]]
|
16199
|
+
[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
|
16200
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
16201
|
+
[1m[36m (1.0ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
16202
|
+
[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))
|
16203
|
+
[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
|
16204
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
16205
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
16206
|
+
FROM sqlite_master
|
16207
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
16208
|
+
UNION ALL
|
16209
|
+
SELECT sql
|
16210
|
+
FROM sqlite_temp_master
|
16211
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
16212
|
+
[0m
|
16213
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
16214
|
+
[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
|
16215
|
+
[1m[35m (1.2ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
16216
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
16217
|
+
FROM sqlite_master
|
16218
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16219
|
+
UNION ALL
|
16220
|
+
SELECT sql
|
16221
|
+
FROM sqlite_temp_master
|
16222
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16223
|
+
[0m
|
16224
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
16225
|
+
[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
|
16226
|
+
[1m[35m (0.8ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
16227
|
+
[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
|
16228
|
+
[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)
|
16229
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
16230
|
+
[1m[35m (0.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
16231
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
16232
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
16233
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
16234
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
16235
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
16236
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
16237
|
+
[1m[36m (0.7ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
16238
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16239
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 15:32:44.479231"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:32:44.479231"]]
|
16240
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16241
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16242
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
16243
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
16244
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16245
|
+
[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]]
|
16246
|
+
[1m[35m (0.9ms)[0m commit transaction
|
16247
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16248
|
+
[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]]
|
16249
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
16250
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16251
|
+
[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]]
|
16252
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16253
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16254
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
16255
|
+
[1m[36m (1.0ms)[0m [1mcommit transaction[0m
|
16256
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16257
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
16258
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16259
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16260
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 15:32:44.529718"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 15:32:44.529718"], ["user_id", 1]]
|
16261
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16262
|
+
------------------------------------------------------------------------------------------------
|
16263
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
16264
|
+
------------------------------------------------------------------------------------------------
|
16265
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16266
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
16267
|
+
---------------------------------------------------
|
16268
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
16269
|
+
---------------------------------------------------
|
16270
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
16271
|
+
[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
|
16272
|
+
[1m[35mSQL (1.2ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
16273
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16274
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
16275
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
16276
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16277
|
+
[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-03-17 15:32:44.623188"], ["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-03-17 15:32:44.623188"]]
|
16278
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16279
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
16280
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16281
|
+
[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"]]
|
16282
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16283
|
+
[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]]
|
16284
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16285
|
+
[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]]
|
16286
|
+
[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"]]
|
16287
|
+
[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"]]
|
16288
|
+
[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]]
|
16289
|
+
[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]]
|
16290
|
+
[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]]
|
16291
|
+
[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]]
|
16292
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
16293
|
+
-----------------------------------------------------------------------------------------
|
16294
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
16295
|
+
-----------------------------------------------------------------------------------------
|
16296
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
16297
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16298
|
+
[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
|
16299
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16300
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
16301
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16302
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 1]]
|
16303
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16304
|
+
[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"]]
|
16305
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16306
|
+
[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]]
|
16307
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16308
|
+
[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]]
|
16309
|
+
[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"]]
|
16310
|
+
[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"]]
|
16311
|
+
[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]]
|
16312
|
+
[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]]
|
16313
|
+
-------------------------
|
16314
|
+
ClarkKentTest: test_truth
|
16315
|
+
-------------------------
|
16316
|
+
-----------------------------------------------------------
|
16317
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
16318
|
+
-----------------------------------------------------------
|
16319
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16320
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16321
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
16322
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
16323
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1"}
|
16324
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16325
|
+
[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-03-17 15:32:44.734343"], ["name", "delete me"], ["resource_type", "Order"], ["sharing_scope_id", 1], ["sharing_scope_type", "Department"], ["updated_at", "2015-03-17 15:32:44.734343"]]
|
16326
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16327
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16328
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.9ms)
|
16329
|
+
[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"]]
|
16330
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (2.8ms)
|
16331
|
+
[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]]
|
16332
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (2.0ms)
|
16333
|
+
[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]]
|
16334
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.8ms)
|
16335
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (20.5ms)
|
16336
|
+
Completed 200 OK in 45ms (Views: 40.5ms | ActiveRecord: 1.8ms)
|
16337
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
16338
|
+
[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
|
16339
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16340
|
+
[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"]]
|
16341
|
+
[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]]
|
16342
|
+
[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]]
|
16343
|
+
[1m[35mSQL (0.3ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 2]]
|
16344
|
+
[1m[36m (0.9ms)[0m [1mcommit transaction[0m
|
16345
|
+
------------------------------------------------------------
|
16346
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
16347
|
+
------------------------------------------------------------
|
16348
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16349
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16350
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16351
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", "2015-03-17 15:32:44.786697"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:32:44.786697"]]
|
16352
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16353
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
16354
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
16355
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
16356
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 3]]
|
16357
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16358
|
+
[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"]]
|
16359
|
+
[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]]
|
16360
|
+
[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]]
|
16361
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 3]]
|
16362
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16363
|
+
Redirected to http://test.host/reports/reports
|
16364
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
|
16365
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
16366
|
+
------------------------------------------------------
|
16367
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
16368
|
+
------------------------------------------------------
|
16369
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16370
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16371
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
16372
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
16373
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16374
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
16375
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.6ms)
|
16376
|
+
[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"]]
|
16377
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.3ms)
|
16378
|
+
[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]]
|
16379
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.8ms)
|
16380
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.0ms)
|
16381
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
16382
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
16383
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
16384
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
16385
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
16386
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
16387
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (5.6ms)
|
16388
|
+
[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]]
|
16389
|
+
[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"]]
|
16390
|
+
[1m[35mUser Load (0.3ms)[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]]
|
16391
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (23.3ms)
|
16392
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (24.5ms)
|
16393
|
+
[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"]]
|
16394
|
+
[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]]
|
16395
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show.html.erb (2.9ms)
|
16396
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_show_wrapper.html.erb (3.1ms)
|
16397
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (29.9ms)
|
16398
|
+
Completed 200 OK in 41ms (Views: 38.8ms | ActiveRecord: 1.4ms)
|
16399
|
+
-------------------------------------------------------
|
16400
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
16401
|
+
-------------------------------------------------------
|
16402
|
+
[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
|
16403
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16404
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
16405
|
+
Parameters: {"current_user_id"=>"1"}
|
16406
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
16407
|
+
[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"]]
|
16408
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
16409
|
+
[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"]]
|
16410
|
+
[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"]]
|
16411
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
16412
|
+
Completed 200 OK in 13ms (Views: 11.9ms | ActiveRecord: 0.8ms)
|
16413
|
+
-----------------------------------------------------
|
16414
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
16415
|
+
-----------------------------------------------------
|
16416
|
+
[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
|
16417
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16418
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
16419
|
+
Parameters: {"current_user_id"=>"1"}
|
16420
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
16421
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16422
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (97.7ms)
|
16423
|
+
Completed 200 OK in 101ms (Views: 100.6ms | ActiveRecord: 0.3ms)
|
16424
|
+
---------------------------------------------------------
|
16425
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
16426
|
+
---------------------------------------------------------
|
16427
|
+
[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
|
16428
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16429
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
16430
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
16431
|
+
[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
|
16432
|
+
[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
|
16433
|
+
[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"]]
|
16434
|
+
[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"]]
|
16435
|
+
[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"]]
|
16436
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (1.0ms)
|
16437
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16438
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
16439
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.8ms)
|
16440
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.5ms)
|
16441
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.6ms)
|
16442
|
+
Completed 200 OK in 23ms (Views: 14.6ms | ActiveRecord: 1.1ms)
|
16443
|
+
-----------------------------------------------------------------
|
16444
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
16445
|
+
-----------------------------------------------------------------
|
16446
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16447
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16448
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
16449
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-03-17", "created_at_from"=>"2015-03-16", "id"=>"1"}
|
16450
|
+
[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
|
16451
|
+
[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
|
16452
|
+
[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"]]
|
16453
|
+
[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]]
|
16454
|
+
[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]]
|
16455
|
+
[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"]]
|
16456
|
+
[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"]]
|
16457
|
+
[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"]]
|
16458
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.4ms)
|
16459
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16460
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
16461
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.5ms)
|
16462
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.3ms)
|
16463
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "orders"
|
16464
|
+
[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
|
16465
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (6.2ms)
|
16466
|
+
[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]]
|
16467
|
+
[1m[36mOrder Load (0.1ms)[0m [1mSELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
16468
|
+
(SELECT u.name
|
16469
|
+
FROM users u
|
16470
|
+
WHERE u.id = orders.user_id)
|
16471
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0[0m
|
16472
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.0ms)
|
16473
|
+
Completed 200 OK in 26ms (Views: 19.6ms | ActiveRecord: 1.8ms)
|
16474
|
+
--------------------------------------------------------------------
|
16475
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
16476
|
+
--------------------------------------------------------------------
|
16477
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16478
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16479
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
16480
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
16481
|
+
[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
|
16482
|
+
[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
|
16483
|
+
[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"]]
|
16484
|
+
[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]]
|
16485
|
+
[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]]
|
16486
|
+
[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"]]
|
16487
|
+
[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"]]
|
16488
|
+
[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"]]
|
16489
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.2ms)
|
16490
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16491
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
16492
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (0.9ms)
|
16493
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
16494
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.0ms)
|
16495
|
+
Completed 200 OK in 9ms (Views: 4.1ms | ActiveRecord: 1.0ms)
|
16496
|
+
-----------------------------------------------------------
|
16497
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
16498
|
+
-----------------------------------------------------------
|
16499
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16500
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16501
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
16502
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>"1", "sharing_scope_type"=>"Department"}, "current_user_id"=>"1", "id"=>"1"}
|
16503
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16504
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16505
|
+
[1m[35m (0.0ms)[0m commit transaction
|
16506
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
16507
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.5ms)
|
16508
|
+
Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.2ms)
|
16509
|
+
[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
|
16510
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
16511
|
+
[1m[36m (1.3ms)[0m [1mCREATE INDEX "index_clark_kent_report_columns_on_report_id" ON "clark_kent_report_columns" ("report_id")[0m
|
16512
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "clark_kent_report_emails" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "report_id" integer, "when_to_send" varchar(255), "name" varchar(255))
|
16513
|
+
[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
|
16514
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_id" ON "clark_kent_report_filters" ("filterable_id")
|
16515
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
16516
|
+
FROM sqlite_master
|
16517
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
16518
|
+
UNION ALL
|
16519
|
+
SELECT sql
|
16520
|
+
FROM sqlite_temp_master
|
16521
|
+
WHERE name='index_clark_kent_report_filters_on_filterable_id' AND type='index'
|
16522
|
+
[0m
|
16523
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_report_filters_on_filterable_type" ON "clark_kent_report_filters" ("filterable_type")
|
16524
|
+
[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
|
16525
|
+
[1m[35m (1.1ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_id" ON "clark_kent_reports" ("sharing_scope_id")
|
16526
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
16527
|
+
FROM sqlite_master
|
16528
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16529
|
+
UNION ALL
|
16530
|
+
SELECT sql
|
16531
|
+
FROM sqlite_temp_master
|
16532
|
+
WHERE name='index_clark_kent_reports_on_sharing_scope_id' AND type='index'
|
16533
|
+
[0m
|
16534
|
+
[1m[35m (0.9ms)[0m CREATE INDEX "index_clark_kent_reports_on_sharing_scope_type" ON "clark_kent_reports" ("sharing_scope_type")
|
16535
|
+
[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
|
16536
|
+
[1m[35m (0.9ms)[0m CREATE TABLE "departments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255))
|
16537
|
+
[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
|
16538
|
+
[1m[35m (1.0ms)[0m CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "email" varchar(255), "age" integer, "department_id" integer)
|
16539
|
+
[1m[36m (1.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
16540
|
+
[1m[35m (0.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
16541
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
16542
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150313144015')
|
16543
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20131226170042')[0m
|
16544
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20131226170112')
|
16545
|
+
[1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20140114010048')[0m
|
16546
|
+
[1m[35m (0.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20140129051754')
|
16547
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150304233739')[0m
|
16548
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16549
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_reports" ("created_at", "resource_type", "updated_at") VALUES (?, ?, ?)[0m [["created_at", "2015-03-17 15:39:09.788514"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:39:09.788514"]]
|
16550
|
+
[1m[35m (1.1ms)[0m commit transaction
|
16551
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16552
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_report_columns" ("column_name", "column_order", "report_id") VALUES (?, ?, ?) [["column_name", "user_name"], ["column_order", 1], ["report_id", 1]]
|
16553
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16554
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16555
|
+
[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]]
|
16556
|
+
[1m[35m (0.6ms)[0m commit transaction
|
16557
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16558
|
+
[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]]
|
16559
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
16560
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16561
|
+
[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]]
|
16562
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16563
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16564
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "departments" ("name") VALUES (?) [["name", "silly walks"]]
|
16565
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16566
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16567
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("department_id", "email", "name") VALUES (?, ?, ?)[0m [["department_id", 1], ["email", "taproot@gmail.com"], ["name", "Michael Hedges"]]
|
16568
|
+
[1m[35m (0.8ms)[0m commit transaction
|
16569
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16570
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orders" ("amount", "created_at", "description", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?) [["amount", 1], ["created_at", "2015-03-17 15:39:09.833901"], ["description", "Guitar strings"], ["updated_at", "2015-03-17 15:39:09.833901"], ["user_id", 1]]
|
16571
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16572
|
+
-----------------------------------------------------------
|
16573
|
+
ClarkKent::ReportsControllerTest: test_should_create_report
|
16574
|
+
-----------------------------------------------------------
|
16575
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16576
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16577
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
16578
|
+
Processing by ClarkKent::ReportsController#create as HTML
|
16579
|
+
Parameters: {"report"=>{"name"=>"delete me", "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1"}
|
16580
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16581
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-03-17 15:39:09.896336"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:39:09.896336"]]
|
16582
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16583
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (3.6ms)
|
16584
|
+
[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"]]
|
16585
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (6.4ms)
|
16586
|
+
[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]]
|
16587
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (1.8ms)
|
16588
|
+
[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]]
|
16589
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (7.5ms)
|
16590
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/edit.html.erb within layouts/application (27.6ms)
|
16591
|
+
Completed 200 OK in 49ms (Views: 44.8ms | ActiveRecord: 2.1ms)
|
16592
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports"[0m
|
16593
|
+
[1m[35mClarkKent::Report Load (0.4ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."name" = 'delete me' LIMIT 1
|
16594
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16595
|
+
[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"]]
|
16596
|
+
[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]]
|
16597
|
+
[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]]
|
16598
|
+
[1m[36mSQL (0.3ms)[0m [1mDELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ?[0m [["id", 2]]
|
16599
|
+
[1m[35m (1.1ms)[0m commit transaction
|
16600
|
+
------------------------------------------------------------
|
16601
|
+
ClarkKent::ReportsControllerTest: test_should_destroy_report
|
16602
|
+
------------------------------------------------------------
|
16603
|
+
[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
|
16604
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16605
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16606
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "clark_kent_reports" ("created_at", "name", "resource_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-03-17 15:39:09.965438"], ["name", "delete me"], ["resource_type", "Order"], ["updated_at", "2015-03-17 15:39:09.965438"]]
|
16607
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16608
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
16609
|
+
Processing by ClarkKent::ReportsController#destroy as HTML
|
16610
|
+
Parameters: {"current_user_id"=>"1", "id"=>"3"}
|
16611
|
+
[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]]
|
16612
|
+
[1m[35m (0.0ms)[0m begin transaction
|
16613
|
+
[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"]]
|
16614
|
+
[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]]
|
16615
|
+
[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]]
|
16616
|
+
[1m[35mSQL (0.4ms)[0m DELETE FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? [["id", 3]]
|
16617
|
+
[1m[36m (0.8ms)[0m [1mcommit transaction[0m
|
16618
|
+
Redirected to http://test.host/reports/reports
|
16619
|
+
Completed 302 Found in 7ms (ActiveRecord: 1.6ms)
|
16620
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "clark_kent_reports"
|
16621
|
+
------------------------------------------------------
|
16622
|
+
ClarkKent::ReportsControllerTest: test_should_get_edit
|
16623
|
+
------------------------------------------------------
|
16624
|
+
[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
|
16625
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16626
|
+
Processing by ClarkKent::ReportsController#edit as HTML
|
16627
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
16628
|
+
[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]]
|
16629
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (0.8ms)
|
16630
|
+
[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"]]
|
16631
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_filters/_index.html.erb (1.2ms)
|
16632
|
+
[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]]
|
16633
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.8ms)
|
16634
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (2.1ms)
|
16635
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
16636
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
16637
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
16638
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.5ms)
|
16639
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show.html.erb (0.3ms)
|
16640
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_show_wrapper.html.erb (0.4ms)
|
16641
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_columns/_index.html.erb (6.2ms)
|
16642
|
+
[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]]
|
16643
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/report_emails/_index.html.erb (1.1ms)
|
16644
|
+
Completed 200 OK in 12ms (Views: 10.7ms | ActiveRecord: 0.4ms)
|
16645
|
+
-------------------------------------------------------
|
16646
|
+
ClarkKent::ReportsControllerTest: test_should_get_index
|
16647
|
+
-------------------------------------------------------
|
16648
|
+
[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
|
16649
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16650
|
+
Processing by ClarkKent::ReportsController#index as HTML
|
16651
|
+
Parameters: {"current_user_id"=>"1"}
|
16652
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
16653
|
+
[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"]]
|
16654
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
16655
|
+
[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"]]
|
16656
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL[0m
|
16657
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."sharing_scope_id" IS NULL
|
16658
|
+
Completed 200 OK in 17ms (Views: 16.1ms | ActiveRecord: 0.7ms)
|
16659
|
+
-----------------------------------------------------
|
16660
|
+
ClarkKent::ReportsControllerTest: test_should_get_new
|
16661
|
+
-----------------------------------------------------
|
16662
|
+
[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
|
16663
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16664
|
+
Processing by ClarkKent::ReportsController#new as HTML
|
16665
|
+
Parameters: {"current_user_id"=>"1"}
|
16666
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1[0m
|
16667
|
+
[1m[35mDepartment Load (0.1ms)[0m SELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1 [["id", 1]]
|
16668
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_edit.html.erb (45.1ms)
|
16669
|
+
Completed 200 OK in 49ms (Views: 48.1ms | ActiveRecord: 0.2ms)
|
16670
|
+
---------------------------------------------------------
|
16671
|
+
ClarkKent::ReportsControllerTest: test_should_show_report
|
16672
|
+
---------------------------------------------------------
|
16673
|
+
[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
|
16674
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16675
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
16676
|
+
Parameters: {"current_user_id"=>"1", "id"=>"1"}
|
16677
|
+
[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
|
16678
|
+
[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
|
16679
|
+
[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"]]
|
16680
|
+
[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"]]
|
16681
|
+
[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"]]
|
16682
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.9ms)
|
16683
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16684
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
16685
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.6ms)
|
16686
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.7ms)
|
16687
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.8ms)
|
16688
|
+
Completed 200 OK in 19ms (Views: 13.8ms | ActiveRecord: 1.1ms)
|
16689
|
+
-----------------------------------------------------------------
|
16690
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_results
|
16691
|
+
-----------------------------------------------------------------
|
16692
|
+
[1m[35mClarkKent::Report Load (0.2ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16693
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16694
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
16695
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "created_at_until"=>"2015-03-17", "created_at_from"=>"2015-03-16", "id"=>"1"}
|
16696
|
+
[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
|
16697
|
+
[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
|
16698
|
+
[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"]]
|
16699
|
+
[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]]
|
16700
|
+
[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"]]
|
16701
|
+
[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"]]
|
16702
|
+
[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"]]
|
16703
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.5ms)
|
16704
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16705
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users"
|
16706
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.8ms)
|
16707
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
16708
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
16709
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(count_column) FROM (SELECT "orders"."id" AS count_column FROM "orders" LIMIT 10 OFFSET 0) subquery_for_count
|
16710
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (4.8ms)
|
16711
|
+
[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]]
|
16712
|
+
[1m[35mOrder Load (0.1ms)[0m SELECT DISTINCT orders.id, orders.user_id, orders.amount, orders.description, orders.created_at, orders.updated_at,
|
16713
|
+
(SELECT u.name
|
16714
|
+
FROM users u
|
16715
|
+
WHERE u.id = orders.user_id)
|
16716
|
+
as user_name, NULL FROM "orders" LIMIT 10 OFFSET 0
|
16717
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_download_link.html.erb (1.0ms)
|
16718
|
+
Completed 200 OK in 22ms (Views: 15.6ms | ActiveRecord: 1.9ms)
|
16719
|
+
--------------------------------------------------------------------
|
16720
|
+
ClarkKent::ReportsControllerTest: test_should_show_report_run_errors
|
16721
|
+
--------------------------------------------------------------------
|
16722
|
+
[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
|
16723
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16724
|
+
Processing by ClarkKent::ReportsController#show as HTML
|
16725
|
+
Parameters: {"current_user_id"=>"1", "run_report"=>true, "id"=>"1"}
|
16726
|
+
[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
|
16727
|
+
[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
|
16728
|
+
[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"]]
|
16729
|
+
[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]]
|
16730
|
+
[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"]]
|
16731
|
+
[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"]]
|
16732
|
+
[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"]]
|
16733
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_date_filter.html.erb (0.3ms)
|
16734
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
|
16735
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
|
16736
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_object_filter.html.erb (1.2ms)
|
16737
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_string_filter.html.erb (0.1ms)
|
16738
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_print_report.html.erb (0.1ms)
|
16739
|
+
Completed 200 OK in 11ms (Views: 6.0ms | ActiveRecord: 1.0ms)
|
16740
|
+
-----------------------------------------------------------
|
16741
|
+
ClarkKent::ReportsControllerTest: test_should_update_report
|
16742
|
+
-----------------------------------------------------------
|
16743
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16744
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1[0m
|
16745
|
+
Processing by ClarkKent::ReportsController#update as HTML
|
16746
|
+
Parameters: {"report"=>{"name"=>nil, "resource_type"=>"Order", "sharing_scope_id"=>nil, "sharing_scope_type"=>nil}, "current_user_id"=>"1", "id"=>"1"}
|
16747
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" WHERE "clark_kent_reports"."id" = ? LIMIT 1 [["id", 1]]
|
16748
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16749
|
+
[1m[35m (0.1ms)[0m commit transaction
|
16750
|
+
Rendered /Users/eric/projects/clark_kent/app/views/clark_kent/reports/_show.html.erb (1.0ms)
|
16751
|
+
Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.3ms)
|
16752
|
+
-------------------------
|
16753
|
+
ClarkKentTest: test_truth
|
16754
|
+
-------------------------
|
16755
|
+
------------------------------------------------------------------------------------------------
|
16756
|
+
ClarkKent::ReportTest: test_can't_save_without_a_sharing_scope_id_if_the_sharing_scope_is_custom
|
16757
|
+
------------------------------------------------------------------------------------------------
|
16758
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16759
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
16760
|
+
---------------------------------------------------
|
16761
|
+
ClarkKent::ReportEmailTest: test_sends_report_to_s3
|
16762
|
+
---------------------------------------------------
|
16763
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1[0m
|
16764
|
+
[1m[35mClarkKent::Report Load (0.1ms)[0m SELECT "clark_kent_reports".* FROM "clark_kent_reports" ORDER BY "clark_kent_reports"."id" ASC LIMIT 1
|
16765
|
+
[1m[36mSQL (1.6ms)[0m [1mUPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1[0m
|
16766
|
+
[1m[35m (0.1ms)[0m begin transaction
|
16767
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?)[0m [["name", "test_emailer"], ["report_id", 1]]
|
16768
|
+
[1m[35m (0.7ms)[0m commit transaction
|
16769
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
16770
|
+
[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-03-17 15:39:10.162382"], ["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-03-17 15:39:10.162382"]]
|
16771
|
+
[1m[36m (1.1ms)[0m [1mcommit transaction[0m
|
16772
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
16773
|
+
[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]]
|
16774
|
+
[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"]]
|
16775
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
16776
|
+
[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]]
|
16777
|
+
[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]]
|
16778
|
+
[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]]
|
16779
|
+
[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"]]
|
16780
|
+
[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"]]
|
16781
|
+
[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]]
|
16782
|
+
[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]]
|
16783
|
+
[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]]
|
16784
|
+
[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]]
|
16785
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "orders"[0m
|
16786
|
+
-----------------------------------------------------------------------------------------
|
16787
|
+
ClarkKent::ReportEmailTest: test_throws_an_error_if_required_date_filters_are_not_present
|
16788
|
+
-----------------------------------------------------------------------------------------
|
16789
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = 'taproot@gmail.com' LIMIT 1
|
16790
|
+
[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
|
16791
|
+
[1m[35mSQL (1.0ms)[0m UPDATE "clark_kent_reports" SET "sharing_scope_type" = 'Department', "sharing_scope_id" = 1 WHERE "clark_kent_reports"."id" = 1
|
16792
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16793
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "clark_kent_report_emails" ("name", "report_id") VALUES (?, ?) [["name", "test_emailer"], ["report_id", 1]]
|
16794
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
16795
|
+
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
|
16796
|
+
[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]]
|
16797
|
+
[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"]]
|
16798
|
+
[1m[36mDepartment Load (0.1ms)[0m [1mSELECT "departments".* FROM "departments" WHERE "departments"."id" = ? LIMIT 1[0m [["id", 1]]
|
16799
|
+
[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]]
|
16800
|
+
[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]]
|
16801
|
+
[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]]
|
16802
|
+
[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"]]
|
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
|
+
[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
|
+
[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]]
|