|
|
|
@ -39,6 +39,7 @@ describe RecordsController do
|
|
|
|
|
ip = '127.0.0.2' |
|
|
|
|
put :modify, :authentication_token => a_record.authentication_token, :ip => ip |
|
|
|
|
response.should be_success |
|
|
|
|
response.body.should == RecordsController::MODIFY_OK |
|
|
|
|
assigns(:record).should == a_record |
|
|
|
|
assigns(:record).content.should == ip |
|
|
|
|
end |
|
|
|
@ -48,9 +49,18 @@ describe RecordsController do
|
|
|
|
|
request.env["HTTP_X_FORWARDED_FOR"] = ip |
|
|
|
|
put :modify, :authentication_token => a_record.authentication_token |
|
|
|
|
response.should be_success |
|
|
|
|
response.body.should == RecordsController::MODIFY_OK |
|
|
|
|
assigns(:record).should == a_record |
|
|
|
|
assigns(:record).content.should == ip |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "errors when not A type @record with" do |
|
|
|
|
ip = '127.0.0.3' |
|
|
|
|
request.env["HTTP_X_FORWARDED_FOR"] = ip |
|
|
|
|
put :modify, :authentication_token => soa_record.authentication_token |
|
|
|
|
response.should be_success |
|
|
|
|
response.body.should == RecordsController::MODIFY_ERROR |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|