Commit d8e440c8 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix specs

parent a5afcf0f
......@@ -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)
......
......@@ -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
......
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