2019-10-01 19:41:33 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class DeployWwwTest < ActiveSupport::TestCase
|
2021-08-07 21:25:54 +00:00
|
|
|
setup do
|
|
|
|
@site = create :site
|
|
|
|
@deploy_www = @site.deploys.create type: 'DeployWww'
|
|
|
|
end
|
|
|
|
|
|
|
|
teardown do
|
|
|
|
@site&.destroy
|
|
|
|
end
|
2019-10-01 19:41:33 +00:00
|
|
|
|
2021-08-07 21:25:54 +00:00
|
|
|
test 'el hostname empieza con www' do
|
|
|
|
assert @deploy_www.hostname.start_with?('www.')
|
|
|
|
end
|
2019-10-01 19:41:33 +00:00
|
|
|
|
2021-08-07 21:25:54 +00:00
|
|
|
test 'se puede deployear' do
|
|
|
|
assert @site.deploy_local.deploy
|
2019-10-01 19:41:33 +00:00
|
|
|
|
2021-08-07 21:25:54 +00:00
|
|
|
assert @deploy_www.deploy
|
|
|
|
assert File.symlink?(@deploy_www.destination)
|
2019-10-01 19:41:33 +00:00
|
|
|
end
|
|
|
|
end
|