mirror of
https://0xacab.org/sutty/sutty
synced 2024-07-01 12:36:08 +00:00
26 lines
498 B
Ruby
26 lines
498 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'test_helper'
|
|
|
|
class DeployWwwTest < ActiveSupport::TestCase
|
|
setup do
|
|
@site = create :site
|
|
@deploy_www = @site.deploys.create type: 'DeployWww'
|
|
end
|
|
|
|
teardown do
|
|
@site&.destroy
|
|
end
|
|
|
|
test 'el hostname empieza con www' do
|
|
assert @deploy_www.hostname.start_with?('www.')
|
|
end
|
|
|
|
test 'se puede deployear' do
|
|
assert @site.deploy_local.deploy
|
|
|
|
assert @deploy_www.deploy
|
|
assert File.symlink?(@deploy_www.destination)
|
|
end
|
|
end
|