Sha256: 794e77ae8b3b666e99f2a6b7abd03db8693f4be604e2ccad5ccde9ae39586d22

Contents?: true

Size: 505 Bytes

Versions: 1

Compression:

Stored size: 505 Bytes

Contents

require 'json'
require './test/test_includes'

class OwlTestDeploy < Test::Unit::TestCase

  include OwlTestIncludes

  GITHUB_PR_HOOK_PAYLOAD = File.read('./test/data/post-receive-hook.json')

  def test_deploy
    commit = Owl::Lib::Commit.new( GITHUB_PR_HOOK_PAYLOAD )
    assert commit.triggers_deploy?
  end

  def test_no_deploy
    data = GITHUB_PR_HOOK_PAYLOAD.gsub "#deploy", "#nope"
    commit = Owl::Lib::Commit.new( data )

    assert !commit.triggers_deploy?, "Should not deploy!"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
owl-cms-0.1.5 test/test_deploy.rb