mezuro_plugin_test.rb
868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require "test_helper"
class MezuroPluginTest < ActiveSupport::TestCase
def setup
@plugin = MezuroPlugin.new
end
should 'be a noosfero plugin' do
assert_kind_of Noosfero::Plugin, @plugin
end
should 'have name' do
assert_equal 'Mezuro', MezuroPlugin.plugin_name
end
should 'have description' do
assert_equal _('A metric analizer plugin.'), MezuroPlugin.plugin_description
end
should 'have configuration content type' do
assert_includes @plugin.content_types, MezuroPlugin::ConfigurationContent
end
should 'have project content type' do
assert_includes @plugin.content_types, MezuroPlugin::ProjectContent
end
should 'have stylesheet' do
assert @plugin.stylesheet?
end
should 'list javascript files' do
assert_equal ['javascripts/results.js', 'javascripts/toogle.js'], @plugin.js_files
end
end