diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2008-07-28 17:30:32 -0700 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2008-07-28 17:30:32 -0700 |
commit | 99ea01ec936aaa9bfc131435fad1834900547f58 (patch) | |
tree | baf2d45cee5b22914323bcd9f06428d39187c1ee | |
parent | e87140a719c216cabe91ed9b27af8b93ec50aa86 (diff) | |
download | redmine-plugin-hooks.tar.gz redmine-plugin-hooks.zip |
Added test coverage for Redmine::Plugin.add_hookplugin-hooks
-rw-r--r-- | test/unit/lib/redmine/plugin_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/plugin_test.rb b/test/unit/lib/redmine/plugin_test.rb index c7d792475..22d90ae3a 100644 --- a/test/unit/lib/redmine/plugin_test.rb +++ b/test/unit/lib/redmine/plugin_test.rb @@ -4,5 +4,17 @@ class Redmine::PluginTest < Test::Unit::TestCase def test_sanity assert true end + + def test_add_hook + assert_equal false, Redmine::Plugin::Hook::Manager.hook_registered?(:issue_show) + Redmine::Plugin.add_hook(:issue_show, Proc.new { }) + assert Redmine::Plugin::Hook::Manager.hook_registered?(:issue_show) + end + + def test_add_hook_invalid + assert_equal false, Redmine::Plugin::Hook::Manager.hook_registered?(:invalid) + Redmine::Plugin.add_hook(:invalid, Proc.new { }) + assert Redmine::Plugin::Hook::Manager.hook_registered?(:invalid) + end end |