5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-25 19:26:22 +00:00
panel/test/models/deploy_zip_test.rb

21 lines
640 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
2019-10-01 19:41:33 +00:00
require 'test_helper'
2019-10-01 19:41:33 +00:00
class DeployZipTest < ActiveSupport::TestCase
test 'se puede deployear' do
deploy_local = create :deploy_local
2019-10-01 19:41:33 +00:00
assert deploy_local.deploy
assert File.directory?(deploy_local.destination)
assert File.exist?(File.join(deploy_local.destination, 'index.html'))
assert_equal 3, deploy_local.build_stats.count
2019-10-01 19:41:33 +00:00
assert deploy_local.build_stats.map(&:bytes).compact.inject(:+).positive?
assert deploy_local.build_stats.map(&:seconds).compact.inject(:+).positive?
2019-10-01 19:41:33 +00:00
assert deploy_local.destroy
assert_not File.directory?(deploy_local.destination)
end
end