Skip to content

Commit

Permalink
Merge pull request #264 from sul-dlss/deprecate
Browse files Browse the repository at this point in the history
Deprecate the workflows controller
  • Loading branch information
jcoyne committed May 15, 2019
2 parents 7c3bd23 + f3edbee commit 0ba997c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/workflows_controller.rb
Expand Up @@ -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
2 changes: 2 additions & 0 deletions spec/controllers/workflows_controller_spec.rb
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 0ba997c

Please sign in to comment.