diff options
Diffstat (limited to 'test/tc_mauve_history.rb')
-rw-r--r-- | test/tc_mauve_history.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/tc_mauve_history.rb b/test/tc_mauve_history.rb new file mode 100644 index 0000000..62342f2 --- /dev/null +++ b/test/tc_mauve_history.rb @@ -0,0 +1,36 @@ +$:.unshift "../lib" + +require 'th_mauve' +require 'mauve/history' +require 'mauve/server' + +class TcMauveHistory < Mauve::UnitTest + + include Mauve + + def setup + super + setup_database + end + + def teardown + teardown_database + super + end + + def test_save + Server.instance.setup + # + # Make sure events save without nasty html + # + h = History.new(:alerts => [], :type => "note", :event => "Hello <script>alert(\"arse\");</script>") + + h.save + h.reload + assert_equal("Hello ",h.event, "HTML not stripped correctly on save.") + end +end + + + + |