sutty/test/workers/deploy_worker_test.rb

22 lines
441 B
Ruby
Raw Normal View History

2019-07-26 00:36:33 +00:00
# frozen_string_literal: true
class DeployWorkerTest < ActiveSupport::TestCase
test 'se puede compilar' do
rol = create :rol
site = rol.site
site.deploys << create(:deploy_zip, site: site)
site.save
DeployWorker.perform_async(site.id)
assert_not ActionMailer::Base.deliveries.empty?
site.deploys.each do |d|
assert File.exist?(d.try(:path) || d.try(:destination))
end
site.destroy
end
end