summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorZack Hobson2013-12-26 13:46:21 -0800
committerZack Hobson2013-12-26 13:46:21 -0800
commiteada20ef66ade0b9a98ef5f03256a73ce428244b (patch)
tree2deab4053087e3d8f0907da68e98fc54d1f403a8 /test
parent830ae68c2ee291ecd4e1d83b48d38224f434c98f (diff)
downloadhcl-eada20ef66ade0b9a98ef5f03256a73ce428244b.tar.bz2
timesheet_resource: API improvements
Diffstat (limited to 'test')
-rw-r--r--test/app_test.rb2
-rw-r--r--test/command_test.rb6
-rw-r--r--test/task_test.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/test/app_test.rb b/test/app_test.rb
index 1fc1073..0efc0bc 100644
--- a/test/app_test.rb
+++ b/test/app_test.rb
@@ -13,7 +13,7 @@ class AppTest < HCl::TestCase
end
def test_command_show
- HCl::DayEntry.expects(:all).returns [HCl::DayEntry.new(
+ HCl::DayEntry.expects(:get_all).returns [HCl::DayEntry.new(
hours:'2.06', notes:'hi world', project:'App'
)]
HCl::App.command 'show'
diff --git a/test/command_test.rb b/test/command_test.rb
index dd6f440..59456cf 100644
--- a/test/command_test.rb
+++ b/test/command_test.rb
@@ -24,7 +24,7 @@ class CommandTest < HCl::TestCase
end
def test_tasks
- HCl::Task.expects(:all).returns([HCl::Task.new(
+ HCl::Task.expects(:get_all).returns([HCl::Task.new(
id:123,
name: 'Dev',
project: HCl::Project.new(id:456, name:'App', client:'Bob', code:'b')
@@ -34,7 +34,7 @@ class CommandTest < HCl::TestCase
end
def test_show
- HCl::DayEntry.expects(:all).returns([HCl::DayEntry.new({
+ HCl::DayEntry.expects(:get_all).returns([HCl::DayEntry.new({
hours:'2.06',
notes: 'hi world',
project: 'App'
@@ -46,7 +46,7 @@ class CommandTest < HCl::TestCase
end
def test_aliases
- HCl::Task.expects(:all).returns([HCl::Task.new(
+ HCl::Task.expects(:get_all).returns([HCl::Task.new(
id:123,
name: 'Dev',
project: HCl::Project.new(id:456, name:'App', client:'Bob', code:'b')
diff --git a/test/task_test.rb b/test/task_test.rb
index bbdce89..4eb73bc 100644
--- a/test/task_test.rb
+++ b/test/task_test.rb
@@ -15,7 +15,7 @@ class TaskTest < HCl::TestCase
billable: true
}]
}]})
- assert_equal 1, HCl::Task.all.size
- assert_equal 'Security support', HCl::Task.all.first.name
+ assert_equal 1, HCl::Task.get_all.size
+ assert_equal 'Security support', HCl::Task.get_all.first.name
end
end