1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

a little more testing

هذا الالتزام موجود في:
Adam Cooke
2017-05-08 16:39:32 +01:00
الأصل 61e3bad83f
التزام eee01c9e15
10 ملفات معدلة مع 257 إضافات و4 حذوفات

عرض الملف

@@ -0,0 +1,23 @@
require 'rails_helper'
describe OutgoingMessagePrototype do
it "should create a new message" do
with_global_server do |server|
domain = create(:domain, :owner => server)
prototype = OutgoingMessagePrototype.new(server, '127.0.0.1', 'TestSuite', {
:from => "test@#{domain.name}",
:to => "test@example.com",
:subject => "Test Message",
:plain_body => "A plain body!"
})
expect(prototype.valid?).to be true
message = prototype.create_message('test@example.com')
expect(message).to be_a Hash
expect(message[:id]).to be_a Integer
expect(message[:token]).to be_a String
end
end
end

عرض الملف

@@ -0,0 +1,14 @@
require 'rails_helper'
describe Server do
context "model" do
subject(:server) { create(:server) }
it "should have a UUID" do
expect(server.uuid).to be_a String
expect(server.uuid.length).to eq 36
end
end
end