Commit d8e440c8 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix specs

parent a5afcf0f
...@@ -226,7 +226,7 @@ module API ...@@ -226,7 +226,7 @@ module API
end end
def render_api_error!(message, status) def render_api_error!(message, status)
error!({ 'message' => message }, status) error!({ 'message' => message }, status, header)
end end
def handle_api_exception(exception) def handle_api_exception(exception)
......
...@@ -12,6 +12,7 @@ describe API::Helpers, api: true do ...@@ -12,6 +12,7 @@ describe API::Helpers, api: true do
let(:params) { {} } let(:params) { {} }
let(:env) { { 'REQUEST_METHOD' => 'GET' } } let(:env) { { 'REQUEST_METHOD' => 'GET' } }
let(:request) { Rack::Request.new(env) } let(:request) { Rack::Request.new(env) }
let(:header) { }
def set_env(user_or_token, identifier) def set_env(user_or_token, identifier)
clear_env clear_env
...@@ -46,7 +47,7 @@ describe API::Helpers, api: true do ...@@ -46,7 +47,7 @@ describe API::Helpers, api: true do
allow_any_instance_of(self.class).to receive(:doorkeeper_guard){ value } allow_any_instance_of(self.class).to receive(:doorkeeper_guard){ value }
end end
def error!(message, status) def error!(message, status, header)
raise Exception.new("#{status} - #{message}") raise Exception.new("#{status} - #{message}")
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment