diff options
| author | Zack Hobson | 2013-11-21 12:59:36 -0800 | 
|---|---|---|
| committer | Zack Hobson | 2013-11-21 12:59:36 -0800 | 
| commit | 6c903fd0c4ef000c01ff7a3ece0cf9da27b3530c (patch) | |
| tree | 79fdd29f3e43fa648f75b21af599fcf5941fb5ee /test/task_test.rb | |
| parent | ba28437f7a56e0f817fe1b51e46e756b7f6cc1f9 (diff) | |
| download | hcl-6c903fd0c4ef000c01ff7a3ece0cf9da27b3530c.tar.bz2 | |
coverage tests for app, command, task.
Diffstat (limited to 'test/task_test.rb')
| -rw-r--r-- | test/task_test.rb | 26 | 
1 files changed, 26 insertions, 0 deletions
| diff --git a/test/task_test.rb b/test/task_test.rb new file mode 100644 index 0000000..e69fcf9 --- /dev/null +++ b/test/task_test.rb @@ -0,0 +1,26 @@ + +class Task < Test::Unit::TestCase +  def test_cache_tasks +    HCl::Task.cache_tasks(REXML::Document.new(<<-EOD)) +<daily> +  <projects> +    <project> +      <name>Click and Type</name> +      <code></code> +      <id type="integer">3</id> +      <client>AFS</client> +      <tasks> +        <task> +          <name>Security support</name> +          <id type="integer">14</id> +          <billable type="boolean">true</billable> +        </task> +      </tasks> +    </project> +  </projects> +</daily> +    EOD +    assert_equal 1, HCl::Task.all.size +    assert_equal 'Security support', HCl::Task.all.first.name +  end +end | 
