5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-06 22:05:44 +00:00
panel/test/models/deploy_zip_test.rb

22 lines
531 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class DeployLocalTest < ActiveSupport::TestCase
test 'se puede deployear' do
site = create :site
local = create :deploy_local, site: site
deploy = create :deploy_zip, site: site
# Primero tenemos que generar el sitio
local.deploy
escaped_path = Shellwords.escape(deploy.path)
assert deploy.deploy
assert File.file?(deploy.path)
assert_equal 'application/zip',
`file --mime-type "#{escaped_path}"`.split(' ').last
local.destroy
end
end