1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00

test: add initial tests for Postal::SMTPServer::Client

هذا الالتزام موجود في:
Adam Cooke
2024-02-12 18:07:44 +00:00
الأصل ec636661d5
التزام dece1d487a
19 ملفات معدلة مع 780 إضافات و44 حذوفات

عرض الملف

@@ -0,0 +1,9 @@
# frozen_string_literal: true
FactoryBot.define do
factory :credential do
server
name { "Example Credential" }
type { "API" }
end
end

عرض الملف

@@ -38,7 +38,7 @@
FactoryBot.define do
factory :domain do
association :owner, factory: :user
association :owner, factory: :organization
sequence(:name) { |n| "example#{n}.com" }
verification_method { "DNS" }
verified_at { Time.now }

عرض الملف

@@ -0,0 +1,11 @@
# frozen_string_literal: true
FactoryBot.define do
factory :http_endpoint do
server
name { "HTTP endpoint" }
url { "https://example.com/endpoint" }
encoding { "BodyAsJSON" }
format { "Hash" }
end
end

عرض الملف

@@ -0,0 +1,14 @@
# frozen_string_literal: true
FactoryBot.define do
factory :route do
name { "test" }
mode { "Accept" }
spam_mode { "Mark" }
before(:create) do |route|
route.server ||= create(:server)
route.domain ||= create(:domain, owner: route.server)
end
end
end

عرض الملف

@@ -48,5 +48,9 @@ FactoryBot.define do
mode { "Live" }
provision_database { false }
sequence(:permalink) { |n| "server#{n}" }
trait :suspended do
suspended_at { Time.current }
end
end
end