2019-07-24 23:51:29 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-09-16 16:15:20 +00:00
|
|
|
require 'test_helper'
|
|
|
|
|
2019-07-24 23:51:29 +00:00
|
|
|
class DeployZipTest < ActiveSupport::TestCase
|
|
|
|
test 'se puede deployear' do
|
|
|
|
deploy_local = create :deploy_local
|
|
|
|
|
|
|
|
assert deploy_local.deploy
|
|
|
|
assert File.directory?(deploy_local.destination)
|
2019-09-16 16:15:20 +00:00
|
|
|
assert File.exist?(File.join(deploy_local.destination, 'robots.txt'))
|
2019-07-26 00:07:53 +00:00
|
|
|
assert_equal 3, deploy_local.build_stats.count
|
|
|
|
|
|
|
|
assert deploy_local.build_stats.map(&:bytes).compact.inject(:+).positive?
|
|
|
|
assert deploy_local.build_stats.map(&:seconds).compact.inject(:+).positive?
|
2019-07-24 23:51:29 +00:00
|
|
|
|
|
|
|
assert deploy_local.destroy
|
|
|
|
assert_not File.directory?(deploy_local.destination)
|
|
|
|
end
|
|
|
|
end
|