Fix Que 0.x time parsing in RoR 6

This commit is contained in:
Karl Erik Õunapuu 2020-06-01 10:55:52 +03:00
parent 5814d3d34c
commit b71f52e601
3 changed files with 6 additions and 6 deletions

View file

@ -4,8 +4,8 @@ source 'https://rubygems.org'
gem 'iso8601', '0.12.1' # for dates and times
gem 'rails', '~> 6.0'
gem 'rest-client'
gem 'uglifier'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'uglifier'
# load env
gem 'figaro', '1.1.1'
@ -73,8 +73,8 @@ gem 'directo', github: 'internetee/directo', branch: 'master'
group :development do
# deploy
gem 'mina', '0.3.1' # for fast deployment
gem 'listen', '3.2.1'
gem 'mina', '0.3.1' # for fast deployment
end
group :development, :test do

View file

@ -13,7 +13,7 @@ class RegistrarAreaDomainsIntegrationTest < ApplicationIntegrationTest
assert_response :ok
assert_equal "#{Mime[:csv]}; charset=utf-8", response.headers['Content-Type']
assert_equal %(attachment; filename="Domains_#{l(now, format: :filename)}.csv; filename*=UTF-8''Domains_#{l(now, format: :filename)}.csv"),
assert_equal %(attachment; filename="Domains_#{l(now, format: :filename)}.csv"; filename*=UTF-8''Domains_#{l(now, format: :filename)}.csv),
response.headers['Content-Disposition']
assert_not_empty response.body
end

View file

@ -9,7 +9,7 @@ class PaperTrailLearningTest < ActiveSupport::TestCase
ActiveRecord::Base.connection.create_table :posts do |t|
t.string :title
# Otherwise `touch_with_version` fails silently
# Otherwise `touch` fails silently
t.datetime :updated_at
end
end
@ -55,11 +55,11 @@ class PaperTrailLearningTest < ActiveSupport::TestCase
assert_equal 'update', version.event
end
def test_touch_with_version
def test_touch
@record = Post.create!(title: 'any')
assert_difference -> { @record.versions.size } do
@record.paper_trail.touch_with_version
@record.touch
end
end
end