Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 967504 - tests
  • Loading branch information
fabianofranz committed Jun 19, 2013
1 parent e684e4a commit 7d47a5f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion console/app/models/rest_api/base.rb
Expand Up @@ -867,7 +867,7 @@ def http
class Base
self.idle_timeout = 4
self.open_timeout = 3
self.read_timeout = 240
self.read_timeout = 60

#
# Update the configuration of the Rest API. Use instead of
Expand Down
11 changes: 11 additions & 0 deletions console/test/functional/applications_controller_test.rb
Expand Up @@ -336,6 +336,17 @@ class ApplicationsControllerTest < ActionController::TestCase
assert_select 'h1', /Application 'idontexist' does not exist/
end

test "should result in error message when app creation times out" do
with_domain
Application.any_instance.expects(:save).raises(ActiveResource::TimeoutError.new('Timeout'))
post(:create, {:application => get_post_form})
assert app = assigns(:application)
assert !app.persisted?
assert_response :success
assert_template 'application_types/show'
assert_select '.alert.alert-error', /The application creation timed out/i
end

test 'invalid destroy should render page' do
Application.any_instance.expects(:destroy).returns(false)
delete :destroy, :id => with_app.name
Expand Down

0 comments on commit 7d47a5f

Please sign in to comment.