gov_uk_date_fields 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gov_uk_date_fields/form_fields.rb +5 -1
- data/lib/gov_uk_date_fields/version.rb +1 -1
- data/test/dummy/log/test.log +640 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ec9ca6a651be83cc6a6cf10b8e0262729f9ff72
|
4
|
+
data.tar.gz: 89390a34df913cb4b83e56145df959b65c6a4de6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 879582b734ad6e4f6f202a4950654c5c39d45798d68aa44ccb1ac6c6b54b95f29e9358a5b4d5c581d79c57f8e6155736bceb5ec4a0f82309da9dac3a01f94f97
|
7
|
+
data.tar.gz: 24e6f09eff12fbafaf828a8cbe094b7e00e4aa1f7599c78580efe6f0b9be87c5198695f00827f7da1a3b4932430b3d20732037c3aa4fc5a01bb437c6b856ee7c
|
@@ -177,13 +177,17 @@ module GovUkDateFields
|
|
177
177
|
end
|
178
178
|
|
179
179
|
def html_id(date_segment)
|
180
|
-
|
180
|
+
brackets2underscore(html_name(date_segment))
|
181
181
|
end
|
182
182
|
|
183
183
|
def html_name(date_segment)
|
184
184
|
"#{@object_name}[#{@attribute}#{DATE_SEGMENTS[date_segment]}]"
|
185
185
|
end
|
186
186
|
|
187
|
+
def brackets2underscore(string)
|
188
|
+
string.tr('[','_').tr(']', '_').gsub('__', '_').gsub(/_$/, '')
|
189
|
+
end
|
190
|
+
|
187
191
|
def field_options(value, id, name, placeholder, size)
|
188
192
|
{
|
189
193
|
value: value,
|
data/test/dummy/log/test.log
CHANGED
@@ -11295,3 +11295,643 @@ GovUkDateFields::FormDateTest: test_set_from_date_instantiates_a_nil_object_if_d
|
|
11295
11295
|
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_the_attribute_and_is_valid
|
11296
11296
|
-----------------------------------------------------------------------------------------
|
11297
11297
|
[1m[35m (0.1ms)[0m ROLLBACK
|
11298
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
11299
|
+
[1m[35m (0.2ms)[0m BEGIN
|
11300
|
+
--------------------------------------------------
|
11301
|
+
EmployeesControllerTest: test_should_show_employee
|
11302
|
+
--------------------------------------------------
|
11303
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11304
|
+
[1m[35mSQL (0.9ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:29:42.320754"], ["updated_at", "2016-04-12 10:29:42.320754"]]
|
11305
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11306
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11307
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:29:42.327231"], ["updated_at", "2016-04-12 10:29:42.327231"]]
|
11308
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11309
|
+
Processing by EmployeesController#show as HTML
|
11310
|
+
Parameters: {"id"=>"590"}
|
11311
|
+
[1m[36mEmployee Load (0.3ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["id", 590]]
|
11312
|
+
Rendered employees/show.html.erb within layouts/application (2.1ms)
|
11313
|
+
Completed 200 OK in 123ms (Views: 115.4ms | ActiveRecord: 0.3ms)
|
11314
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
11315
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11316
|
+
-----------------------------------------------------
|
11317
|
+
EmployeesControllerTest: test_should_destroy_employee
|
11318
|
+
-----------------------------------------------------
|
11319
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11320
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:29:42.456356"], ["updated_at", "2016-04-12 10:29:42.456356"]]
|
11321
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11322
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11323
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:29:42.457617"], ["updated_at", "2016-04-12 10:29:42.457617"]]
|
11324
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11325
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "employees"
|
11326
|
+
Processing by EmployeesController#destroy as HTML
|
11327
|
+
Parameters: {"id"=>"592"}
|
11328
|
+
[1m[36mEmployee Load (0.2ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["id", 592]]
|
11329
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11330
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "employees" WHERE "employees"."id" = $1[0m [["id", 592]]
|
11331
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11332
|
+
Redirected to http://test.host/employees
|
11333
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
|
11334
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
11335
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11336
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11337
|
+
----------------------------------------------------
|
11338
|
+
EmployeesControllerTest: test_should_update_employee
|
11339
|
+
----------------------------------------------------
|
11340
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11341
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:29:42.462860"], ["updated_at", "2016-04-12 10:29:42.462860"]]
|
11342
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11343
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11344
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:29:42.464199"], ["updated_at", "2016-04-12 10:29:42.464199"]]
|
11345
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11346
|
+
Processing by EmployeesController#update as HTML
|
11347
|
+
Parameters: {"employee"=>{"dob_dd"=>"1", "dob_mm"=>"11", "dob_yyyy"=>"1981", "joined_dd"=>"3", "joined_mm"=>"oct", "joined_yyyy"=>"2015", "name"=>"Ioannis Kole"}, "id"=>"594"}
|
11348
|
+
[1m[35mEmployee Load (0.2ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 594]]
|
11349
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11350
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "employees" SET "name" = $1, "dob" = $2, "joined" = $3, "updated_at" = $4 WHERE "employees"."id" = $5 [["name", "Ioannis Kole"], ["dob", "1981-11-01"], ["joined", "2015-10-03"], ["updated_at", "2016-04-12 10:29:42.467173"], ["id", 594]]
|
11351
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11352
|
+
Redirected to http://test.host/employees/594
|
11353
|
+
Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
|
11354
|
+
[1m[35mEmployee Load (0.1ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 594]]
|
11355
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11356
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11357
|
+
--------------------------------------------------------------
|
11358
|
+
EmployeesControllerTest: test_should_render_gov_uk_date_fields
|
11359
|
+
--------------------------------------------------------------
|
11360
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11361
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:29:42.471050"], ["updated_at", "2016-04-12 10:29:42.471050"]]
|
11362
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11363
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11364
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:29:42.472114"], ["updated_at", "2016-04-12 10:29:42.472114"]]
|
11365
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11366
|
+
Processing by EmployeesController#edit as HTML
|
11367
|
+
Parameters: {"id"=>"596"}
|
11368
|
+
[1m[36mEmployee Load (0.1ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["id", 596]]
|
11369
|
+
Rendered employees/_form.html.erb (13.1ms)
|
11370
|
+
Rendered employees/edit.html.erb within layouts/application (17.0ms)
|
11371
|
+
Completed 200 OK in 20ms (Views: 19.1ms | ActiveRecord: 0.1ms)
|
11372
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
11373
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11374
|
+
----------------------------------------------
|
11375
|
+
EmployeesControllerTest: test_should_get_index
|
11376
|
+
----------------------------------------------
|
11377
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11378
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:29:42.503312"], ["updated_at", "2016-04-12 10:29:42.503312"]]
|
11379
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11380
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11381
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:29:42.504588"], ["updated_at", "2016-04-12 10:29:42.504588"]]
|
11382
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11383
|
+
Processing by EmployeesController#index as HTML
|
11384
|
+
[1m[35mEmployee Load (0.2ms)[0m SELECT "employees".* FROM "employees"
|
11385
|
+
Rendered employees/index.html.erb within layouts/application (1.8ms)
|
11386
|
+
Completed 200 OK in 4ms (Views: 3.6ms | ActiveRecord: 0.2ms)
|
11387
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11388
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11389
|
+
----------------------------------------------------
|
11390
|
+
EmployeesControllerTest: test_should_create_employee
|
11391
|
+
----------------------------------------------------
|
11392
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11393
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:29:42.511117"], ["updated_at", "2016-04-12 10:29:42.511117"]]
|
11394
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11395
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11396
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:29:42.512280"], ["updated_at", "2016-04-12 10:29:42.512280"]]
|
11397
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11398
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
11399
|
+
Processing by EmployeesController#create as HTML
|
11400
|
+
Parameters: {"employee"=>{"dob_dd"=>"31", "dob_mm"=>"12", "dob_yyyy"=>"1965", "joined_dd"=>"4", "joined_mm"=>"mar", "joined_yyyy"=>"2015", "name"=>"Joe Blow"}}
|
11401
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11402
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Joe Blow"], ["dob", "1965-12-31"], ["joined", "2015-03-04"], ["created_at", "2016-04-12 10:29:42.515047"], ["updated_at", "2016-04-12 10:29:42.515047"]]
|
11403
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11404
|
+
Redirected to http://test.host/employees/602
|
11405
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
|
11406
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
11407
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "employees"
|
11408
|
+
[1m[36mEmployee Load (1.9ms)[0m [1mSELECT "employees".* FROM "employees" ORDER BY "employees"."id" DESC LIMIT 1[0m
|
11409
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11410
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11411
|
+
---------------------------------------------
|
11412
|
+
EmployeesControllerTest: test_should_get_edit
|
11413
|
+
---------------------------------------------
|
11414
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11415
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:29:42.520754"], ["updated_at", "2016-04-12 10:29:42.520754"]]
|
11416
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11417
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11418
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:29:42.521949"], ["updated_at", "2016-04-12 10:29:42.521949"]]
|
11419
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11420
|
+
Processing by EmployeesController#edit as HTML
|
11421
|
+
Parameters: {"id"=>"603"}
|
11422
|
+
[1m[35mEmployee Load (0.2ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 603]]
|
11423
|
+
Rendered employees/_form.html.erb (1.4ms)
|
11424
|
+
Rendered employees/edit.html.erb within layouts/application (1.6ms)
|
11425
|
+
Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.2ms)
|
11426
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11427
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11428
|
+
--------------------------------------------
|
11429
|
+
EmployeesControllerTest: test_should_get_new
|
11430
|
+
--------------------------------------------
|
11431
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11432
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:29:42.527611"], ["updated_at", "2016-04-12 10:29:42.527611"]]
|
11433
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11434
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11435
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:29:42.528697"], ["updated_at", "2016-04-12 10:29:42.528697"]]
|
11436
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11437
|
+
Processing by EmployeesController#new as HTML
|
11438
|
+
Rendered employees/_form.html.erb (2.6ms)
|
11439
|
+
Rendered employees/new.html.erb within layouts/application (3.5ms)
|
11440
|
+
Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.0ms)
|
11441
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11442
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11443
|
+
-------------------------------------------
|
11444
|
+
EmployeeTest: test_invalid_day_raises_error
|
11445
|
+
-------------------------------------------
|
11446
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11447
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11448
|
+
-----------------------------------------------------------------------
|
11449
|
+
EmployeeTest: test_that_we_can_assign_new_dates_to_the_form_date_object
|
11450
|
+
-----------------------------------------------------------------------
|
11451
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11452
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11453
|
+
----------------------------------------------------------------------------------------------
|
11454
|
+
EmployeeTest: test_no_argument_error_is_raised_if_parseable_string_is_assigned_to_a_date_field
|
11455
|
+
----------------------------------------------------------------------------------------------
|
11456
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11457
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11458
|
+
------------------------------------------------------------------------------------------
|
11459
|
+
EmployeeTest: test_employee_instance_has_form_date_instance_variables_for_each_gov_uk_date
|
11460
|
+
------------------------------------------------------------------------------------------
|
11461
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11462
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11463
|
+
--------------------------------------------
|
11464
|
+
EmployeeTest: test_nil_dates_raise_no_errors
|
11465
|
+
--------------------------------------------
|
11466
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11467
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11468
|
+
---------------------------------------------------------------------------------------------------------
|
11469
|
+
EmployeeTest: test_that_argument_error_is_raised_if_unparseable_string_object_is_assigned_to_a_date_field
|
11470
|
+
---------------------------------------------------------------------------------------------------------
|
11471
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11472
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11473
|
+
-----------------------------------------------------------------
|
11474
|
+
EmployeeTest: test_employee_class_responds_to_acts_as_gov_uk_date
|
11475
|
+
-----------------------------------------------------------------
|
11476
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11477
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11478
|
+
-------------------------------------------------------------------------------------------------------------------
|
11479
|
+
EmployeeTest: test_argument_error_is_raised_if_an_object_that_doesnt_respond_to_to_date_is_assigned_to_a_date_field
|
11480
|
+
-------------------------------------------------------------------------------------------------------------------
|
11481
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11482
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11483
|
+
---------------------------------------------------------------------
|
11484
|
+
EmployeeTest: test_createing_a_new_employee_with_valid_dates_is_valid
|
11485
|
+
---------------------------------------------------------------------
|
11486
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11487
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11488
|
+
-----------------------------------------------------------
|
11489
|
+
EmployeeTest: test_that_nil_can_be_assigned_to_a_date_field
|
11490
|
+
-----------------------------------------------------------
|
11491
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11492
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11493
|
+
-----------------------------------------------------------------------------------
|
11494
|
+
EmployeeTest: test_that_form_population_values_can_be_extracted_from_the_date_field
|
11495
|
+
-----------------------------------------------------------------------------------
|
11496
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11497
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11498
|
+
----------------------------------------------
|
11499
|
+
EmployeeTest: test_valid_dates_raise_no_errors
|
11500
|
+
----------------------------------------------
|
11501
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11502
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11503
|
+
---------------------------------------------------------------------
|
11504
|
+
EmployeeTest: test_updating_existing_record_with_valid_dates_is_valid
|
11505
|
+
---------------------------------------------------------------------
|
11506
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11507
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "John"], ["dob", "1963-08-13"], ["joined", "2014-04-21"], ["created_at", "2016-04-12 10:29:42.548288"], ["updated_at", "2016-04-12 10:29:42.548288"]]
|
11508
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11509
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11510
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "employees" SET "dob" = $1, "updated_at" = $2 WHERE "employees"."id" = $3[0m [["dob", "1965-05-17"], ["updated_at", "2016-04-12 10:29:42.549479"], ["id", 607]]
|
11511
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11512
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11513
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11514
|
+
------------------------------------------------------------------------
|
11515
|
+
EmployeeTest: test_creating_a_new_employee_with_invalid_dates_is_invalid
|
11516
|
+
------------------------------------------------------------------------
|
11517
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11518
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11519
|
+
--------------------------------------------------------------------------
|
11520
|
+
EmployeeTest: test_employee_has_class_variable_describing_all_gov_uk_dates
|
11521
|
+
--------------------------------------------------------------------------
|
11522
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11523
|
+
[1m[35m (0.0ms)[0m BEGIN
|
11524
|
+
-----------------------------------------------------------
|
11525
|
+
EmployeeTest: test_new_dates_can_be_populated_from_the_form
|
11526
|
+
-----------------------------------------------------------
|
11527
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11528
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11529
|
+
----------------------------------------------------------------------------------------------------------------
|
11530
|
+
EmployeeTest: test_that_the_calling_the_field_name_on_employee_will_return_the_date_part_of_the_form_date_object
|
11531
|
+
----------------------------------------------------------------------------------------------------------------
|
11532
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11533
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11534
|
+
-------------------------------------------------------------------------
|
11535
|
+
EmployeeTest: test_updating_existing_record_with_invalid_dates_is_invalid
|
11536
|
+
-------------------------------------------------------------------------
|
11537
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11538
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "John"], ["dob", "1963-08-13"], ["joined", "2014-04-21"], ["created_at", "2016-04-12 10:29:42.553568"], ["updated_at", "2016-04-12 10:29:42.553568"]]
|
11539
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11540
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
11541
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
11542
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11543
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11544
|
+
-------------------------------------
|
11545
|
+
GovUkDateFieldsTest: test_squash_html
|
11546
|
+
-------------------------------------
|
11547
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11548
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11549
|
+
-------------------------------------------------------
|
11550
|
+
GovUkDateFieldsTest: test_basic_output_without_fieldset
|
11551
|
+
-------------------------------------------------------
|
11552
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
11553
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11554
|
+
---------------------------------------------------------------
|
11555
|
+
GovUkDateFieldsTest: test_fieldset_with_error_class_and_message
|
11556
|
+
---------------------------------------------------------------
|
11557
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
11558
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11559
|
+
-------------------------------------------------------------
|
11560
|
+
GovUkDateFieldsTest: test_placeholder_output_without_fieldset
|
11561
|
+
-------------------------------------------------------------
|
11562
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11563
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11564
|
+
-----------------------------------------------------------
|
11565
|
+
GovUkDateFieldsTest: test_fieldset_output_with_legend_class
|
11566
|
+
-----------------------------------------------------------
|
11567
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11568
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11569
|
+
---------------------------------------------------------------
|
11570
|
+
GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
|
11571
|
+
---------------------------------------------------------------
|
11572
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11573
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
11574
|
+
------------------------------------------
|
11575
|
+
GovUkDateFieldsTest: test_fieldset_with_id
|
11576
|
+
------------------------------------------
|
11577
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11578
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11579
|
+
--------------------------------------------------------
|
11580
|
+
GovUkDateFieldsTest: test_fieldset_output_with_form_hint
|
11581
|
+
--------------------------------------------------------
|
11582
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11583
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
11584
|
+
---------------------------------------------------------------------------------
|
11585
|
+
GovUkDateFields::FormDateTest: test_new_raises_error_if_called_from_outside_class
|
11586
|
+
---------------------------------------------------------------------------------
|
11587
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
11588
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11589
|
+
-----------------------------------------------------------------------------------------
|
11590
|
+
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_the_attribute_and_is_valid
|
11591
|
+
-----------------------------------------------------------------------------------------
|
11592
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11593
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11594
|
+
-------------------------------------------------------------------------------
|
11595
|
+
GovUkDateFields::FormDateTest: test_set_one_date_part_leaves_the_rest_unchanged
|
11596
|
+
-------------------------------------------------------------------------------
|
11597
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11598
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
11599
|
+
----------------------------------------------------------------------------------------------------------------------------------
|
11600
|
+
GovUkDateFields::FormDateTest: test_setting_date_parts_with_invalid_values_marks_date_as_invalid_and_leaves_date_variable_the_same
|
11601
|
+
----------------------------------------------------------------------------------------------------------------------------------
|
11602
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11603
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11604
|
+
-----------------------------------------------------------------------------------------------
|
11605
|
+
GovUkDateFields::FormDateTest: test_setting_all_date_parts_to_nil_sets_date_to_nil_and_is_valid
|
11606
|
+
-----------------------------------------------------------------------------------------------
|
11607
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11608
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
11609
|
+
------------------------------------------------------------------------------------------
|
11610
|
+
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_a_nil_object_if_date_is_nil
|
11611
|
+
------------------------------------------------------------------------------------------
|
11612
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11613
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11614
|
+
---------------------------------------------------------------------------------
|
11615
|
+
GovUkDateFields::FormDateTest: test_setting_all_three_date_parts_changes_the_date
|
11616
|
+
---------------------------------------------------------------------------------
|
11617
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11618
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
11619
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11620
|
+
-------------------------------------------------------------------------------
|
11621
|
+
GovUkDateFields::FormDateTest: test_set_one_date_part_leaves_the_rest_unchanged
|
11622
|
+
-------------------------------------------------------------------------------
|
11623
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11624
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11625
|
+
------------------------------------------------------------------------------------------
|
11626
|
+
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_a_nil_object_if_date_is_nil
|
11627
|
+
------------------------------------------------------------------------------------------
|
11628
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11629
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11630
|
+
---------------------------------------------------------------------------------
|
11631
|
+
GovUkDateFields::FormDateTest: test_setting_all_three_date_parts_changes_the_date
|
11632
|
+
---------------------------------------------------------------------------------
|
11633
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11634
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11635
|
+
-----------------------------------------------------------------------------------------------
|
11636
|
+
GovUkDateFields::FormDateTest: test_setting_all_date_parts_to_nil_sets_date_to_nil_and_is_valid
|
11637
|
+
-----------------------------------------------------------------------------------------------
|
11638
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11639
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11640
|
+
---------------------------------------------------------------------------------
|
11641
|
+
GovUkDateFields::FormDateTest: test_new_raises_error_if_called_from_outside_class
|
11642
|
+
---------------------------------------------------------------------------------
|
11643
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11644
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11645
|
+
-----------------------------------------------------------------------------------------
|
11646
|
+
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_the_attribute_and_is_valid
|
11647
|
+
-----------------------------------------------------------------------------------------
|
11648
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11649
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11650
|
+
----------------------------------------------------------------------------------------------------------------------------------
|
11651
|
+
GovUkDateFields::FormDateTest: test_setting_date_parts_with_invalid_values_marks_date_as_invalid_and_leaves_date_variable_the_same
|
11652
|
+
----------------------------------------------------------------------------------------------------------------------------------
|
11653
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11654
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11655
|
+
--------------------------------------------------------------
|
11656
|
+
EmployeesControllerTest: test_should_render_gov_uk_date_fields
|
11657
|
+
--------------------------------------------------------------
|
11658
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
11659
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:42:18.562983"], ["updated_at", "2016-04-12 10:42:18.562983"]]
|
11660
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11661
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11662
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:42:18.566379"], ["updated_at", "2016-04-12 10:42:18.566379"]]
|
11663
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11664
|
+
Processing by EmployeesController#edit as HTML
|
11665
|
+
Parameters: {"id"=>"609"}
|
11666
|
+
[1m[36mEmployee Load (0.2ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["id", 609]]
|
11667
|
+
Rendered employees/_form.html.erb (8.3ms)
|
11668
|
+
Rendered employees/edit.html.erb within layouts/application (10.9ms)
|
11669
|
+
Completed 200 OK in 122ms (Views: 118.4ms | ActiveRecord: 0.2ms)
|
11670
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
11671
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11672
|
+
-----------------------------------------------------
|
11673
|
+
EmployeesControllerTest: test_should_destroy_employee
|
11674
|
+
-----------------------------------------------------
|
11675
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11676
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:42:18.695057"], ["updated_at", "2016-04-12 10:42:18.695057"]]
|
11677
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11678
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11679
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:42:18.696245"], ["updated_at", "2016-04-12 10:42:18.696245"]]
|
11680
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11681
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "employees"
|
11682
|
+
Processing by EmployeesController#destroy as HTML
|
11683
|
+
Parameters: {"id"=>"611"}
|
11684
|
+
[1m[36mEmployee Load (0.1ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["id", 611]]
|
11685
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11686
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "employees" WHERE "employees"."id" = $1[0m [["id", 611]]
|
11687
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11688
|
+
Redirected to http://test.host/employees
|
11689
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.4ms)
|
11690
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
11691
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11692
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11693
|
+
----------------------------------------------------
|
11694
|
+
EmployeesControllerTest: test_should_update_employee
|
11695
|
+
----------------------------------------------------
|
11696
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11697
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:42:18.701922"], ["updated_at", "2016-04-12 10:42:18.701922"]]
|
11698
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11699
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11700
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:42:18.703424"], ["updated_at", "2016-04-12 10:42:18.703424"]]
|
11701
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11702
|
+
Processing by EmployeesController#update as HTML
|
11703
|
+
Parameters: {"employee"=>{"dob_dd"=>"1", "dob_mm"=>"11", "dob_yyyy"=>"1981", "joined_dd"=>"3", "joined_mm"=>"oct", "joined_yyyy"=>"2015", "name"=>"Ioannis Kole"}, "id"=>"613"}
|
11704
|
+
[1m[35mEmployee Load (0.2ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 613]]
|
11705
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11706
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "employees" SET "name" = $1, "dob" = $2, "joined" = $3, "updated_at" = $4 WHERE "employees"."id" = $5 [["name", "Ioannis Kole"], ["dob", "1981-11-01"], ["joined", "2015-10-03"], ["updated_at", "2016-04-12 10:42:18.706994"], ["id", 613]]
|
11707
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11708
|
+
Redirected to http://test.host/employees/613
|
11709
|
+
Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
|
11710
|
+
[1m[35mEmployee Load (0.1ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 613]]
|
11711
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11712
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11713
|
+
--------------------------------------------
|
11714
|
+
EmployeesControllerTest: test_should_get_new
|
11715
|
+
--------------------------------------------
|
11716
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11717
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:42:18.710800"], ["updated_at", "2016-04-12 10:42:18.710800"]]
|
11718
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11719
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11720
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:42:18.711775"], ["updated_at", "2016-04-12 10:42:18.711775"]]
|
11721
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11722
|
+
Processing by EmployeesController#new as HTML
|
11723
|
+
Rendered employees/_form.html.erb (1.4ms)
|
11724
|
+
Rendered employees/new.html.erb within layouts/application (1.9ms)
|
11725
|
+
Completed 200 OK in 4ms (Views: 3.4ms | ActiveRecord: 0.0ms)
|
11726
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11727
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11728
|
+
----------------------------------------------
|
11729
|
+
EmployeesControllerTest: test_should_get_index
|
11730
|
+
----------------------------------------------
|
11731
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11732
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:42:18.717718"], ["updated_at", "2016-04-12 10:42:18.717718"]]
|
11733
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11734
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11735
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:42:18.718797"], ["updated_at", "2016-04-12 10:42:18.718797"]]
|
11736
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11737
|
+
Processing by EmployeesController#index as HTML
|
11738
|
+
[1m[36mEmployee Load (0.2ms)[0m [1mSELECT "employees".* FROM "employees"[0m
|
11739
|
+
Rendered employees/index.html.erb within layouts/application (1.4ms)
|
11740
|
+
Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.2ms)
|
11741
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11742
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11743
|
+
---------------------------------------------
|
11744
|
+
EmployeesControllerTest: test_should_get_edit
|
11745
|
+
---------------------------------------------
|
11746
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11747
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:42:18.724191"], ["updated_at", "2016-04-12 10:42:18.724191"]]
|
11748
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11749
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11750
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:42:18.725221"], ["updated_at", "2016-04-12 10:42:18.725221"]]
|
11751
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11752
|
+
Processing by EmployeesController#edit as HTML
|
11753
|
+
Parameters: {"id"=>"619"}
|
11754
|
+
[1m[35mEmployee Load (0.2ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 619]]
|
11755
|
+
Rendered employees/_form.html.erb (1.4ms)
|
11756
|
+
Rendered employees/edit.html.erb within layouts/application (1.6ms)
|
11757
|
+
Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.2ms)
|
11758
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11759
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11760
|
+
--------------------------------------------------
|
11761
|
+
EmployeesControllerTest: test_should_show_employee
|
11762
|
+
--------------------------------------------------
|
11763
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11764
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:42:18.730658"], ["updated_at", "2016-04-12 10:42:18.730658"]]
|
11765
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11766
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11767
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:42:18.731885"], ["updated_at", "2016-04-12 10:42:18.731885"]]
|
11768
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11769
|
+
Processing by EmployeesController#show as HTML
|
11770
|
+
Parameters: {"id"=>"621"}
|
11771
|
+
[1m[36mEmployee Load (0.2ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["id", 621]]
|
11772
|
+
Rendered employees/show.html.erb within layouts/application (1.4ms)
|
11773
|
+
Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.2ms)
|
11774
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11775
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11776
|
+
----------------------------------------------------
|
11777
|
+
EmployeesControllerTest: test_should_create_employee
|
11778
|
+
----------------------------------------------------
|
11779
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11780
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "Stephen"], ["dob", "1963-08-13"], ["joined", "2014-04-01"], ["created_at", "2016-04-12 10:42:18.738046"], ["updated_at", "2016-04-12 10:42:18.738046"]]
|
11781
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11782
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11783
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Tony"], ["dob", "1965-05-17"], ["joined", "2014-05-21"], ["created_at", "2016-04-12 10:42:18.739164"], ["updated_at", "2016-04-12 10:42:18.739164"]]
|
11784
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11785
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "employees"
|
11786
|
+
Processing by EmployeesController#create as HTML
|
11787
|
+
Parameters: {"employee"=>{"dob_dd"=>"31", "dob_mm"=>"12", "dob_yyyy"=>"1965", "joined_dd"=>"4", "joined_mm"=>"mar", "joined_yyyy"=>"2015", "name"=>"Joe Blow"}}
|
11788
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11789
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "Joe Blow"], ["dob", "1965-12-31"], ["joined", "2015-03-04"], ["created_at", "2016-04-12 10:42:18.741667"], ["updated_at", "2016-04-12 10:42:18.741667"]]
|
11790
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11791
|
+
Redirected to http://test.host/employees/625
|
11792
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.2ms)
|
11793
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "employees"
|
11794
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
11795
|
+
[1m[35mEmployee Load (0.3ms)[0m SELECT "employees".* FROM "employees" ORDER BY "employees"."id" DESC LIMIT 1
|
11796
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11797
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11798
|
+
-------------------------------------------------------
|
11799
|
+
GovUkDateFieldsTest: test_basic_output_without_fieldset
|
11800
|
+
-------------------------------------------------------
|
11801
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11802
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11803
|
+
-------------------------------------------------------------
|
11804
|
+
GovUkDateFieldsTest: test_placeholder_output_without_fieldset
|
11805
|
+
-------------------------------------------------------------
|
11806
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11807
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11808
|
+
-------------------------------------
|
11809
|
+
GovUkDateFieldsTest: test_squash_html
|
11810
|
+
-------------------------------------
|
11811
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11812
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11813
|
+
---------------------------------------------------------------
|
11814
|
+
GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
|
11815
|
+
---------------------------------------------------------------
|
11816
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11817
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11818
|
+
--------------------------------------------------------
|
11819
|
+
GovUkDateFieldsTest: test_fieldset_output_with_form_hint
|
11820
|
+
--------------------------------------------------------
|
11821
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11822
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11823
|
+
-----------------------------------------------------------
|
11824
|
+
GovUkDateFieldsTest: test_fieldset_output_with_legend_class
|
11825
|
+
-----------------------------------------------------------
|
11826
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11827
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11828
|
+
------------------------------------------
|
11829
|
+
GovUkDateFieldsTest: test_fieldset_with_id
|
11830
|
+
------------------------------------------
|
11831
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11832
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11833
|
+
---------------------------------------------------------------
|
11834
|
+
GovUkDateFieldsTest: test_fieldset_with_error_class_and_message
|
11835
|
+
---------------------------------------------------------------
|
11836
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11837
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11838
|
+
------------------------------------------------------------------------
|
11839
|
+
EmployeeTest: test_creating_a_new_employee_with_invalid_dates_is_invalid
|
11840
|
+
------------------------------------------------------------------------
|
11841
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11842
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11843
|
+
------------------------------------------------------------------------------------------
|
11844
|
+
EmployeeTest: test_employee_instance_has_form_date_instance_variables_for_each_gov_uk_date
|
11845
|
+
------------------------------------------------------------------------------------------
|
11846
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11847
|
+
[1m[35m (0.0ms)[0m BEGIN
|
11848
|
+
---------------------------------------------------------------------
|
11849
|
+
EmployeeTest: test_createing_a_new_employee_with_valid_dates_is_valid
|
11850
|
+
---------------------------------------------------------------------
|
11851
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11852
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11853
|
+
---------------------------------------------------------------------------------------------------------
|
11854
|
+
EmployeeTest: test_that_argument_error_is_raised_if_unparseable_string_object_is_assigned_to_a_date_field
|
11855
|
+
---------------------------------------------------------------------------------------------------------
|
11856
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11857
|
+
[1m[35m (0.1ms)[0m BEGIN
|
11858
|
+
--------------------------------------------------------------------------
|
11859
|
+
EmployeeTest: test_employee_has_class_variable_describing_all_gov_uk_dates
|
11860
|
+
--------------------------------------------------------------------------
|
11861
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
11862
|
+
[1m[35m (0.0ms)[0m BEGIN
|
11863
|
+
-------------------------------------------------------------------------
|
11864
|
+
EmployeeTest: test_updating_existing_record_with_invalid_dates_is_invalid
|
11865
|
+
-------------------------------------------------------------------------
|
11866
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
11867
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["name", "John"], ["dob", "1963-08-13"], ["joined", "2014-04-21"], ["created_at", "2016-04-12 10:42:18.755954"], ["updated_at", "2016-04-12 10:42:18.755954"]]
|
11868
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11869
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
11870
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
11871
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11872
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11873
|
+
---------------------------------------------------------------------
|
11874
|
+
EmployeeTest: test_updating_existing_record_with_valid_dates_is_valid
|
11875
|
+
---------------------------------------------------------------------
|
11876
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
11877
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "employees" ("name", "dob", "joined", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["name", "John"], ["dob", "1963-08-13"], ["joined", "2014-04-21"], ["created_at", "2016-04-12 10:42:18.757863"], ["updated_at", "2016-04-12 10:42:18.757863"]]
|
11878
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
11879
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
11880
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "employees" SET "dob" = $1, "updated_at" = $2 WHERE "employees"."id" = $3 [["dob", "1965-05-17"], ["updated_at", "2016-04-12 10:42:18.758797"], ["id", 627]]
|
11881
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
11882
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11883
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11884
|
+
-----------------------------------------------------------------------
|
11885
|
+
EmployeeTest: test_that_we_can_assign_new_dates_to_the_form_date_object
|
11886
|
+
-----------------------------------------------------------------------
|
11887
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11888
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
11889
|
+
-------------------------------------------
|
11890
|
+
EmployeeTest: test_invalid_day_raises_error
|
11891
|
+
-------------------------------------------
|
11892
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11893
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11894
|
+
----------------------------------------------------------------------------------------------
|
11895
|
+
EmployeeTest: test_no_argument_error_is_raised_if_parseable_string_is_assigned_to_a_date_field
|
11896
|
+
----------------------------------------------------------------------------------------------
|
11897
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11898
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11899
|
+
-------------------------------------------------------------------------------------------------------------------
|
11900
|
+
EmployeeTest: test_argument_error_is_raised_if_an_object_that_doesnt_respond_to_to_date_is_assigned_to_a_date_field
|
11901
|
+
-------------------------------------------------------------------------------------------------------------------
|
11902
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11903
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11904
|
+
----------------------------------------------
|
11905
|
+
EmployeeTest: test_valid_dates_raise_no_errors
|
11906
|
+
----------------------------------------------
|
11907
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11908
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11909
|
+
-----------------------------------------------------------------
|
11910
|
+
EmployeeTest: test_employee_class_responds_to_acts_as_gov_uk_date
|
11911
|
+
-----------------------------------------------------------------
|
11912
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11913
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11914
|
+
-----------------------------------------------------------
|
11915
|
+
EmployeeTest: test_new_dates_can_be_populated_from_the_form
|
11916
|
+
-----------------------------------------------------------
|
11917
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11918
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11919
|
+
--------------------------------------------
|
11920
|
+
EmployeeTest: test_nil_dates_raise_no_errors
|
11921
|
+
--------------------------------------------
|
11922
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11923
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
11924
|
+
-----------------------------------------------------------
|
11925
|
+
EmployeeTest: test_that_nil_can_be_assigned_to_a_date_field
|
11926
|
+
-----------------------------------------------------------
|
11927
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11928
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11929
|
+
-----------------------------------------------------------------------------------
|
11930
|
+
EmployeeTest: test_that_form_population_values_can_be_extracted_from_the_date_field
|
11931
|
+
-----------------------------------------------------------------------------------
|
11932
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
11933
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
11934
|
+
----------------------------------------------------------------------------------------------------------------
|
11935
|
+
EmployeeTest: test_that_the_calling_the_field_name_on_employee_will_return_the_date_part_of_the_form_date_object
|
11936
|
+
----------------------------------------------------------------------------------------------------------------
|
11937
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gov_uk_date_fields
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Richards
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-04-
|
12
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|