gov_uk_date_fields 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 019c47dec540df18ad926d8f63d2cd303500a529
4
- data.tar.gz: 1fe179381218745ceb752a68b78cebbc07ec2abf
3
+ metadata.gz: 07a163ea32d226a6d6701a4bae4e24b91e661e31
4
+ data.tar.gz: eefab635e9be48c8f63879b0cc99cfdc5d80f6c8
5
5
  SHA512:
6
- metadata.gz: 7ed038d2457e55ddabf3989e99ec490ed818dfe67f11e8de564a17afeca394541d45311c7e42bfe914d7992245adb7f1a3d718e57cc5e5f5c3946c4d01576220
7
- data.tar.gz: 2c646bb53b4b2c762da3040cd83051878140655e58f7bd36e26d8ce48de7a2230d9c7f5caa4f49b3a0b99d2570ea75f50facdba41ef0fda06683f2444020d6b2
6
+ metadata.gz: 84d0f929da7981409695faeb61f28ab3d54547c34253b7e16af6e917c83feb3ea3476ef2299264b6126082dd46278486bdea0a6741975deb0d1783376ed1038c
7
+ data.tar.gz: ca9c139744901be51e91238f1b856f94b835bc422ca509f10972eac568c4e2beb6479750cf0fa5efb0476cd1edc47ae25c2d4d0876d47947b0ffca1ce72eca63
@@ -108,7 +108,7 @@ module GovUkDateFields
108
108
  %Q|
109
109
  <div class="form-group form-group-day">
110
110
  <label for="#{@attribute}-day">Day</label>
111
- <input class="form-control" id="#{@attribute}-day" name="#{@attribute}-day" type="number" pattern="[0-9]*" min="0" max="31" aria-describedby="#{@attribute}-hint" #{generate_day_value}>
111
+ <input class="form-control" id="#{html_name(:day)}" name="#{html_name(:day)}" type="number" pattern="[0-9]*" min="0" max="31" aria-describedby="#{@attribute}-hint" #{generate_day_value}>
112
112
  </div>
113
113
  |
114
114
  end
@@ -117,7 +117,7 @@ module GovUkDateFields
117
117
  %Q|
118
118
  <div class="form-group form-group-month">
119
119
  <label for="#{@attribute}-month">Month</label>
120
- <input class="form-control" id="#{@attribute}-month" name="#{@attribute}-month" type="number" pattern="[0-9]*" min="0" max="12" #{generate_month_value}>
120
+ <input class="form-control" id="#{html_name(:month)}" name="#{html_name(:month)}" type="number" pattern="[0-9]*" min="0" max="12" #{generate_month_value}>
121
121
  </div>
122
122
  |
123
123
  end
@@ -126,7 +126,7 @@ module GovUkDateFields
126
126
  %Q|
127
127
  <div class="form-group form-group-year">
128
128
  <label for="#{@attribute}-year">Year</label>
129
- <input class="form-control" id="#{@attribute}-year" name="#{@attribute}-year" type="number" pattern="[0-9]*" min="0" max="#{Date.today.year}" #{generate_year_value}>
129
+ <input class="form-control" id="#{html_name(:year)}" name="#{html_name(:year)}" type="number" pattern="[0-9]*" min="0" max="#{Date.today.year}" #{generate_year_value}>
130
130
  </div>
131
131
  |
132
132
  end
@@ -1,3 +1,3 @@
1
1
  module GovUkDateFields
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -5041,3 +5041,741 @@ GovUkDateFieldsTest: test_fieldset_output_with_legend_class
5041
5041
  GovUkDateFieldsTest: test_basic_output_without_fieldset
5042
5042
  -------------------------------------------------------
5043
5043
   (0.1ms) ROLLBACK
5044
+ ActiveRecord::SchemaMigration Load (1.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
5045
+  (0.2ms) BEGIN
5046
+ -------------------------------------
5047
+ GovUkDateFieldsTest: test_squash_html
5048
+ -------------------------------------
5049
+  (0.1ms) ROLLBACK
5050
+  (0.1ms) BEGIN
5051
+ ------------------------------------------
5052
+ GovUkDateFieldsTest: test_fieldset_with_id
5053
+ ------------------------------------------
5054
+  (0.1ms) ROLLBACK
5055
+  (0.1ms) BEGIN
5056
+ -----------------------------------------------------------
5057
+ GovUkDateFieldsTest: test_fieldset_output_with_legend_class
5058
+ -----------------------------------------------------------
5059
+  (0.1ms) ROLLBACK
5060
+  (0.1ms) BEGIN
5061
+ --------------------------------------------------------
5062
+ GovUkDateFieldsTest: test_fieldset_output_with_form_hint
5063
+ --------------------------------------------------------
5064
+  (0.1ms) ROLLBACK
5065
+  (0.1ms) BEGIN
5066
+ -------------------------------------------------------
5067
+ GovUkDateFieldsTest: test_basic_output_without_fieldset
5068
+ -------------------------------------------------------
5069
+  (0.2ms) ROLLBACK
5070
+  (0.1ms) BEGIN
5071
+ -------------------------------------------------------------
5072
+ GovUkDateFieldsTest: test_placeholder_output_without_fieldset
5073
+ -------------------------------------------------------------
5074
+  (0.1ms) ROLLBACK
5075
+  (0.1ms) BEGIN
5076
+ ---------------------------------------------------------------
5077
+ GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
5078
+ ---------------------------------------------------------------
5079
+  (0.1ms) ROLLBACK
5080
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
5081
+  (0.2ms) BEGIN
5082
+ ---------------------------------------------------------------------------------
5083
+ GovUkDateFields::FormDateTest: test_new_raises_error_if_called_from_outside_class
5084
+ ---------------------------------------------------------------------------------
5085
+  (0.1ms) ROLLBACK
5086
+  (0.1ms) BEGIN
5087
+ -----------------------------------------------------------------------------------------------
5088
+ GovUkDateFields::FormDateTest: test_setting_all_date_parts_to_nil_sets_date_to_nil_and_is_valid
5089
+ -----------------------------------------------------------------------------------------------
5090
+  (0.1ms) ROLLBACK
5091
+  (0.1ms) BEGIN
5092
+ ------------------------------------------------------------------------------------------
5093
+ GovUkDateFields::FormDateTest: test_set_from_date_instantiates_a_nil_object_if_date_is_nil
5094
+ ------------------------------------------------------------------------------------------
5095
+  (0.1ms) ROLLBACK
5096
+  (0.1ms) BEGIN
5097
+ -----------------------------------------------------------------------------------------
5098
+ GovUkDateFields::FormDateTest: test_set_from_date_instantiates_the_attribute_and_is_valid
5099
+ -----------------------------------------------------------------------------------------
5100
+  (0.1ms) ROLLBACK
5101
+  (0.1ms) BEGIN
5102
+ -------------------------------------------------------------------------------
5103
+ GovUkDateFields::FormDateTest: test_set_one_date_part_leaves_the_rest_unchanged
5104
+ -------------------------------------------------------------------------------
5105
+  (0.1ms) ROLLBACK
5106
+  (0.2ms) BEGIN
5107
+ ---------------------------------------------------------------------------------
5108
+ GovUkDateFields::FormDateTest: test_setting_all_three_date_parts_changes_the_date
5109
+ ---------------------------------------------------------------------------------
5110
+  (0.1ms) ROLLBACK
5111
+  (0.1ms) BEGIN
5112
+ ----------------------------------------------------------------------------------------------------------------------------------
5113
+ GovUkDateFields::FormDateTest: test_setting_date_parts_with_invalid_values_marks_date_as_invalid_and_leaves_date_variable_the_same
5114
+ ----------------------------------------------------------------------------------------------------------------------------------
5115
+  (0.1ms) ROLLBACK
5116
+  (0.1ms) BEGIN
5117
+ -------------------------------------
5118
+ GovUkDateFieldsTest: test_squash_html
5119
+ -------------------------------------
5120
+  (0.1ms) ROLLBACK
5121
+  (0.1ms) BEGIN
5122
+ --------------------------------------------------------
5123
+ GovUkDateFieldsTest: test_fieldset_output_with_form_hint
5124
+ --------------------------------------------------------
5125
+  (0.1ms) ROLLBACK
5126
+  (0.1ms) BEGIN
5127
+ ------------------------------------------
5128
+ GovUkDateFieldsTest: test_fieldset_with_id
5129
+ ------------------------------------------
5130
+  (0.1ms) ROLLBACK
5131
+  (0.1ms) BEGIN
5132
+ ---------------------------------------------------------------
5133
+ GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
5134
+ ---------------------------------------------------------------
5135
+  (0.1ms) ROLLBACK
5136
+  (0.1ms) BEGIN
5137
+ -------------------------------------------------------------
5138
+ GovUkDateFieldsTest: test_placeholder_output_without_fieldset
5139
+ -------------------------------------------------------------
5140
+  (0.1ms) ROLLBACK
5141
+  (0.1ms) BEGIN
5142
+ -----------------------------------------------------------
5143
+ GovUkDateFieldsTest: test_fieldset_output_with_legend_class
5144
+ -----------------------------------------------------------
5145
+  (0.1ms) ROLLBACK
5146
+  (0.1ms) BEGIN
5147
+ -------------------------------------------------------
5148
+ GovUkDateFieldsTest: test_basic_output_without_fieldset
5149
+ -------------------------------------------------------
5150
+  (0.1ms) ROLLBACK
5151
+  (0.1ms) BEGIN
5152
+ -----------------------------------------------------------
5153
+ EmployeeTest: test_that_nil_can_be_assigned_to_a_date_field
5154
+ -----------------------------------------------------------
5155
+  (0.1ms) ROLLBACK
5156
+  (0.1ms) BEGIN
5157
+ -------------------------------------------------------------------------
5158
+ EmployeeTest: test_updating_existing_record_with_invalid_dates_is_invalid
5159
+ -------------------------------------------------------------------------
5160
+  (0.1ms) SAVEPOINT active_record_1
5161
+ SQL (1.8ms) 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-01 13:00:09.907411"], ["updated_at", "2016-04-01 13:00:09.907411"]]
5162
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5163
+  (0.1ms) SAVEPOINT active_record_1
5164
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5165
+  (0.1ms) ROLLBACK
5166
+  (0.1ms) BEGIN
5167
+ ------------------------------------------------------------------------
5168
+ EmployeeTest: test_creating_a_new_employee_with_invalid_dates_is_invalid
5169
+ ------------------------------------------------------------------------
5170
+  (0.1ms) ROLLBACK
5171
+  (0.1ms) BEGIN
5172
+ -----------------------------------------------------------
5173
+ EmployeeTest: test_new_dates_can_be_populated_from_the_form
5174
+ -----------------------------------------------------------
5175
+  (0.1ms) ROLLBACK
5176
+  (0.1ms) BEGIN
5177
+ ----------------------------------------------------------------------------------------------
5178
+ EmployeeTest: test_no_argument_error_is_raised_if_parseable_string_is_assigned_to_a_date_field
5179
+ ----------------------------------------------------------------------------------------------
5180
+  (0.1ms) ROLLBACK
5181
+  (0.1ms) BEGIN
5182
+ -----------------------------------------------------------------
5183
+ EmployeeTest: test_employee_class_responds_to_acts_as_gov_uk_date
5184
+ -----------------------------------------------------------------
5185
+  (0.1ms) ROLLBACK
5186
+  (0.1ms) BEGIN
5187
+ -------------------------------------------------------------------------------------------------------------------
5188
+ EmployeeTest: test_argument_error_is_raised_if_an_object_that_doesnt_respond_to_to_date_is_assigned_to_a_date_field
5189
+ -------------------------------------------------------------------------------------------------------------------
5190
+  (0.1ms) ROLLBACK
5191
+  (0.1ms) BEGIN
5192
+ ------------------------------------------------------------------------------------------
5193
+ EmployeeTest: test_employee_instance_has_form_date_instance_variables_for_each_gov_uk_date
5194
+ ------------------------------------------------------------------------------------------
5195
+  (0.1ms) ROLLBACK
5196
+  (0.1ms) BEGIN
5197
+ -----------------------------------------------------------------------------------
5198
+ EmployeeTest: test_that_form_population_values_can_be_extracted_from_the_date_field
5199
+ -----------------------------------------------------------------------------------
5200
+  (0.1ms) ROLLBACK
5201
+  (0.1ms) BEGIN
5202
+ ----------------------------------------------
5203
+ EmployeeTest: test_valid_dates_raise_no_errors
5204
+ ----------------------------------------------
5205
+  (0.1ms) ROLLBACK
5206
+  (0.1ms) BEGIN
5207
+ ---------------------------------------------------------------------
5208
+ EmployeeTest: test_createing_a_new_employee_with_valid_dates_is_valid
5209
+ ---------------------------------------------------------------------
5210
+  (0.1ms) ROLLBACK
5211
+  (0.0ms) BEGIN
5212
+ ----------------------------------------------------------------------------------------------------------------
5213
+ EmployeeTest: test_that_the_calling_the_field_name_on_employee_will_return_the_date_part_of_the_form_date_object
5214
+ ----------------------------------------------------------------------------------------------------------------
5215
+  (0.1ms) ROLLBACK
5216
+  (0.1ms) BEGIN
5217
+ ---------------------------------------------------------------------------------------------------------
5218
+ EmployeeTest: test_that_argument_error_is_raised_if_unparseable_string_object_is_assigned_to_a_date_field
5219
+ ---------------------------------------------------------------------------------------------------------
5220
+  (0.1ms) ROLLBACK
5221
+  (0.1ms) BEGIN
5222
+ -------------------------------------------
5223
+ EmployeeTest: test_invalid_day_raises_error
5224
+ -------------------------------------------
5225
+  (0.1ms) ROLLBACK
5226
+  (0.1ms) BEGIN
5227
+ ---------------------------------------------------------------------
5228
+ EmployeeTest: test_updating_existing_record_with_valid_dates_is_valid
5229
+ ---------------------------------------------------------------------
5230
+  (0.1ms) SAVEPOINT active_record_1
5231
+ SQL (0.3ms) 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-01 13:00:09.926589"], ["updated_at", "2016-04-01 13:00:09.926589"]]
5232
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5233
+  (0.1ms) SAVEPOINT active_record_1
5234
+ SQL (0.3ms) UPDATE "employees" SET "dob" = $1, "updated_at" = $2 WHERE "employees"."id" = $3 [["dob", "1965-05-17"], ["updated_at", "2016-04-01 13:00:09.927836"], ["id", 249]]
5235
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5236
+  (0.1ms) ROLLBACK
5237
+  (0.1ms) BEGIN
5238
+ --------------------------------------------
5239
+ EmployeeTest: test_nil_dates_raise_no_errors
5240
+ --------------------------------------------
5241
+  (0.1ms) ROLLBACK
5242
+  (0.1ms) BEGIN
5243
+ -----------------------------------------------------------------------
5244
+ EmployeeTest: test_that_we_can_assign_new_dates_to_the_form_date_object
5245
+ -----------------------------------------------------------------------
5246
+  (0.1ms) ROLLBACK
5247
+  (0.1ms) BEGIN
5248
+ --------------------------------------------------------------------------
5249
+ EmployeeTest: test_employee_has_class_variable_describing_all_gov_uk_dates
5250
+ --------------------------------------------------------------------------
5251
+  (0.1ms) ROLLBACK
5252
+  (0.1ms) BEGIN
5253
+ ----------------------------------------------------
5254
+ EmployeesControllerTest: test_should_update_employee
5255
+ ----------------------------------------------------
5256
+  (0.1ms) SAVEPOINT active_record_1
5257
+ SQL (0.2ms) 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-01 13:00:09.992804"], ["updated_at", "2016-04-01 13:00:09.992804"]]
5258
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5259
+  (0.1ms) SAVEPOINT active_record_1
5260
+ SQL (0.1ms) 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-01 13:00:09.994086"], ["updated_at", "2016-04-01 13:00:09.994086"]]
5261
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5262
+ Processing by EmployeesController#update as HTML
5263
+ Parameters: {"employee"=>{"dob_dd"=>"1", "dob_mm"=>"11", "dob_yyyy"=>"1981", "joined_dd"=>"3", "joined_mm"=>"oct", "joined_yyyy"=>"2015", "name"=>"Ioannis Kole"}, "id"=>"250"}
5264
+ Employee Load (0.2ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 250]]
5265
+  (0.1ms) SAVEPOINT active_record_1
5266
+ SQL (0.2ms) 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-01 13:00:10.001339"], ["id", 250]]
5267
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5268
+ Redirected to http://test.host/employees/250
5269
+ Completed 302 Found in 6ms (ActiveRecord: 0.5ms)
5270
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 250]]
5271
+  (0.1ms) ROLLBACK
5272
+  (0.1ms) BEGIN
5273
+ --------------------------------------------------
5274
+ EmployeesControllerTest: test_should_show_employee
5275
+ --------------------------------------------------
5276
+  (0.1ms) SAVEPOINT active_record_1
5277
+ SQL (0.2ms) 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-01 13:00:10.005025"], ["updated_at", "2016-04-01 13:00:10.005025"]]
5278
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5279
+  (0.1ms) SAVEPOINT active_record_1
5280
+ SQL (0.1ms) 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-01 13:00:10.006111"], ["updated_at", "2016-04-01 13:00:10.006111"]]
5281
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5282
+ Processing by EmployeesController#show as HTML
5283
+ Parameters: {"id"=>"252"}
5284
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 252]]
5285
+ Rendered employees/show.html.erb within layouts/application (2.1ms)
5286
+ Completed 200 OK in 115ms (Views: 114.6ms | ActiveRecord: 0.1ms)
5287
+  (0.2ms) ROLLBACK
5288
+  (0.1ms) BEGIN
5289
+ ----------------------------------------------------
5290
+ EmployeesControllerTest: test_should_create_employee
5291
+ ----------------------------------------------------
5292
+  (0.1ms) SAVEPOINT active_record_1
5293
+ SQL (0.2ms) 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-01 13:00:10.124085"], ["updated_at", "2016-04-01 13:00:10.124085"]]
5294
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5295
+  (0.1ms) SAVEPOINT active_record_1
5296
+ SQL (0.1ms) 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-01 13:00:10.125413"], ["updated_at", "2016-04-01 13:00:10.125413"]]
5297
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5298
+  (0.2ms) SELECT COUNT(*) FROM "employees"
5299
+ Processing by EmployeesController#create as HTML
5300
+ Parameters: {"employee"=>{"dob_dd"=>"31", "dob_mm"=>"12", "dob_yyyy"=>"1965", "joined_dd"=>"4", "joined_mm"=>"mar", "joined_yyyy"=>"2015", "name"=>"Joe Blow"}}
5301
+  (0.1ms) SAVEPOINT active_record_1
5302
+ SQL (0.1ms) 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-01 13:00:10.128624"], ["updated_at", "2016-04-01 13:00:10.128624"]]
5303
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5304
+ Redirected to http://test.host/employees/256
5305
+ Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
5306
+  (0.2ms) SELECT COUNT(*) FROM "employees"
5307
+  (0.1ms) SELECT COUNT(*) FROM "employees"
5308
+ Employee Load (1.1ms) SELECT "employees".* FROM "employees" ORDER BY "employees"."id" DESC LIMIT 1
5309
+  (0.1ms) ROLLBACK
5310
+  (0.1ms) BEGIN
5311
+ ----------------------------------------------
5312
+ EmployeesControllerTest: test_should_get_index
5313
+ ----------------------------------------------
5314
+  (0.1ms) SAVEPOINT active_record_1
5315
+ SQL (0.1ms) 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-01 13:00:10.133291"], ["updated_at", "2016-04-01 13:00:10.133291"]]
5316
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5317
+  (0.1ms) SAVEPOINT active_record_1
5318
+ SQL (0.1ms) 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-01 13:00:10.134331"], ["updated_at", "2016-04-01 13:00:10.134331"]]
5319
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5320
+ Processing by EmployeesController#index as HTML
5321
+ Employee Load (0.2ms) SELECT "employees".* FROM "employees"
5322
+ Rendered employees/index.html.erb within layouts/application (1.4ms)
5323
+ Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.2ms)
5324
+  (0.1ms) ROLLBACK
5325
+  (0.1ms) BEGIN
5326
+ --------------------------------------------------------------
5327
+ EmployeesControllerTest: test_should_render_gov_uk_date_fields
5328
+ --------------------------------------------------------------
5329
+  (0.1ms) SAVEPOINT active_record_1
5330
+ SQL (0.1ms) 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-01 13:00:10.140126"], ["updated_at", "2016-04-01 13:00:10.140126"]]
5331
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5332
+  (0.1ms) SAVEPOINT active_record_1
5333
+ SQL (0.1ms) 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-01 13:00:10.141198"], ["updated_at", "2016-04-01 13:00:10.141198"]]
5334
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5335
+ Processing by EmployeesController#edit as HTML
5336
+ Parameters: {"id"=>"259"}
5337
+ Employee Load (0.2ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 259]]
5338
+ Rendered employees/_form.html.erb (9.9ms)
5339
+ Rendered employees/edit.html.erb within layouts/application (15.2ms)
5340
+ Completed 200 OK in 18ms (Views: 17.3ms | ActiveRecord: 0.2ms)
5341
+  (0.1ms) ROLLBACK
5342
+  (0.1ms) BEGIN
5343
+ --------------------------------------------
5344
+ EmployeesControllerTest: test_should_get_new
5345
+ --------------------------------------------
5346
+  (0.1ms) SAVEPOINT active_record_1
5347
+ SQL (0.1ms) 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-01 13:00:10.171156"], ["updated_at", "2016-04-01 13:00:10.171156"]]
5348
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5349
+  (0.1ms) SAVEPOINT active_record_1
5350
+ SQL (0.1ms) 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-01 13:00:10.172325"], ["updated_at", "2016-04-01 13:00:10.172325"]]
5351
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5352
+ Processing by EmployeesController#new as HTML
5353
+ Rendered employees/_form.html.erb (1.8ms)
5354
+ Rendered employees/new.html.erb within layouts/application (2.4ms)
5355
+ Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms)
5356
+  (0.1ms) ROLLBACK
5357
+  (0.1ms) BEGIN
5358
+ ---------------------------------------------
5359
+ EmployeesControllerTest: test_should_get_edit
5360
+ ---------------------------------------------
5361
+  (0.1ms) SAVEPOINT active_record_1
5362
+ SQL (0.1ms) 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-01 13:00:10.179488"], ["updated_at", "2016-04-01 13:00:10.179488"]]
5363
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5364
+  (0.1ms) SAVEPOINT active_record_1
5365
+ SQL (0.1ms) 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-01 13:00:10.180567"], ["updated_at", "2016-04-01 13:00:10.180567"]]
5366
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5367
+ Processing by EmployeesController#edit as HTML
5368
+ Parameters: {"id"=>"263"}
5369
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 263]]
5370
+ Rendered employees/_form.html.erb (1.3ms)
5371
+ Rendered employees/edit.html.erb within layouts/application (1.5ms)
5372
+ Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)
5373
+  (0.1ms) ROLLBACK
5374
+  (0.1ms) BEGIN
5375
+ -----------------------------------------------------
5376
+ EmployeesControllerTest: test_should_destroy_employee
5377
+ -----------------------------------------------------
5378
+  (0.1ms) SAVEPOINT active_record_1
5379
+ SQL (0.1ms) 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-01 13:00:10.185864"], ["updated_at", "2016-04-01 13:00:10.185864"]]
5380
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5381
+  (0.1ms) SAVEPOINT active_record_1
5382
+ SQL (0.1ms) 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-01 13:00:10.186911"], ["updated_at", "2016-04-01 13:00:10.186911"]]
5383
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5384
+  (0.2ms) SELECT COUNT(*) FROM "employees"
5385
+ Processing by EmployeesController#destroy as HTML
5386
+ Parameters: {"id"=>"265"}
5387
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 265]]
5388
+  (0.1ms) SAVEPOINT active_record_1
5389
+ SQL (0.1ms) DELETE FROM "employees" WHERE "employees"."id" = $1 [["id", 265]]
5390
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5391
+ Redirected to http://test.host/employees
5392
+ Completed 302 Found in 1ms (ActiveRecord: 0.4ms)
5393
+  (0.1ms) SELECT COUNT(*) FROM "employees"
5394
+  (0.1ms) ROLLBACK
5395
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
5396
+  (0.2ms) BEGIN
5397
+ -------------------------------------
5398
+ GovUkDateFieldsTest: test_squash_html
5399
+ -------------------------------------
5400
+  (0.2ms) ROLLBACK
5401
+  (0.1ms) BEGIN
5402
+ -------------------------------------------------------------
5403
+ GovUkDateFieldsTest: test_placeholder_output_without_fieldset
5404
+ -------------------------------------------------------------
5405
+  (0.1ms) ROLLBACK
5406
+  (0.1ms) BEGIN
5407
+ --------------------------------------------------------
5408
+ GovUkDateFieldsTest: test_fieldset_output_with_form_hint
5409
+ --------------------------------------------------------
5410
+  (0.2ms) ROLLBACK
5411
+  (0.1ms) BEGIN
5412
+ -------------------------------------------------------
5413
+ GovUkDateFieldsTest: test_basic_output_without_fieldset
5414
+ -------------------------------------------------------
5415
+  (0.1ms) ROLLBACK
5416
+  (0.1ms) BEGIN
5417
+ ---------------------------------------------------------------
5418
+ GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
5419
+ ---------------------------------------------------------------
5420
+  (0.1ms) ROLLBACK
5421
+  (0.1ms) BEGIN
5422
+ -----------------------------------------------------------
5423
+ GovUkDateFieldsTest: test_fieldset_output_with_legend_class
5424
+ -----------------------------------------------------------
5425
+  (0.1ms) ROLLBACK
5426
+  (0.1ms) BEGIN
5427
+ ------------------------------------------
5428
+ GovUkDateFieldsTest: test_fieldset_with_id
5429
+ ------------------------------------------
5430
+  (0.1ms) ROLLBACK
5431
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
5432
+  (0.2ms) BEGIN
5433
+ -------------------------------------------------------
5434
+ GovUkDateFieldsTest: test_basic_output_without_fieldset
5435
+ -------------------------------------------------------
5436
+  (0.1ms) ROLLBACK
5437
+  (0.1ms) BEGIN
5438
+ ------------------------------------------
5439
+ GovUkDateFieldsTest: test_fieldset_with_id
5440
+ ------------------------------------------
5441
+  (0.1ms) ROLLBACK
5442
+  (0.1ms) BEGIN
5443
+ --------------------------------------------------------
5444
+ GovUkDateFieldsTest: test_fieldset_output_with_form_hint
5445
+ --------------------------------------------------------
5446
+  (0.1ms) ROLLBACK
5447
+  (0.1ms) BEGIN
5448
+ -------------------------------------------------------------
5449
+ GovUkDateFieldsTest: test_placeholder_output_without_fieldset
5450
+ -------------------------------------------------------------
5451
+  (0.1ms) ROLLBACK
5452
+  (0.1ms) BEGIN
5453
+ ---------------------------------------------------------------
5454
+ GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
5455
+ ---------------------------------------------------------------
5456
+  (0.1ms) ROLLBACK
5457
+  (0.1ms) BEGIN
5458
+ -------------------------------------
5459
+ GovUkDateFieldsTest: test_squash_html
5460
+ -------------------------------------
5461
+  (0.1ms) ROLLBACK
5462
+  (0.1ms) BEGIN
5463
+ -----------------------------------------------------------
5464
+ GovUkDateFieldsTest: test_fieldset_output_with_legend_class
5465
+ -----------------------------------------------------------
5466
+  (0.1ms) ROLLBACK
5467
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
5468
+  (0.2ms) BEGIN
5469
+ --------------------------------------------------
5470
+ EmployeesControllerTest: test_should_show_employee
5471
+ --------------------------------------------------
5472
+  (0.1ms) SAVEPOINT active_record_1
5473
+ SQL (0.4ms) 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-01 13:04:18.272208"], ["updated_at", "2016-04-01 13:04:18.272208"]]
5474
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5475
+  (0.1ms) SAVEPOINT active_record_1
5476
+ SQL (0.1ms) 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-01 13:04:18.277201"], ["updated_at", "2016-04-01 13:04:18.277201"]]
5477
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5478
+ Processing by EmployeesController#show as HTML
5479
+ Parameters: {"id"=>"267"}
5480
+ Employee Load (0.2ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 267]]
5481
+ Rendered employees/show.html.erb within layouts/application (1.1ms)
5482
+ Completed 200 OK in 117ms (Views: 112.2ms | ActiveRecord: 0.2ms)
5483
+  (0.3ms) ROLLBACK
5484
+  (0.1ms) BEGIN
5485
+ ---------------------------------------------
5486
+ EmployeesControllerTest: test_should_get_edit
5487
+ ---------------------------------------------
5488
+  (0.1ms) SAVEPOINT active_record_1
5489
+ SQL (0.2ms) 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-01 13:04:18.398968"], ["updated_at", "2016-04-01 13:04:18.398968"]]
5490
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5491
+  (0.1ms) SAVEPOINT active_record_1
5492
+ SQL (0.1ms) 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-01 13:04:18.400249"], ["updated_at", "2016-04-01 13:04:18.400249"]]
5493
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5494
+ Processing by EmployeesController#edit as HTML
5495
+ Parameters: {"id"=>"269"}
5496
+ Employee Load (0.2ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 269]]
5497
+ Rendered employees/_form.html.erb (11.6ms)
5498
+ Rendered employees/edit.html.erb within layouts/application (13.9ms)
5499
+ Completed 200 OK in 16ms (Views: 15.6ms | ActiveRecord: 0.2ms)
5500
+  (0.1ms) ROLLBACK
5501
+  (0.1ms) BEGIN
5502
+ ----------------------------------------------------
5503
+ EmployeesControllerTest: test_should_create_employee
5504
+ ----------------------------------------------------
5505
+  (0.1ms) SAVEPOINT active_record_1
5506
+ SQL (0.1ms) 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-01 13:04:18.419921"], ["updated_at", "2016-04-01 13:04:18.419921"]]
5507
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5508
+  (0.1ms) SAVEPOINT active_record_1
5509
+ SQL (0.1ms) 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-01 13:04:18.421232"], ["updated_at", "2016-04-01 13:04:18.421232"]]
5510
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5511
+  (0.2ms) SELECT COUNT(*) FROM "employees"
5512
+ Processing by EmployeesController#create as HTML
5513
+ Parameters: {"employee"=>{"dob_dd"=>"31", "dob_mm"=>"12", "dob_yyyy"=>"1965", "joined_dd"=>"4", "joined_mm"=>"mar", "joined_yyyy"=>"2015", "name"=>"Joe Blow"}}
5514
+  (0.1ms) SAVEPOINT active_record_1
5515
+ SQL (0.1ms) 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-01 13:04:18.424316"], ["updated_at", "2016-04-01 13:04:18.424316"]]
5516
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5517
+ Redirected to http://test.host/employees/273
5518
+ Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
5519
+  (0.2ms) SELECT COUNT(*) FROM "employees"
5520
+  (0.1ms) SELECT COUNT(*) FROM "employees"
5521
+ Employee Load (0.3ms) SELECT "employees".* FROM "employees" ORDER BY "employees"."id" DESC LIMIT 1
5522
+  (0.1ms) ROLLBACK
5523
+  (0.1ms) BEGIN
5524
+ --------------------------------------------
5525
+ EmployeesControllerTest: test_should_get_new
5526
+ --------------------------------------------
5527
+  (0.1ms) SAVEPOINT active_record_1
5528
+ SQL (0.1ms) 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-01 13:04:18.428209"], ["updated_at", "2016-04-01 13:04:18.428209"]]
5529
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5530
+  (0.1ms) SAVEPOINT active_record_1
5531
+ SQL (0.1ms) 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-01 13:04:18.429244"], ["updated_at", "2016-04-01 13:04:18.429244"]]
5532
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5533
+ Processing by EmployeesController#new as HTML
5534
+ Rendered employees/_form.html.erb (1.4ms)
5535
+ Rendered employees/new.html.erb within layouts/application (1.8ms)
5536
+ Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.0ms)
5537
+  (0.1ms) ROLLBACK
5538
+  (0.1ms) BEGIN
5539
+ --------------------------------------------------------------
5540
+ EmployeesControllerTest: test_should_render_gov_uk_date_fields
5541
+ --------------------------------------------------------------
5542
+  (0.1ms) SAVEPOINT active_record_1
5543
+ SQL (0.1ms) 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-01 13:04:18.435275"], ["updated_at", "2016-04-01 13:04:18.435275"]]
5544
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5545
+  (0.1ms) SAVEPOINT active_record_1
5546
+ SQL (0.1ms) 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-01 13:04:18.436423"], ["updated_at", "2016-04-01 13:04:18.436423"]]
5547
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5548
+ Processing by EmployeesController#edit as HTML
5549
+ Parameters: {"id"=>"276"}
5550
+ Employee Load (0.3ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 276]]
5551
+ Rendered employees/_form.html.erb (1.7ms)
5552
+ Rendered employees/edit.html.erb within layouts/application (2.0ms)
5553
+ Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.3ms)
5554
+  (0.1ms) ROLLBACK
5555
+  (0.1ms) BEGIN
5556
+ ----------------------------------------------
5557
+ EmployeesControllerTest: test_should_get_index
5558
+ ----------------------------------------------
5559
+  (0.1ms) SAVEPOINT active_record_1
5560
+ SQL (0.1ms) 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-01 13:04:18.445189"], ["updated_at", "2016-04-01 13:04:18.445189"]]
5561
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5562
+  (0.1ms) SAVEPOINT active_record_1
5563
+ SQL (0.1ms) 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-01 13:04:18.446218"], ["updated_at", "2016-04-01 13:04:18.446218"]]
5564
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5565
+ Processing by EmployeesController#index as HTML
5566
+ Employee Load (0.2ms) SELECT "employees".* FROM "employees"
5567
+ Rendered employees/index.html.erb within layouts/application (1.4ms)
5568
+ Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.2ms)
5569
+  (0.1ms) ROLLBACK
5570
+  (0.1ms) BEGIN
5571
+ -----------------------------------------------------
5572
+ EmployeesControllerTest: test_should_destroy_employee
5573
+ -----------------------------------------------------
5574
+  (0.1ms) SAVEPOINT active_record_1
5575
+ SQL (0.1ms) 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-01 13:04:18.451368"], ["updated_at", "2016-04-01 13:04:18.451368"]]
5576
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5577
+  (0.1ms) SAVEPOINT active_record_1
5578
+ SQL (0.1ms) 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-01 13:04:18.452410"], ["updated_at", "2016-04-01 13:04:18.452410"]]
5579
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5580
+  (0.1ms) SELECT COUNT(*) FROM "employees"
5581
+ Processing by EmployeesController#destroy as HTML
5582
+ Parameters: {"id"=>"280"}
5583
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 280]]
5584
+  (0.1ms) SAVEPOINT active_record_1
5585
+ SQL (0.1ms) DELETE FROM "employees" WHERE "employees"."id" = $1 [["id", 280]]
5586
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5587
+ Redirected to http://test.host/employees
5588
+ Completed 302 Found in 1ms (ActiveRecord: 0.4ms)
5589
+  (0.1ms) SELECT COUNT(*) FROM "employees"
5590
+  (0.1ms) ROLLBACK
5591
+  (0.1ms) BEGIN
5592
+ ----------------------------------------------------
5593
+ EmployeesControllerTest: test_should_update_employee
5594
+ ----------------------------------------------------
5595
+  (0.1ms) SAVEPOINT active_record_1
5596
+ SQL (0.1ms) 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-01 13:04:18.457159"], ["updated_at", "2016-04-01 13:04:18.457159"]]
5597
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5598
+  (0.1ms) SAVEPOINT active_record_1
5599
+ SQL (0.1ms) 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-01 13:04:18.458112"], ["updated_at", "2016-04-01 13:04:18.458112"]]
5600
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5601
+ Processing by EmployeesController#update as HTML
5602
+ Parameters: {"employee"=>{"dob_dd"=>"1", "dob_mm"=>"11", "dob_yyyy"=>"1981", "joined_dd"=>"3", "joined_mm"=>"oct", "joined_yyyy"=>"2015", "name"=>"Ioannis Kole"}, "id"=>"282"}
5603
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 282]]
5604
+  (0.1ms) SAVEPOINT active_record_1
5605
+ SQL (0.1ms) 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-01 13:04:18.460632"], ["id", 282]]
5606
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5607
+ Redirected to http://test.host/employees/282
5608
+ Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
5609
+ Employee Load (0.1ms) SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 282]]
5610
+  (0.1ms) ROLLBACK
5611
+  (0.1ms) BEGIN
5612
+ -------------------------------------------------------
5613
+ GovUkDateFieldsTest: test_basic_output_without_fieldset
5614
+ -------------------------------------------------------
5615
+  (0.1ms) ROLLBACK
5616
+  (0.0ms) BEGIN
5617
+ -------------------------------------------------------------
5618
+ GovUkDateFieldsTest: test_placeholder_output_without_fieldset
5619
+ -------------------------------------------------------------
5620
+  (0.1ms) ROLLBACK
5621
+  (0.1ms) BEGIN
5622
+ ------------------------------------------
5623
+ GovUkDateFieldsTest: test_fieldset_with_id
5624
+ ------------------------------------------
5625
+  (0.1ms) ROLLBACK
5626
+  (0.1ms) BEGIN
5627
+ -----------------------------------------------------------
5628
+ GovUkDateFieldsTest: test_fieldset_output_with_legend_class
5629
+ -----------------------------------------------------------
5630
+  (0.1ms) ROLLBACK
5631
+  (0.1ms) BEGIN
5632
+ --------------------------------------------------------
5633
+ GovUkDateFieldsTest: test_fieldset_output_with_form_hint
5634
+ --------------------------------------------------------
5635
+  (0.1ms) ROLLBACK
5636
+  (0.1ms) BEGIN
5637
+ ---------------------------------------------------------------
5638
+ GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
5639
+ ---------------------------------------------------------------
5640
+  (0.1ms) ROLLBACK
5641
+  (0.1ms) BEGIN
5642
+ -------------------------------------
5643
+ GovUkDateFieldsTest: test_squash_html
5644
+ -------------------------------------
5645
+  (0.1ms) ROLLBACK
5646
+  (0.1ms) BEGIN
5647
+ ------------------------------------------------------------------------------------------
5648
+ GovUkDateFields::FormDateTest: test_set_from_date_instantiates_a_nil_object_if_date_is_nil
5649
+ ------------------------------------------------------------------------------------------
5650
+  (0.1ms) ROLLBACK
5651
+  (0.0ms) BEGIN
5652
+ -----------------------------------------------------------------------------------------
5653
+ GovUkDateFields::FormDateTest: test_set_from_date_instantiates_the_attribute_and_is_valid
5654
+ -----------------------------------------------------------------------------------------
5655
+  (0.1ms) ROLLBACK
5656
+  (0.1ms) BEGIN
5657
+ ---------------------------------------------------------------------------------
5658
+ GovUkDateFields::FormDateTest: test_setting_all_three_date_parts_changes_the_date
5659
+ ---------------------------------------------------------------------------------
5660
+  (0.1ms) ROLLBACK
5661
+  (0.1ms) BEGIN
5662
+ -----------------------------------------------------------------------------------------------
5663
+ GovUkDateFields::FormDateTest: test_setting_all_date_parts_to_nil_sets_date_to_nil_and_is_valid
5664
+ -----------------------------------------------------------------------------------------------
5665
+  (0.1ms) ROLLBACK
5666
+  (0.1ms) BEGIN
5667
+ ----------------------------------------------------------------------------------------------------------------------------------
5668
+ GovUkDateFields::FormDateTest: test_setting_date_parts_with_invalid_values_marks_date_as_invalid_and_leaves_date_variable_the_same
5669
+ ----------------------------------------------------------------------------------------------------------------------------------
5670
+  (0.1ms) ROLLBACK
5671
+  (0.1ms) BEGIN
5672
+ -------------------------------------------------------------------------------
5673
+ GovUkDateFields::FormDateTest: test_set_one_date_part_leaves_the_rest_unchanged
5674
+ -------------------------------------------------------------------------------
5675
+  (0.1ms) ROLLBACK
5676
+  (0.1ms) BEGIN
5677
+ ---------------------------------------------------------------------------------
5678
+ GovUkDateFields::FormDateTest: test_new_raises_error_if_called_from_outside_class
5679
+ ---------------------------------------------------------------------------------
5680
+  (0.1ms) ROLLBACK
5681
+  (0.1ms) BEGIN
5682
+ -----------------------------------------------------------
5683
+ EmployeeTest: test_new_dates_can_be_populated_from_the_form
5684
+ -----------------------------------------------------------
5685
+  (0.1ms) ROLLBACK
5686
+  (0.1ms) BEGIN
5687
+ -----------------------------------------------------------------------
5688
+ EmployeeTest: test_that_we_can_assign_new_dates_to_the_form_date_object
5689
+ -----------------------------------------------------------------------
5690
+  (0.1ms) ROLLBACK
5691
+  (0.1ms) BEGIN
5692
+ ------------------------------------------------------------------------
5693
+ EmployeeTest: test_creating_a_new_employee_with_invalid_dates_is_invalid
5694
+ ------------------------------------------------------------------------
5695
+  (0.1ms) ROLLBACK
5696
+  (0.1ms) BEGIN
5697
+ ----------------------------------------------
5698
+ EmployeeTest: test_valid_dates_raise_no_errors
5699
+ ----------------------------------------------
5700
+  (0.1ms) ROLLBACK
5701
+  (0.1ms) BEGIN
5702
+ --------------------------------------------------------------------------
5703
+ EmployeeTest: test_employee_has_class_variable_describing_all_gov_uk_dates
5704
+ --------------------------------------------------------------------------
5705
+  (0.1ms) ROLLBACK
5706
+  (0.0ms) BEGIN
5707
+ -------------------------------------------------------------------------
5708
+ EmployeeTest: test_updating_existing_record_with_invalid_dates_is_invalid
5709
+ -------------------------------------------------------------------------
5710
+  (0.1ms) SAVEPOINT active_record_1
5711
+ SQL (0.2ms) 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-01 13:04:18.478145"], ["updated_at", "2016-04-01 13:04:18.478145"]]
5712
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5713
+  (0.0ms) SAVEPOINT active_record_1
5714
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
5715
+  (0.1ms) ROLLBACK
5716
+  (0.1ms) BEGIN
5717
+ ---------------------------------------------------------------------------------------------------------
5718
+ EmployeeTest: test_that_argument_error_is_raised_if_unparseable_string_object_is_assigned_to_a_date_field
5719
+ ---------------------------------------------------------------------------------------------------------
5720
+  (0.1ms) ROLLBACK
5721
+  (0.0ms) BEGIN
5722
+ -------------------------------------------
5723
+ EmployeeTest: test_invalid_day_raises_error
5724
+ -------------------------------------------
5725
+  (0.0ms) ROLLBACK
5726
+  (0.1ms) BEGIN
5727
+ ------------------------------------------------------------------------------------------
5728
+ EmployeeTest: test_employee_instance_has_form_date_instance_variables_for_each_gov_uk_date
5729
+ ------------------------------------------------------------------------------------------
5730
+  (0.1ms) ROLLBACK
5731
+  (0.1ms) BEGIN
5732
+ -----------------------------------------------------------
5733
+ EmployeeTest: test_that_nil_can_be_assigned_to_a_date_field
5734
+ -----------------------------------------------------------
5735
+  (0.1ms) ROLLBACK
5736
+  (0.1ms) BEGIN
5737
+ -------------------------------------------------------------------------------------------------------------------
5738
+ EmployeeTest: test_argument_error_is_raised_if_an_object_that_doesnt_respond_to_to_date_is_assigned_to_a_date_field
5739
+ -------------------------------------------------------------------------------------------------------------------
5740
+  (0.1ms) ROLLBACK
5741
+  (0.1ms) BEGIN
5742
+ -----------------------------------------------------------------
5743
+ EmployeeTest: test_employee_class_responds_to_acts_as_gov_uk_date
5744
+ -----------------------------------------------------------------
5745
+  (0.1ms) ROLLBACK
5746
+  (0.1ms) BEGIN
5747
+ -----------------------------------------------------------------------------------
5748
+ EmployeeTest: test_that_form_population_values_can_be_extracted_from_the_date_field
5749
+ -----------------------------------------------------------------------------------
5750
+  (0.1ms) ROLLBACK
5751
+  (0.1ms) BEGIN
5752
+ ----------------------------------------------------------------------------------------------------------------
5753
+ EmployeeTest: test_that_the_calling_the_field_name_on_employee_will_return_the_date_part_of_the_form_date_object
5754
+ ----------------------------------------------------------------------------------------------------------------
5755
+  (0.1ms) ROLLBACK
5756
+  (0.0ms) BEGIN
5757
+ ----------------------------------------------------------------------------------------------
5758
+ EmployeeTest: test_no_argument_error_is_raised_if_parseable_string_is_assigned_to_a_date_field
5759
+ ----------------------------------------------------------------------------------------------
5760
+  (0.1ms) ROLLBACK
5761
+  (0.1ms) BEGIN
5762
+ --------------------------------------------
5763
+ EmployeeTest: test_nil_dates_raise_no_errors
5764
+ --------------------------------------------
5765
+  (0.1ms) ROLLBACK
5766
+  (0.1ms) BEGIN
5767
+ ---------------------------------------------------------------------
5768
+ EmployeeTest: test_createing_a_new_employee_with_valid_dates_is_valid
5769
+ ---------------------------------------------------------------------
5770
+  (0.1ms) ROLLBACK
5771
+  (0.1ms) BEGIN
5772
+ ---------------------------------------------------------------------
5773
+ EmployeeTest: test_updating_existing_record_with_valid_dates_is_valid
5774
+ ---------------------------------------------------------------------
5775
+  (0.1ms) SAVEPOINT active_record_1
5776
+ SQL (0.1ms) 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-01 13:04:18.488715"], ["updated_at", "2016-04-01 13:04:18.488715"]]
5777
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5778
+  (0.1ms) SAVEPOINT active_record_1
5779
+ SQL (0.2ms) UPDATE "employees" SET "dob" = $1, "updated_at" = $2 WHERE "employees"."id" = $3 [["dob", "1965-05-17"], ["updated_at", "2016-04-01 13:04:18.489826"], ["id", 285]]
5780
+  (0.1ms) RELEASE SAVEPOINT active_record_1
5781
+  (0.1ms) ROLLBACK
@@ -83,15 +83,15 @@ class GovUkDateFieldsTest < ActiveSupport::TestCase
83
83
  <p class="form-hint" id="joined-hint">For example, 31 3 1980</p>
84
84
  <div class="form-group form-group-day">
85
85
  <label for="joined-day">Day</label>
86
- <input class="form-control" id="joined-day" name="joined-day" type="number" pattern="[0-9]*" min="0" max="31" aria-describedby="joined-hint" value="1">
86
+ <input class="form-control" id="employee[joined_dd]" name="employee[joined_dd]" type="number" pattern="[0-9]*" min="0" max="31" aria-describedby="joined-hint" value="1">
87
87
  </div>
88
88
  <div class="form-group form-group-month">
89
89
  <label for="joined-month">Month</label>
90
- <input class="form-control" id="joined-month" name="joined-month" type="number" pattern="[0-9]*" min="0" max="12" value="4">
90
+ <input class="form-control" id="employee[joined_mm]" name="employee[joined_mm]" type="number" pattern="[0-9]*" min="0" max="12" value="4">
91
91
  </div>
92
92
  <div class="form-group form-group-year">
93
93
  <label for="joined-year">Year</label>
94
- <input class="form-control" id="joined-year" name="joined-year" type="number" pattern="[0-9]*" min="0" max="2016" value="2015">
94
+ <input class="form-control" id="employee[joined_yyyy]" name="employee[joined_yyyy]" type="number" pattern="[0-9]*" min="0" max="2016" value="2015">
95
95
  </div>
96
96
  </div>
97
97
  </fieldset>
@@ -106,15 +106,15 @@ class GovUkDateFieldsTest < ActiveSupport::TestCase
106
106
  <p class="form-hint" id="dob-hint">In the form: dd mm yyyy</p>
107
107
  <div class="form-group form-group-day">
108
108
  <label for="dob-day">Day</label>
109
- <input class="form-control" id="dob-day" name="dob-day" type="number" pattern="[0-9]*" min="0" max="31" aria-describedby="dob-hint" value="7">
109
+ <input class="form-control" id="employee[dob_dd]" name="employee[dob_dd]" type="number" pattern="[0-9]*" min="0" max="31" aria-describedby="dob-hint" value="7">
110
110
  </div>
111
111
  <div class="form-group form-group-month">
112
112
  <label for="dob-month">Month</label>
113
- <input class="form-control" id="dob-month" name="dob-month" type="number" pattern="[0-9]*" min="0" max="12" value="12">
113
+ <input class="form-control" id="employee[dob_mm]" name="employee[dob_mm]" type="number" pattern="[0-9]*" min="0" max="12" value="12">
114
114
  </div>
115
115
  <div class="form-group form-group-year">
116
116
  <label for="dob-year">Year</label>
117
- <input class="form-control" id="dob-year" name="dob-year" type="number" pattern="[0-9]*" min="0" max="2016" value="1963">
117
+ <input class="form-control" id="employee[dob_yyyy]" name="employee[dob_yyyy]" type="number" pattern="[0-9]*" min="0" max="2016" value="1963">
118
118
  </div>
119
119
  </div>
120
120
  </fieldset>
@@ -129,15 +129,15 @@ class GovUkDateFieldsTest < ActiveSupport::TestCase
129
129
  <p class="form-hint" id="joined-hint">For example, 31 3 1980</p>
130
130
  <div class="form-group form-group-day">
131
131
  <label for="joined-day">Day</label>
132
- <input class="form-control" id="joined-day" name="joined-day" type="number" pattern="[0-9]*" min="0" max="31" aria-describedby="joined-hint" value="1">
132
+ <input class="form-control" id="employee[joined_dd]" name="employee[joined_dd]" type="number" pattern="[0-9]*" min="0" max="31" aria-describedby="joined-hint" value="1">
133
133
  </div>
134
134
  <div class="form-group form-group-month">
135
135
  <label for="joined-month">Month</label>
136
- <input class="form-control" id="joined-month" name="joined-month" type="number" pattern="[0-9]*" min="0" max="12" value="4">
136
+ <input class="form-control" id="employee[joined_mm]" name="employee[joined_mm]" type="number" pattern="[0-9]*" min="0" max="12" value="4">
137
137
  </div>
138
138
  <div class="form-group form-group-year">
139
139
  <label for="joined-year">Year</label>
140
- <input class="form-control" id="joined-year" name="joined-year" type="number" pattern="[0-9]*" min="0" max="#{Date.today.year}" value="2015">
140
+ <input class="form-control" id="employee[joined_yyyy]" name="employee[joined_yyyy]" type="number" pattern="[0-9]*" min="0" max="#{Date.today.year}" value="2015">
141
141
  </div>
142
142
  </div>
143
143
  </fieldset>
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.1
4
+ version: 1.0.2
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-03-31 00:00:00.000000000 Z
12
+ date: 2016-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails