مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-11-30 21:32:30 +00:00
chore: upgrade to rails 7.1 and ruby 3.4 (#3457)
هذا الالتزام موجود في:
@@ -120,6 +120,8 @@ describe Server do
|
||||
end
|
||||
|
||||
describe "deletion" do
|
||||
let(:server) { create(:server) }
|
||||
|
||||
it "removes the database" do
|
||||
expect(server.message_db.provisioner).to receive(:drop).once
|
||||
server.provision_database = true
|
||||
|
||||
@@ -10,14 +10,12 @@ require "rspec/rails"
|
||||
require "spec_helper"
|
||||
require "factory_bot"
|
||||
require "timecop"
|
||||
require "database_cleaner"
|
||||
require "webmock/rspec"
|
||||
require "shoulda-matchers"
|
||||
|
||||
DatabaseCleaner.allow_remote_database_url = true
|
||||
ActiveRecord::Base.logger = Logger.new("/dev/null")
|
||||
|
||||
Dir[File.expand_path("factories/*.rb", __dir__)].each { |f| require f }
|
||||
Dir[File.expand_path("helpers/**/*.rb", __dir__)].each { |f| require f }
|
||||
|
||||
ActionMailer::Base.delivery_method = :test
|
||||
|
||||
@@ -59,8 +59,11 @@ RSpec.describe WebhookDeliveryService do
|
||||
end
|
||||
|
||||
it "updates the last used at time on the webhook" do
|
||||
service.call
|
||||
expect(webhook.reload.last_used_at).to be_within(1.second).of(Time.current)
|
||||
frozen_time = Time.current.change(usec: 0)
|
||||
Timecop.freeze(frozen_time) do
|
||||
service.call
|
||||
expect(webhook.reload.last_used_at).to eq(frozen_time)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم