hot fix for specs
This commit is contained in:
parent
00e92d9672
commit
25620af00c
|
@ -21,7 +21,7 @@ class ApplicationController < ActionController::Base
|
|||
redirect_to forbidden_url, :alert => t("flash.exception_message")
|
||||
end
|
||||
|
||||
unless Rails.application.config.consider_all_requests_local
|
||||
unless Rails.env.development?
|
||||
|
||||
rescue_from Exception, :with => :render_500
|
||||
rescue_from ActiveRecord::RecordNotFound,
|
||||
|
@ -40,7 +40,7 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
def render_500(e)
|
||||
#check for exceptions Airbrake ignores by default and exclude them from manual Airbrake notification
|
||||
unless AIRBRAKE_IGNORE.include? e.class
|
||||
if Rails.env.production? && !AIRBRAKE_IGNORE.include?(e.class)
|
||||
notify_airbrake(e)
|
||||
end
|
||||
render_error 500
|
||||
|
|
|
@ -99,7 +99,7 @@ shared_examples_for "api projects user with show rights" do
|
|||
|
||||
it "should render 404 for non existing name and owner name" do
|
||||
get :get_id, :name => 'NONE_EXISTING_NAME', :owner => @project.owner.uname, :format => :json
|
||||
response.body.should == {:message => I18n.t("flash.404_message")}.to_json
|
||||
response.body.should == {:status => 404, :message => I18n.t("flash.404_message")}.to_json
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue