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 +4 -4
- data/lib/gov_uk_date_fields/form_fields.rb +3 -3
- data/lib/gov_uk_date_fields/version.rb +1 -1
- data/test/dummy/log/test.log +738 -0
- data/test/form_fields_test.rb +9 -9
- 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: 07a163ea32d226a6d6701a4bae4e24b91e661e31
|
4
|
+
data.tar.gz: eefab635e9be48c8f63879b0cc99cfdc5d80f6c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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="#{
|
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="#{
|
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="#{
|
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
|
data/test/dummy/log/test.log
CHANGED
@@ -5041,3 +5041,741 @@ GovUkDateFieldsTest: test_fieldset_output_with_legend_class
|
|
5041
5041
|
GovUkDateFieldsTest: test_basic_output_without_fieldset
|
5042
5042
|
-------------------------------------------------------
|
5043
5043
|
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5044
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5045
|
+
[1m[35m (0.2ms)[0m BEGIN
|
5046
|
+
-------------------------------------
|
5047
|
+
GovUkDateFieldsTest: test_squash_html
|
5048
|
+
-------------------------------------
|
5049
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5050
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5051
|
+
------------------------------------------
|
5052
|
+
GovUkDateFieldsTest: test_fieldset_with_id
|
5053
|
+
------------------------------------------
|
5054
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5055
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5056
|
+
-----------------------------------------------------------
|
5057
|
+
GovUkDateFieldsTest: test_fieldset_output_with_legend_class
|
5058
|
+
-----------------------------------------------------------
|
5059
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5060
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5061
|
+
--------------------------------------------------------
|
5062
|
+
GovUkDateFieldsTest: test_fieldset_output_with_form_hint
|
5063
|
+
--------------------------------------------------------
|
5064
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5065
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5066
|
+
-------------------------------------------------------
|
5067
|
+
GovUkDateFieldsTest: test_basic_output_without_fieldset
|
5068
|
+
-------------------------------------------------------
|
5069
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
5070
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5071
|
+
-------------------------------------------------------------
|
5072
|
+
GovUkDateFieldsTest: test_placeholder_output_without_fieldset
|
5073
|
+
-------------------------------------------------------------
|
5074
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5075
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5076
|
+
---------------------------------------------------------------
|
5077
|
+
GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
|
5078
|
+
---------------------------------------------------------------
|
5079
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5080
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5081
|
+
[1m[35m (0.2ms)[0m BEGIN
|
5082
|
+
---------------------------------------------------------------------------------
|
5083
|
+
GovUkDateFields::FormDateTest: test_new_raises_error_if_called_from_outside_class
|
5084
|
+
---------------------------------------------------------------------------------
|
5085
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5086
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5087
|
+
-----------------------------------------------------------------------------------------------
|
5088
|
+
GovUkDateFields::FormDateTest: test_setting_all_date_parts_to_nil_sets_date_to_nil_and_is_valid
|
5089
|
+
-----------------------------------------------------------------------------------------------
|
5090
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5091
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5092
|
+
------------------------------------------------------------------------------------------
|
5093
|
+
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_a_nil_object_if_date_is_nil
|
5094
|
+
------------------------------------------------------------------------------------------
|
5095
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5096
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5097
|
+
-----------------------------------------------------------------------------------------
|
5098
|
+
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_the_attribute_and_is_valid
|
5099
|
+
-----------------------------------------------------------------------------------------
|
5100
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5101
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5102
|
+
-------------------------------------------------------------------------------
|
5103
|
+
GovUkDateFields::FormDateTest: test_set_one_date_part_leaves_the_rest_unchanged
|
5104
|
+
-------------------------------------------------------------------------------
|
5105
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5106
|
+
[1m[35m (0.2ms)[0m BEGIN
|
5107
|
+
---------------------------------------------------------------------------------
|
5108
|
+
GovUkDateFields::FormDateTest: test_setting_all_three_date_parts_changes_the_date
|
5109
|
+
---------------------------------------------------------------------------------
|
5110
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5111
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5112
|
+
----------------------------------------------------------------------------------------------------------------------------------
|
5113
|
+
GovUkDateFields::FormDateTest: test_setting_date_parts_with_invalid_values_marks_date_as_invalid_and_leaves_date_variable_the_same
|
5114
|
+
----------------------------------------------------------------------------------------------------------------------------------
|
5115
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5116
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5117
|
+
-------------------------------------
|
5118
|
+
GovUkDateFieldsTest: test_squash_html
|
5119
|
+
-------------------------------------
|
5120
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5121
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5122
|
+
--------------------------------------------------------
|
5123
|
+
GovUkDateFieldsTest: test_fieldset_output_with_form_hint
|
5124
|
+
--------------------------------------------------------
|
5125
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5126
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5127
|
+
------------------------------------------
|
5128
|
+
GovUkDateFieldsTest: test_fieldset_with_id
|
5129
|
+
------------------------------------------
|
5130
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5131
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5132
|
+
---------------------------------------------------------------
|
5133
|
+
GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
|
5134
|
+
---------------------------------------------------------------
|
5135
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5136
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5137
|
+
-------------------------------------------------------------
|
5138
|
+
GovUkDateFieldsTest: test_placeholder_output_without_fieldset
|
5139
|
+
-------------------------------------------------------------
|
5140
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5141
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5142
|
+
-----------------------------------------------------------
|
5143
|
+
GovUkDateFieldsTest: test_fieldset_output_with_legend_class
|
5144
|
+
-----------------------------------------------------------
|
5145
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5146
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5147
|
+
-------------------------------------------------------
|
5148
|
+
GovUkDateFieldsTest: test_basic_output_without_fieldset
|
5149
|
+
-------------------------------------------------------
|
5150
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5151
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5152
|
+
-----------------------------------------------------------
|
5153
|
+
EmployeeTest: test_that_nil_can_be_assigned_to_a_date_field
|
5154
|
+
-----------------------------------------------------------
|
5155
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5156
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5157
|
+
-------------------------------------------------------------------------
|
5158
|
+
EmployeeTest: test_updating_existing_record_with_invalid_dates_is_invalid
|
5159
|
+
-------------------------------------------------------------------------
|
5160
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5161
|
+
[1m[35mSQL (1.8ms)[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-01 13:00:09.907411"], ["updated_at", "2016-04-01 13:00:09.907411"]]
|
5162
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5163
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5164
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
5165
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5166
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5167
|
+
------------------------------------------------------------------------
|
5168
|
+
EmployeeTest: test_creating_a_new_employee_with_invalid_dates_is_invalid
|
5169
|
+
------------------------------------------------------------------------
|
5170
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5171
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5172
|
+
-----------------------------------------------------------
|
5173
|
+
EmployeeTest: test_new_dates_can_be_populated_from_the_form
|
5174
|
+
-----------------------------------------------------------
|
5175
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5176
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5177
|
+
----------------------------------------------------------------------------------------------
|
5178
|
+
EmployeeTest: test_no_argument_error_is_raised_if_parseable_string_is_assigned_to_a_date_field
|
5179
|
+
----------------------------------------------------------------------------------------------
|
5180
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5181
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5182
|
+
-----------------------------------------------------------------
|
5183
|
+
EmployeeTest: test_employee_class_responds_to_acts_as_gov_uk_date
|
5184
|
+
-----------------------------------------------------------------
|
5185
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5186
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
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
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5191
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5192
|
+
------------------------------------------------------------------------------------------
|
5193
|
+
EmployeeTest: test_employee_instance_has_form_date_instance_variables_for_each_gov_uk_date
|
5194
|
+
------------------------------------------------------------------------------------------
|
5195
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5196
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5197
|
+
-----------------------------------------------------------------------------------
|
5198
|
+
EmployeeTest: test_that_form_population_values_can_be_extracted_from_the_date_field
|
5199
|
+
-----------------------------------------------------------------------------------
|
5200
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5201
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5202
|
+
----------------------------------------------
|
5203
|
+
EmployeeTest: test_valid_dates_raise_no_errors
|
5204
|
+
----------------------------------------------
|
5205
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5206
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5207
|
+
---------------------------------------------------------------------
|
5208
|
+
EmployeeTest: test_createing_a_new_employee_with_valid_dates_is_valid
|
5209
|
+
---------------------------------------------------------------------
|
5210
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5211
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
5212
|
+
----------------------------------------------------------------------------------------------------------------
|
5213
|
+
EmployeeTest: test_that_the_calling_the_field_name_on_employee_will_return_the_date_part_of_the_form_date_object
|
5214
|
+
----------------------------------------------------------------------------------------------------------------
|
5215
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5216
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5217
|
+
---------------------------------------------------------------------------------------------------------
|
5218
|
+
EmployeeTest: test_that_argument_error_is_raised_if_unparseable_string_object_is_assigned_to_a_date_field
|
5219
|
+
---------------------------------------------------------------------------------------------------------
|
5220
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5221
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5222
|
+
-------------------------------------------
|
5223
|
+
EmployeeTest: test_invalid_day_raises_error
|
5224
|
+
-------------------------------------------
|
5225
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5226
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5227
|
+
---------------------------------------------------------------------
|
5228
|
+
EmployeeTest: test_updating_existing_record_with_valid_dates_is_valid
|
5229
|
+
---------------------------------------------------------------------
|
5230
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5231
|
+
[1m[36mSQL (0.3ms)[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-01 13:00:09.926589"], ["updated_at", "2016-04-01 13:00:09.926589"]]
|
5232
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5233
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5234
|
+
[1m[35mSQL (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5236
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5237
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5238
|
+
--------------------------------------------
|
5239
|
+
EmployeeTest: test_nil_dates_raise_no_errors
|
5240
|
+
--------------------------------------------
|
5241
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5242
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5243
|
+
-----------------------------------------------------------------------
|
5244
|
+
EmployeeTest: test_that_we_can_assign_new_dates_to_the_form_date_object
|
5245
|
+
-----------------------------------------------------------------------
|
5246
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5247
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5248
|
+
--------------------------------------------------------------------------
|
5249
|
+
EmployeeTest: test_employee_has_class_variable_describing_all_gov_uk_dates
|
5250
|
+
--------------------------------------------------------------------------
|
5251
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5252
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5253
|
+
----------------------------------------------------
|
5254
|
+
EmployeesControllerTest: test_should_update_employee
|
5255
|
+
----------------------------------------------------
|
5256
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5257
|
+
[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-01 13:00:09.992804"], ["updated_at", "2016-04-01 13:00:09.992804"]]
|
5258
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5259
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5260
|
+
[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-01 13:00:09.994086"], ["updated_at", "2016-04-01 13:00:09.994086"]]
|
5261
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
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
|
+
[1m[35mEmployee Load (0.2ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 250]]
|
5265
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5266
|
+
[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-01 13:00:10.001339"], ["id", 250]]
|
5267
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5268
|
+
Redirected to http://test.host/employees/250
|
5269
|
+
Completed 302 Found in 6ms (ActiveRecord: 0.5ms)
|
5270
|
+
[1m[35mEmployee Load (0.1ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 250]]
|
5271
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5272
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5273
|
+
--------------------------------------------------
|
5274
|
+
EmployeesControllerTest: test_should_show_employee
|
5275
|
+
--------------------------------------------------
|
5276
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5277
|
+
[1m[35mSQL (0.2ms)[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-01 13:00:10.005025"], ["updated_at", "2016-04-01 13:00:10.005025"]]
|
5278
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5279
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5280
|
+
[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-01 13:00:10.006111"], ["updated_at", "2016-04-01 13:00:10.006111"]]
|
5281
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5282
|
+
Processing by EmployeesController#show as HTML
|
5283
|
+
Parameters: {"id"=>"252"}
|
5284
|
+
[1m[36mEmployee Load (0.1ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["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
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
5288
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5289
|
+
----------------------------------------------------
|
5290
|
+
EmployeesControllerTest: test_should_create_employee
|
5291
|
+
----------------------------------------------------
|
5292
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5293
|
+
[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-01 13:00:10.124085"], ["updated_at", "2016-04-01 13:00:10.124085"]]
|
5294
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5295
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5296
|
+
[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-01 13:00:10.125413"], ["updated_at", "2016-04-01 13:00:10.125413"]]
|
5297
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5298
|
+
[1m[35m (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5302
|
+
[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-01 13:00:10.128624"], ["updated_at", "2016-04-01 13:00:10.128624"]]
|
5303
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5304
|
+
Redirected to http://test.host/employees/256
|
5305
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
|
5306
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "employees"
|
5307
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
5308
|
+
[1m[35mEmployee Load (1.1ms)[0m SELECT "employees".* FROM "employees" ORDER BY "employees"."id" DESC LIMIT 1
|
5309
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5310
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5311
|
+
----------------------------------------------
|
5312
|
+
EmployeesControllerTest: test_should_get_index
|
5313
|
+
----------------------------------------------
|
5314
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5315
|
+
[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-01 13:00:10.133291"], ["updated_at", "2016-04-01 13:00:10.133291"]]
|
5316
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5317
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5318
|
+
[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-01 13:00:10.134331"], ["updated_at", "2016-04-01 13:00:10.134331"]]
|
5319
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5320
|
+
Processing by EmployeesController#index as HTML
|
5321
|
+
[1m[36mEmployee Load (0.2ms)[0m [1mSELECT "employees".* FROM "employees"[0m
|
5322
|
+
Rendered employees/index.html.erb within layouts/application (1.4ms)
|
5323
|
+
Completed 200 OK in 3ms (Views: 3.1ms | ActiveRecord: 0.2ms)
|
5324
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5325
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5326
|
+
--------------------------------------------------------------
|
5327
|
+
EmployeesControllerTest: test_should_render_gov_uk_date_fields
|
5328
|
+
--------------------------------------------------------------
|
5329
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5330
|
+
[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-01 13:00:10.140126"], ["updated_at", "2016-04-01 13:00:10.140126"]]
|
5331
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5332
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5333
|
+
[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-01 13:00:10.141198"], ["updated_at", "2016-04-01 13:00:10.141198"]]
|
5334
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5335
|
+
Processing by EmployeesController#edit as HTML
|
5336
|
+
Parameters: {"id"=>"259"}
|
5337
|
+
[1m[35mEmployee Load (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5342
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5343
|
+
--------------------------------------------
|
5344
|
+
EmployeesControllerTest: test_should_get_new
|
5345
|
+
--------------------------------------------
|
5346
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5347
|
+
[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-01 13:00:10.171156"], ["updated_at", "2016-04-01 13:00:10.171156"]]
|
5348
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5349
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5350
|
+
[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-01 13:00:10.172325"], ["updated_at", "2016-04-01 13:00:10.172325"]]
|
5351
|
+
[1m[35m (0.1ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5357
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5358
|
+
---------------------------------------------
|
5359
|
+
EmployeesControllerTest: test_should_get_edit
|
5360
|
+
---------------------------------------------
|
5361
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5362
|
+
[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-01 13:00:10.179488"], ["updated_at", "2016-04-01 13:00:10.179488"]]
|
5363
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5364
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5365
|
+
[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-01 13:00:10.180567"], ["updated_at", "2016-04-01 13:00:10.180567"]]
|
5366
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5367
|
+
Processing by EmployeesController#edit as HTML
|
5368
|
+
Parameters: {"id"=>"263"}
|
5369
|
+
[1m[36mEmployee Load (0.1ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["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
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5374
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5375
|
+
-----------------------------------------------------
|
5376
|
+
EmployeesControllerTest: test_should_destroy_employee
|
5377
|
+
-----------------------------------------------------
|
5378
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5379
|
+
[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-01 13:00:10.185864"], ["updated_at", "2016-04-01 13:00:10.185864"]]
|
5380
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5381
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5382
|
+
[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-01 13:00:10.186911"], ["updated_at", "2016-04-01 13:00:10.186911"]]
|
5383
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5384
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "employees"
|
5385
|
+
Processing by EmployeesController#destroy as HTML
|
5386
|
+
Parameters: {"id"=>"265"}
|
5387
|
+
[1m[36mEmployee Load (0.1ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["id", 265]]
|
5388
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5389
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "employees" WHERE "employees"."id" = $1[0m [["id", 265]]
|
5390
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5391
|
+
Redirected to http://test.host/employees
|
5392
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.4ms)
|
5393
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
5394
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5395
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5396
|
+
[1m[35m (0.2ms)[0m BEGIN
|
5397
|
+
-------------------------------------
|
5398
|
+
GovUkDateFieldsTest: test_squash_html
|
5399
|
+
-------------------------------------
|
5400
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
5401
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5402
|
+
-------------------------------------------------------------
|
5403
|
+
GovUkDateFieldsTest: test_placeholder_output_without_fieldset
|
5404
|
+
-------------------------------------------------------------
|
5405
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5406
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5407
|
+
--------------------------------------------------------
|
5408
|
+
GovUkDateFieldsTest: test_fieldset_output_with_form_hint
|
5409
|
+
--------------------------------------------------------
|
5410
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
5411
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5412
|
+
-------------------------------------------------------
|
5413
|
+
GovUkDateFieldsTest: test_basic_output_without_fieldset
|
5414
|
+
-------------------------------------------------------
|
5415
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5416
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5417
|
+
---------------------------------------------------------------
|
5418
|
+
GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
|
5419
|
+
---------------------------------------------------------------
|
5420
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5421
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5422
|
+
-----------------------------------------------------------
|
5423
|
+
GovUkDateFieldsTest: test_fieldset_output_with_legend_class
|
5424
|
+
-----------------------------------------------------------
|
5425
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5426
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5427
|
+
------------------------------------------
|
5428
|
+
GovUkDateFieldsTest: test_fieldset_with_id
|
5429
|
+
------------------------------------------
|
5430
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5431
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5432
|
+
[1m[35m (0.2ms)[0m BEGIN
|
5433
|
+
-------------------------------------------------------
|
5434
|
+
GovUkDateFieldsTest: test_basic_output_without_fieldset
|
5435
|
+
-------------------------------------------------------
|
5436
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5437
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5438
|
+
------------------------------------------
|
5439
|
+
GovUkDateFieldsTest: test_fieldset_with_id
|
5440
|
+
------------------------------------------
|
5441
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5442
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5443
|
+
--------------------------------------------------------
|
5444
|
+
GovUkDateFieldsTest: test_fieldset_output_with_form_hint
|
5445
|
+
--------------------------------------------------------
|
5446
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5447
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5448
|
+
-------------------------------------------------------------
|
5449
|
+
GovUkDateFieldsTest: test_placeholder_output_without_fieldset
|
5450
|
+
-------------------------------------------------------------
|
5451
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5452
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5453
|
+
---------------------------------------------------------------
|
5454
|
+
GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
|
5455
|
+
---------------------------------------------------------------
|
5456
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5457
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5458
|
+
-------------------------------------
|
5459
|
+
GovUkDateFieldsTest: test_squash_html
|
5460
|
+
-------------------------------------
|
5461
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5462
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5463
|
+
-----------------------------------------------------------
|
5464
|
+
GovUkDateFieldsTest: test_fieldset_output_with_legend_class
|
5465
|
+
-----------------------------------------------------------
|
5466
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5467
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
5468
|
+
[1m[35m (0.2ms)[0m BEGIN
|
5469
|
+
--------------------------------------------------
|
5470
|
+
EmployeesControllerTest: test_should_show_employee
|
5471
|
+
--------------------------------------------------
|
5472
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5473
|
+
[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-01 13:04:18.272208"], ["updated_at", "2016-04-01 13:04:18.272208"]]
|
5474
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5475
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5476
|
+
[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-01 13:04:18.277201"], ["updated_at", "2016-04-01 13:04:18.277201"]]
|
5477
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5478
|
+
Processing by EmployeesController#show as HTML
|
5479
|
+
Parameters: {"id"=>"267"}
|
5480
|
+
[1m[36mEmployee Load (0.2ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["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
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
5484
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5485
|
+
---------------------------------------------
|
5486
|
+
EmployeesControllerTest: test_should_get_edit
|
5487
|
+
---------------------------------------------
|
5488
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5489
|
+
[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-01 13:04:18.398968"], ["updated_at", "2016-04-01 13:04:18.398968"]]
|
5490
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5491
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5492
|
+
[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-01 13:04:18.400249"], ["updated_at", "2016-04-01 13:04:18.400249"]]
|
5493
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5494
|
+
Processing by EmployeesController#edit as HTML
|
5495
|
+
Parameters: {"id"=>"269"}
|
5496
|
+
[1m[35mEmployee Load (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5501
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5502
|
+
----------------------------------------------------
|
5503
|
+
EmployeesControllerTest: test_should_create_employee
|
5504
|
+
----------------------------------------------------
|
5505
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5506
|
+
[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-01 13:04:18.419921"], ["updated_at", "2016-04-01 13:04:18.419921"]]
|
5507
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5508
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5509
|
+
[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-01 13:04:18.421232"], ["updated_at", "2016-04-01 13:04:18.421232"]]
|
5510
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5511
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
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
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5515
|
+
[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-01 13:04:18.424316"], ["updated_at", "2016-04-01 13:04:18.424316"]]
|
5516
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5517
|
+
Redirected to http://test.host/employees/273
|
5518
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
|
5519
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
5520
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "employees"
|
5521
|
+
[1m[36mEmployee Load (0.3ms)[0m [1mSELECT "employees".* FROM "employees" ORDER BY "employees"."id" DESC LIMIT 1[0m
|
5522
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5523
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5524
|
+
--------------------------------------------
|
5525
|
+
EmployeesControllerTest: test_should_get_new
|
5526
|
+
--------------------------------------------
|
5527
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5528
|
+
[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-01 13:04:18.428209"], ["updated_at", "2016-04-01 13:04:18.428209"]]
|
5529
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5530
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5531
|
+
[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-01 13:04:18.429244"], ["updated_at", "2016-04-01 13:04:18.429244"]]
|
5532
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
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
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5538
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5539
|
+
--------------------------------------------------------------
|
5540
|
+
EmployeesControllerTest: test_should_render_gov_uk_date_fields
|
5541
|
+
--------------------------------------------------------------
|
5542
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5543
|
+
[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-01 13:04:18.435275"], ["updated_at", "2016-04-01 13:04:18.435275"]]
|
5544
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5545
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5546
|
+
[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-01 13:04:18.436423"], ["updated_at", "2016-04-01 13:04:18.436423"]]
|
5547
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5548
|
+
Processing by EmployeesController#edit as HTML
|
5549
|
+
Parameters: {"id"=>"276"}
|
5550
|
+
[1m[35mEmployee Load (0.3ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5555
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5556
|
+
----------------------------------------------
|
5557
|
+
EmployeesControllerTest: test_should_get_index
|
5558
|
+
----------------------------------------------
|
5559
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5560
|
+
[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-01 13:04:18.445189"], ["updated_at", "2016-04-01 13:04:18.445189"]]
|
5561
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5562
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5563
|
+
[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-01 13:04:18.446218"], ["updated_at", "2016-04-01 13:04:18.446218"]]
|
5564
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5565
|
+
Processing by EmployeesController#index as HTML
|
5566
|
+
[1m[36mEmployee Load (0.2ms)[0m [1mSELECT "employees".* FROM "employees"[0m
|
5567
|
+
Rendered employees/index.html.erb within layouts/application (1.4ms)
|
5568
|
+
Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.2ms)
|
5569
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5570
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5571
|
+
-----------------------------------------------------
|
5572
|
+
EmployeesControllerTest: test_should_destroy_employee
|
5573
|
+
-----------------------------------------------------
|
5574
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5575
|
+
[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-01 13:04:18.451368"], ["updated_at", "2016-04-01 13:04:18.451368"]]
|
5576
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5577
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5578
|
+
[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-01 13:04:18.452410"], ["updated_at", "2016-04-01 13:04:18.452410"]]
|
5579
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5580
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "employees"
|
5581
|
+
Processing by EmployeesController#destroy as HTML
|
5582
|
+
Parameters: {"id"=>"280"}
|
5583
|
+
[1m[36mEmployee Load (0.1ms)[0m [1mSELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1[0m [["id", 280]]
|
5584
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5585
|
+
[1m[36mSQL (0.1ms)[0m [1mDELETE FROM "employees" WHERE "employees"."id" = $1[0m [["id", 280]]
|
5586
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5587
|
+
Redirected to http://test.host/employees
|
5588
|
+
Completed 302 Found in 1ms (ActiveRecord: 0.4ms)
|
5589
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "employees"[0m
|
5590
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5591
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5592
|
+
----------------------------------------------------
|
5593
|
+
EmployeesControllerTest: test_should_update_employee
|
5594
|
+
----------------------------------------------------
|
5595
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5596
|
+
[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-01 13:04:18.457159"], ["updated_at", "2016-04-01 13:04:18.457159"]]
|
5597
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5598
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5599
|
+
[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-01 13:04:18.458112"], ["updated_at", "2016-04-01 13:04:18.458112"]]
|
5600
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
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
|
+
[1m[35mEmployee Load (0.1ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 282]]
|
5604
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5605
|
+
[1m[35mSQL (0.1ms)[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-01 13:04:18.460632"], ["id", 282]]
|
5606
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5607
|
+
Redirected to http://test.host/employees/282
|
5608
|
+
Completed 302 Found in 3ms (ActiveRecord: 0.4ms)
|
5609
|
+
[1m[35mEmployee Load (0.1ms)[0m SELECT "employees".* FROM "employees" WHERE "employees"."id" = $1 LIMIT 1 [["id", 282]]
|
5610
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5611
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5612
|
+
-------------------------------------------------------
|
5613
|
+
GovUkDateFieldsTest: test_basic_output_without_fieldset
|
5614
|
+
-------------------------------------------------------
|
5615
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5616
|
+
[1m[35m (0.0ms)[0m BEGIN
|
5617
|
+
-------------------------------------------------------------
|
5618
|
+
GovUkDateFieldsTest: test_placeholder_output_without_fieldset
|
5619
|
+
-------------------------------------------------------------
|
5620
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5621
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5622
|
+
------------------------------------------
|
5623
|
+
GovUkDateFieldsTest: test_fieldset_with_id
|
5624
|
+
------------------------------------------
|
5625
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5626
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5627
|
+
-----------------------------------------------------------
|
5628
|
+
GovUkDateFieldsTest: test_fieldset_output_with_legend_class
|
5629
|
+
-----------------------------------------------------------
|
5630
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5631
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5632
|
+
--------------------------------------------------------
|
5633
|
+
GovUkDateFieldsTest: test_fieldset_output_with_form_hint
|
5634
|
+
--------------------------------------------------------
|
5635
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5636
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5637
|
+
---------------------------------------------------------------
|
5638
|
+
GovUkDateFieldsTest: test_error_raised_if_invalid_options_given
|
5639
|
+
---------------------------------------------------------------
|
5640
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5641
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5642
|
+
-------------------------------------
|
5643
|
+
GovUkDateFieldsTest: test_squash_html
|
5644
|
+
-------------------------------------
|
5645
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5646
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5647
|
+
------------------------------------------------------------------------------------------
|
5648
|
+
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_a_nil_object_if_date_is_nil
|
5649
|
+
------------------------------------------------------------------------------------------
|
5650
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5651
|
+
[1m[35m (0.0ms)[0m BEGIN
|
5652
|
+
-----------------------------------------------------------------------------------------
|
5653
|
+
GovUkDateFields::FormDateTest: test_set_from_date_instantiates_the_attribute_and_is_valid
|
5654
|
+
-----------------------------------------------------------------------------------------
|
5655
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5656
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5657
|
+
---------------------------------------------------------------------------------
|
5658
|
+
GovUkDateFields::FormDateTest: test_setting_all_three_date_parts_changes_the_date
|
5659
|
+
---------------------------------------------------------------------------------
|
5660
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5661
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5662
|
+
-----------------------------------------------------------------------------------------------
|
5663
|
+
GovUkDateFields::FormDateTest: test_setting_all_date_parts_to_nil_sets_date_to_nil_and_is_valid
|
5664
|
+
-----------------------------------------------------------------------------------------------
|
5665
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5666
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5667
|
+
----------------------------------------------------------------------------------------------------------------------------------
|
5668
|
+
GovUkDateFields::FormDateTest: test_setting_date_parts_with_invalid_values_marks_date_as_invalid_and_leaves_date_variable_the_same
|
5669
|
+
----------------------------------------------------------------------------------------------------------------------------------
|
5670
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5671
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5672
|
+
-------------------------------------------------------------------------------
|
5673
|
+
GovUkDateFields::FormDateTest: test_set_one_date_part_leaves_the_rest_unchanged
|
5674
|
+
-------------------------------------------------------------------------------
|
5675
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5676
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5677
|
+
---------------------------------------------------------------------------------
|
5678
|
+
GovUkDateFields::FormDateTest: test_new_raises_error_if_called_from_outside_class
|
5679
|
+
---------------------------------------------------------------------------------
|
5680
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5681
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5682
|
+
-----------------------------------------------------------
|
5683
|
+
EmployeeTest: test_new_dates_can_be_populated_from_the_form
|
5684
|
+
-----------------------------------------------------------
|
5685
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5686
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5687
|
+
-----------------------------------------------------------------------
|
5688
|
+
EmployeeTest: test_that_we_can_assign_new_dates_to_the_form_date_object
|
5689
|
+
-----------------------------------------------------------------------
|
5690
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5691
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5692
|
+
------------------------------------------------------------------------
|
5693
|
+
EmployeeTest: test_creating_a_new_employee_with_invalid_dates_is_invalid
|
5694
|
+
------------------------------------------------------------------------
|
5695
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5696
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5697
|
+
----------------------------------------------
|
5698
|
+
EmployeeTest: test_valid_dates_raise_no_errors
|
5699
|
+
----------------------------------------------
|
5700
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5701
|
+
[1m[35m (0.1ms)[0m BEGIN
|
5702
|
+
--------------------------------------------------------------------------
|
5703
|
+
EmployeeTest: test_employee_has_class_variable_describing_all_gov_uk_dates
|
5704
|
+
--------------------------------------------------------------------------
|
5705
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
5706
|
+
[1m[35m (0.0ms)[0m BEGIN
|
5707
|
+
-------------------------------------------------------------------------
|
5708
|
+
EmployeeTest: test_updating_existing_record_with_invalid_dates_is_invalid
|
5709
|
+
-------------------------------------------------------------------------
|
5710
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5711
|
+
[1m[35mSQL (0.2ms)[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-01 13:04:18.478145"], ["updated_at", "2016-04-01 13:04:18.478145"]]
|
5712
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5713
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
5714
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
5715
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5716
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5717
|
+
---------------------------------------------------------------------------------------------------------
|
5718
|
+
EmployeeTest: test_that_argument_error_is_raised_if_unparseable_string_object_is_assigned_to_a_date_field
|
5719
|
+
---------------------------------------------------------------------------------------------------------
|
5720
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5721
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
5722
|
+
-------------------------------------------
|
5723
|
+
EmployeeTest: test_invalid_day_raises_error
|
5724
|
+
-------------------------------------------
|
5725
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
5726
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5727
|
+
------------------------------------------------------------------------------------------
|
5728
|
+
EmployeeTest: test_employee_instance_has_form_date_instance_variables_for_each_gov_uk_date
|
5729
|
+
------------------------------------------------------------------------------------------
|
5730
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5731
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5732
|
+
-----------------------------------------------------------
|
5733
|
+
EmployeeTest: test_that_nil_can_be_assigned_to_a_date_field
|
5734
|
+
-----------------------------------------------------------
|
5735
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5736
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
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
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5741
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5742
|
+
-----------------------------------------------------------------
|
5743
|
+
EmployeeTest: test_employee_class_responds_to_acts_as_gov_uk_date
|
5744
|
+
-----------------------------------------------------------------
|
5745
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5746
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5747
|
+
-----------------------------------------------------------------------------------
|
5748
|
+
EmployeeTest: test_that_form_population_values_can_be_extracted_from_the_date_field
|
5749
|
+
-----------------------------------------------------------------------------------
|
5750
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5751
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5752
|
+
----------------------------------------------------------------------------------------------------------------
|
5753
|
+
EmployeeTest: test_that_the_calling_the_field_name_on_employee_will_return_the_date_part_of_the_form_date_object
|
5754
|
+
----------------------------------------------------------------------------------------------------------------
|
5755
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5756
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
5757
|
+
----------------------------------------------------------------------------------------------
|
5758
|
+
EmployeeTest: test_no_argument_error_is_raised_if_parseable_string_is_assigned_to_a_date_field
|
5759
|
+
----------------------------------------------------------------------------------------------
|
5760
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5761
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5762
|
+
--------------------------------------------
|
5763
|
+
EmployeeTest: test_nil_dates_raise_no_errors
|
5764
|
+
--------------------------------------------
|
5765
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5766
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5767
|
+
---------------------------------------------------------------------
|
5768
|
+
EmployeeTest: test_createing_a_new_employee_with_valid_dates_is_valid
|
5769
|
+
---------------------------------------------------------------------
|
5770
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
5771
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
5772
|
+
---------------------------------------------------------------------
|
5773
|
+
EmployeeTest: test_updating_existing_record_with_valid_dates_is_valid
|
5774
|
+
---------------------------------------------------------------------
|
5775
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
5776
|
+
[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-01 13:04:18.488715"], ["updated_at", "2016-04-01 13:04:18.488715"]]
|
5777
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
5778
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
5779
|
+
[1m[35mSQL (0.2ms)[0m 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
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
5781
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
data/test/form_fields_test.rb
CHANGED
@@ -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="
|
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="
|
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="
|
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="
|
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="
|
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="
|
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="
|
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="
|
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="
|
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.
|
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-
|
12
|
+
date: 2016-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|