Skip to content
Snippets Groups Projects
Unverified Commit d8e440c8 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix specs

parent a5afcf0f
No related branches found
No related tags found
No related merge requests found
Loading
@@ -226,7 +226,7 @@ module API
Loading
@@ -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)
Loading
Loading
Loading
@@ -12,6 +12,7 @@ describe API::Helpers, api: true do
Loading
@@ -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
Loading
@@ -46,7 +47,7 @@ describe API::Helpers, api: true do
Loading
@@ -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
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment