Fix tests

This commit is contained in:
Urban Rotnik 2019-12-17 14:21:05 +01:00
parent dfe3c5292e
commit 2e88f194bc
5 changed files with 11 additions and 11 deletions

View file

@ -1,4 +1,4 @@
/* global ListColumnHelper ChecklistColumnHelper Status SmartAnnotation I18n GLOBAL_CONSTANTS DateTimeHelper formatJS */ /* global ListColumnHelper ChecklistColumnHelper Status SmartAnnotation I18n GLOBAL_CONSTANTS DateTimeHelper */
$.fn.dataTable.render.newRowName = function(formId, $cell) { $.fn.dataTable.render.newRowName = function(formId, $cell) {
$cell.html(` $cell.html(`

View file

@ -20,7 +20,7 @@ describe RepositoryDateRangeValue, type: :model do
{ {
start_time: Time.utc(2000, 10, 10).to_s, start_time: Time.utc(2000, 10, 10).to_s,
end_time: Time.utc(2000, 10, 12).to_s end_time: Time.utc(2000, 10, 12).to_s
} }.to_json
end end
it do it do
@ -33,7 +33,7 @@ describe RepositoryDateRangeValue, type: :model do
{ {
start_time: Time.utc(2000, 10, 10).to_s, start_time: Time.utc(2000, 10, 10).to_s,
end_time: Time.utc(2000, 10, 11, 4, 11).to_s end_time: Time.utc(2000, 10, 11, 4, 11).to_s
} }.to_json
end end
it do it do
@ -57,7 +57,7 @@ describe RepositoryDateRangeValue, type: :model do
{ {
start_time: Time.now.utc.to_s, start_time: Time.now.utc.to_s,
end_time: (Time.now.utc + 1.day).to_s end_time: (Time.now.utc + 1.day).to_s
} }.to_json
end end
it do it do

View file

@ -35,7 +35,7 @@ describe RepositoryDateTimeRangeValueBase, type: :model do
{ {
start_time: Time.now.utc.to_s, start_time: Time.now.utc.to_s,
end_time: (Time.zone.now + 2.days).utc.to_s end_time: (Time.zone.now + 2.days).utc.to_s
} }.to_json
end end
context 'when update data' do context 'when update data' do

View file

@ -20,7 +20,7 @@ describe RepositoryDateTimeRangeValue, type: :model do
{ {
start_time: Time.utc(2000, 10, 10).to_s, start_time: Time.utc(2000, 10, 10).to_s,
end_time: Time.utc(2000, 10, 12).to_s end_time: Time.utc(2000, 10, 12).to_s
} }.to_json
end end
it do it do
@ -33,7 +33,7 @@ describe RepositoryDateTimeRangeValue, type: :model do
{ {
start_time: Time.utc(2000, 10, 10).to_s, start_time: Time.utc(2000, 10, 10).to_s,
end_time: Time.utc(2000, 10, 11).to_s end_time: Time.utc(2000, 10, 11).to_s
} }.to_json
end end
it do it do
@ -57,7 +57,7 @@ describe RepositoryDateTimeRangeValue, type: :model do
{ {
start_time: Time.now.utc.to_s, start_time: Time.now.utc.to_s,
end_time: (Time.now.utc + 1.day).to_s end_time: (Time.now.utc + 1.day).to_s
} }.to_json
end end
it do it do

View file

@ -20,7 +20,7 @@ describe RepositoryTimeRangeValue, type: :model do
{ {
start_time: Time.utc(2000, 10, 10, 12, 13).to_s, start_time: Time.utc(2000, 10, 10, 12, 13).to_s,
end_time: Time.utc(2000, 10, 12, 4, 11).to_s end_time: Time.utc(2000, 10, 12, 4, 11).to_s
} }.to_json
end end
it do it do
@ -33,7 +33,7 @@ describe RepositoryTimeRangeValue, type: :model do
{ {
start_time: Time.utc(2000, 10, 10).to_s, start_time: Time.utc(2000, 10, 10).to_s,
end_time: Time.utc(2012, 10, 14, 4, 11).to_s end_time: Time.utc(2012, 10, 14, 4, 11).to_s
} }.to_json
end end
it do it do
@ -57,7 +57,7 @@ describe RepositoryTimeRangeValue, type: :model do
{ {
start_time: Time.now.utc.to_s, start_time: Time.now.utc.to_s,
end_time: (Time.now.utc + 1.day).to_s end_time: (Time.now.utc + 1.day).to_s
} }.to_json
end end
it do it do