2014-01-14 21:22:05 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
|
|
describe IcecastSecurity do
|
|
|
|
|
|
|
|
|
|
let(:iobj) { IcecastSecurity.new }
|
2014-01-16 03:29:52 +00:00
|
|
|
let(:output) { StringIO.new }
|
2014-01-14 21:22:05 +00:00
|
|
|
|
2014-01-16 03:29:52 +00:00
|
|
|
=begin
|
|
|
|
|
example output:
|
2014-01-14 21:22:05 +00:00
|
|
|
|
2014-01-16 03:29:52 +00:00
|
|
|
<security>
|
|
|
|
|
<chroot>0</chroot>
|
|
|
|
|
<changeowner>
|
|
|
|
|
<user>hotdog</user>
|
|
|
|
|
<group>mongrel</group>
|
|
|
|
|
<changeowner>
|
|
|
|
|
</security>
|
2014-01-14 21:22:05 +00:00
|
|
|
|
2014-01-16 03:29:52 +00:00
|
|
|
=end
|
2014-01-14 21:22:05 +00:00
|
|
|
|
|
|
|
|
it "save" do
|
|
|
|
|
iobj.changeowner_user ="hotdog"
|
|
|
|
|
iobj.changeowner_group ="mongrel"
|
|
|
|
|
iobj.save.should be_true
|
2014-01-16 03:29:52 +00:00
|
|
|
iobj.dumpXml(1, output)
|
2014-01-14 21:22:05 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end
|