blob: bbdce898dd1b9af95fe5d2a238eecc075b5c93f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
class TaskTest < HCl::TestCase
def test_cache_file
assert_equal "#{HCl::App::HCL_DIR}/cache/tasks.yml", HCl::Task.cache_file
end
def test_cache_tasks_hash
HCl::Task.cache_tasks_hash({ projects: [{
name: "Click and Type",
id: 3,
client: "AFS",
tasks: [{
name: "Security support",
id: 14,
billable: true
}]
}]})
assert_equal 1, HCl::Task.all.size
assert_equal 'Security support', HCl::Task.all.first.name
end
end
|