GitLab's annual major release is around the corner. Along with a lot of new and exciting features, there will be a few breaking changes. Learn more here.

Commit b2995332 authored by Rogério Cardoso's avatar Rogério Cardoso
Browse files

Increasing test coverage and revome useless file. #10, #7

Signed-off-by: Rogério Cardoso's avatarRogerio Cardoso <>
Signed-off-by: Henrique Pötter's avatarHenrique Potter <>
parent 353994b8
Pipeline #3616841 passed with stage
in 3 minutes and 32 seconds
require 'rest-client'
require 'json'
require 'exceptions/actuator_exception'
class ActuatorController < ApplicationController
class ActuatorException < Exception
attr_accessor :request_status
def initialize (code)
@request_status = code
\ No newline at end of file
......@@ -218,5 +218,16 @@ describe ActuatorController, :type => :controller do
expect(response.status).to eq(405)
expect(response.body).to eq(service_response.to_json)
it 'Should return http error 500 - when there is Internal Error.' do
cap = Capability.create!(name: 'led')
PlatformResourceCapability.create!(capability_id:, platform_resource_id:
url_params = {uuid: '1', capability: 'led'}
allow(@controller).to receive(:call_to_actuator_cap_status).and_raise Exception
get :cap_status, params: url_params
expect(response.status).to eq(500)
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