Revision dbb7c2f2
Added by Paul Kelly about 13 years ago
- ID dbb7c2f28c16840743d7c0c8e50c0b82e8b36006
test/functional/smart_proxies_controller_test.rb | ||
---|---|---|
|
||
def test_create_valid
|
||
SmartProxy.any_instance.stubs(:valid?).returns(true)
|
||
SmartProxy.any_instance.stubs(:to_s).returns("puppet")
|
||
post :create, {}, set_session_user
|
||
assert_redirected_to smart_proxies_url
|
||
end
|
||
|
||
def test_create_valid_json
|
||
SmartProxy.any_instance.stubs(:valid?).returns(true)
|
||
SmartProxy.any_instance.stubs(:to_s).returns("puppet")
|
||
post :create, {:format => "json"}, set_session_user
|
||
proxy = ActiveSupport::JSON.decode(@response.body)
|
||
assert_response :created
|
Also available in: Unified diff
Fixes #789 - External node interpolation of puppetmaster
Signed-off-by: Paul Kelly <paul.ian.kelly@googlemail.com>