This commit is contained in:
cn 2013-04-27 15:20:08 +02:00
parent 09f4afe99e
commit 8c4cf4ecd4
1 changed files with 13 additions and 3 deletions

View File

@ -9,7 +9,7 @@ describe Dyndnsd::Daemon do
'users' => {
'test' => {
'password' => 'secret',
'hosts' => ['foo.example.org']
'hosts' => ['foo.example.org', 'bar.example.org']
}
}
}
@ -103,11 +103,21 @@ describe Dyndnsd::Daemon do
last_response.body.should == 'notfqdn'
end
it 'outputs status per hostname' do
pending
it 'outputs status for hostname' do
authorize 'test', 'secret'
get '/nic/update?hostname=foo.example.org&myip=1.2.3.4'
last_response.should be_ok
last_response.body.should == 'good 1.2.3.4'
end
it 'supports multiple hostnames in request' do
authorize 'test', 'secret'
pending
get '/nic/update?hostname=foo.example.org,bar.example.org&myip=1.2.3.4'
last_response.should be_ok
last_response.body.should == "good 1.2.3.4\ngood 1.2.3.4"
end
end