diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-16 16:08:25 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-16 16:08:25 +0000 |
commit | f9ce4ff559a1f41dea6981c8cc37cd7e9f71e521 (patch) | |
tree | c8b753af394e807a9b11481e95363bcc64d2b82c /test/functional/admin_controller_test.rb | |
parent | fefc6e6bec617fe4e6b438beedf1ca78f722ce45 (diff) | |
download | redmine-f9ce4ff559a1f41dea6981c8cc37cd7e9f71e521.tar.gz redmine-f9ce4ff559a1f41dea6981c8cc37cd7e9f71e521.zip |
Adds a few Plugin tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2040 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/admin_controller_test.rb')
-rw-r--r-- | test/functional/admin_controller_test.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index 9cb2d07f0..2bbd8fe97 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -79,10 +79,32 @@ class AdminControllerTest < Test::Unit::TestCase assert_equal [user.mail], mail.bcc end + def test_no_plugins + Redmine::Plugin.clear + + get :plugins + assert_response :success + assert_template 'plugins' + end + def test_plugins + # Register a few plugins + Redmine::Plugin.register :foo do + name 'Foo plugin' + author 'John Smith' + description 'This is a test plugin' + version '0.0.1' + settings :default => {'sample_setting' => 'value', 'foo'=>'bar'}, :partial => 'foo/settings' + end + Redmine::Plugin.register :bar do + end + get :plugins assert_response :success assert_template 'plugins' + + assert_tag :td, :content => 'Foo plugin' + assert_tag :td, :content => 'Bar' end def test_info |