diff options
| -rw-r--r-- | app/controllers/api/v1/compliance_check_sets_controller.rb | 6 | ||||
| -rw-r--r-- | config/routes.rb | 1 | ||||
| -rw-r--r-- | spec/controllers/api/v1/compliance_check_sets_controller_spec.rb | 7 | 
3 files changed, 14 insertions, 0 deletions
| diff --git a/app/controllers/api/v1/compliance_check_sets_controller.rb b/app/controllers/api/v1/compliance_check_sets_controller.rb new file mode 100644 index 000000000..b7206014d --- /dev/null +++ b/app/controllers/api/v1/compliance_check_sets_controller.rb @@ -0,0 +1,6 @@ +class Api::V1::ComplianceCheckSetsController < Api::V1::IbooController +  defaults resource_class: ComplianceCheckSet + +  def validated +  end +end diff --git a/config/routes.rb b/config/routes.rb index 0470d9aec..8d7d4c92d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -63,6 +63,7 @@ ChouetteIhm::Application.routes.draw do        resources :stop_areas, only: [:index, :show]        resources :time_tables, only: [:index, :show]        resources :vehicle_journeys, only: :show +      post 'compliance_check_sets/validated', to: 'compliance_check_sets#validated'      end    end diff --git a/spec/controllers/api/v1/compliance_check_sets_controller_spec.rb b/spec/controllers/api/v1/compliance_check_sets_controller_spec.rb new file mode 100644 index 000000000..c9c58c7cb --- /dev/null +++ b/spec/controllers/api/v1/compliance_check_sets_controller_spec.rb @@ -0,0 +1,7 @@ +RSpec.describe Api::V1::ComplianceCheckSetsController, type: :controller do +  describe "POST #validate" do +    it "calls [that thing that updates statuses on ComplianceCheckX]" do +      post :validated, params: { id: 5 } +    end +  end +end | 
