From f3edbee401d04dfbda4b0a21b2462b6cb5229e21 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 13 May 2019 10:58:46 -0500 Subject: [PATCH] Deprecate the workflows controller The workflow service handles this now --- app/controllers/workflows_controller.rb | 1 + spec/controllers/workflows_controller_spec.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 10471ebfd..d66e2d64f 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -2,6 +2,7 @@ class WorkflowsController < ApplicationController def initial + Honeybadger.notify("Call to deprecated API #{request.path}. The workflow server now knows about initial_workflow") render content_type: 'application/xml', body: Dor::WorkflowObject.initial_workflow(params[:wf_name]) end end diff --git a/spec/controllers/workflows_controller_spec.rb b/spec/controllers/workflows_controller_spec.rb index f72f88b6f..49c52eb39 100644 --- a/spec/controllers/workflows_controller_spec.rb +++ b/spec/controllers/workflows_controller_spec.rb @@ -5,6 +5,7 @@ RSpec.describe WorkflowsController do before do login + allow(Honeybadger).to receive(:notify) end it "GET of /workflows/{wfname}/initial returns the an initial instance of the workflow's xml" do @@ -21,5 +22,6 @@ expect(response.content_type).to eq('application/xml') expect(response.body).to match(/start-accession/) + expect(Honeybadger).to have_received(:notify).with(/Call to deprecated API/) end end