Icecast test models
This commit is contained in:
parent
932f59cea6
commit
66558b70e9
|
|
@ -0,0 +1,20 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe IcecastAdminAuthentication do
|
||||
|
||||
let(:admin) { IcecastAdminAuthentication.new }
|
||||
|
||||
before(:all) do
|
||||
|
||||
end
|
||||
|
||||
it "save" do
|
||||
admin.save.should be_true
|
||||
end
|
||||
|
||||
it "non-string password should be checked" do
|
||||
admin.source_password = 1
|
||||
admin.save.should be_false
|
||||
admin.errors[:source_password].should == ['is not a string']
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe IcecastLimit do
|
||||
|
||||
let(:limit) { IcecastLimit.new }
|
||||
|
||||
before(:all) do
|
||||
|
||||
end
|
||||
|
||||
it "save" do
|
||||
limit.save.should be_true
|
||||
end
|
||||
|
||||
it "non-integer clients should be checked" do
|
||||
limit.clients = "a"
|
||||
limit.save.should be_false
|
||||
limit.errors[:clients].should == ['is not a number']
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue