Revision d7611b24
Added by Greg Sutcliffe over 11 years ago
- ID d7611b242760bffdd801a63dd4d3e63533ccfa52
test/functional/hosts_controller_test.rb | ||
---|---|---|
end
|
||
|
||
test "when host is saved after setBuild, the flash should inform it" do
|
||
mock(@host).setBuild {true}
|
||
mock(Host).find_by_name(@host.name) {@host}
|
||
Host.any_instance.stubs(:setBuild).returns(true)
|
||
@request.env['HTTP_REFERER'] = hosts_path
|
||
|
||
get :setBuild, {:id => @host.name}, set_session_user
|
||
... | ... | |
end
|
||
|
||
test "when host is not saved after setBuild, the flash should inform it" do
|
||
mock(@host).setBuild {false}
|
||
mock(Host).find_by_name(@host.name) {@host}
|
||
Host.any_instance.stubs(:setBuild).returns(false)
|
||
@request.env['HTTP_REFERER'] = hosts_path
|
||
|
||
get :setBuild, {:id => @host.name}, set_session_user
|
Also available in: Unified diff
fixes #2254 - Add STI to hosts table
Signed-off-by: Joseph Mitchell Magen <jmagen@redhat.com>
Signed-off-by: Ohad Levy <ohadlevy@gmail.com>