[#4289] Added empty hooks needed for the Timesheet.

This commit is contained in:
Eric Davis
2010-07-23 09:35:44 -07:00
parent a341be0344
commit 7192adb231
9 changed files with 145 additions and 0 deletions
@@ -0,0 +1,26 @@
require File.dirname(__FILE__) + '/../../../../test_helper'
class RedmineRate::Hooks::PluginTimesheetViewsTimesheetGroupHeaderTest < ActionController::TestCase
include Redmine::Hook::Helper
def controller
@controller ||= ApplicationController.new
@controller.response ||= ActionController::TestResponse.new
@controller
end
def request
@request ||= ActionController::TestRequest.new
end
def hook(args={})
call_hook :plugin_timesheet_views_timesheet_group_header, args
end
context "#plugin_timesheet_views_timesheet_group_header" do
should "return an empty string" do
@response.body = hook
assert @response.body.blank?
end
end
end
@@ -0,0 +1,26 @@
require File.dirname(__FILE__) + '/../../../../test_helper'
class RedmineRate::Hooks::PluginTimesheetViewsTimesheetTimeEntryTest < ActionController::TestCase
include Redmine::Hook::Helper
def controller
@controller ||= ApplicationController.new
@controller.response ||= ActionController::TestResponse.new
@controller
end
def request
@request ||= ActionController::TestRequest.new
end
def hook(args={})
call_hook :plugin_timesheet_views_timesheet_time_entry, args
end
context "#plugin_timesheet_views_timesheet_time_entry" do
should "return an empty string" do
@response.body = hook
assert @response.body.blank?
end
end
end
@@ -0,0 +1,26 @@
require File.dirname(__FILE__) + '/../../../../test_helper'
class RedmineRate::Hooks::PluginTimesheetViewsTimesheetTimeEntrySumTest < ActionController::TestCase
include Redmine::Hook::Helper
def controller
@controller ||= ApplicationController.new
@controller.response ||= ActionController::TestResponse.new
@controller
end
def request
@request ||= ActionController::TestRequest.new
end
def hook(args={})
call_hook :plugin_timesheet_views_timesheet_time_entry_sum, args
end
context "#plugin_timesheet_views_timesheet_time_entry_sum" do
should "return an empty string" do
@response.body = hook
assert @response.body.blank?
end
end
end
@@ -0,0 +1,26 @@
require File.dirname(__FILE__) + '/../../../../test_helper'
class RedmineRate::Hooks::PluginTimesheetViewsTimesheetsTimeEntryRowClassTest < ActionController::TestCase
include Redmine::Hook::Helper
def controller
@controller ||= ApplicationController.new
@controller.response ||= ActionController::TestResponse.new
@controller
end
def request
@request ||= ActionController::TestRequest.new
end
def hook(args={})
call_hook :plugin_timesheet_views_timesheets_time_entry_row_class, args
end
context "#plugin_timesheet_views_timesheets_time_entry_row_class" do
should "return an empty string" do
@response.body = hook
assert @response.body.blank?
end
end
end