From d8e440c8e05472b44a8e6cc59aecb6c53ba5a1d7 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 19 Jan 2017 23:41:12 +0100 Subject: Fix specs --- lib/api/helpers.rb | 2 +- spec/requests/api/helpers_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 6b81fbf294e..49c5f0652ab 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -226,7 +226,7 @@ module API end def render_api_error!(message, status) - error!({ 'message' => message }, status) + error!({ 'message' => message }, status, header) end def handle_api_exception(exception) diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb index b8ee2293a33..a89676fec93 100644 --- a/spec/requests/api/helpers_spec.rb +++ b/spec/requests/api/helpers_spec.rb @@ -12,6 +12,7 @@ describe API::Helpers, api: true do let(:params) { {} } let(:env) { { 'REQUEST_METHOD' => 'GET' } } let(:request) { Rack::Request.new(env) } + let(:header) { } def set_env(user_or_token, identifier) clear_env @@ -46,7 +47,7 @@ describe API::Helpers, api: true do allow_any_instance_of(self.class).to receive(:doorkeeper_guard){ value } end - def error!(message, status) + def error!(message, status, header) raise Exception.new("#{status} - #{message}") end -- cgit v1.2.1