This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
122 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class WorkflowsController < ApplicationController | ||
# API call to get a full list of all workflows | ||
# | ||
# @param [querystring] Parameters can be specified in the querystring | ||
# * rows = number of results to return (set to 0 to only get count) | ||
# * first_modified = datetime in UTC (default: earliest possible date) | ||
# * last_modified = datetime in UTC (default: current time) | ||
# | ||
# Example: | ||
# http://localhost:3000/workflows.json # gives all workflows in json format | ||
# http://localhost:3000/workflows?rows=0 # returns only the count of workflows in json format | ||
# http://localhost:3000/workflows.xml?first_modified=2014-01-01T00:00:00Z&last_modified=2014-02-01T00:00:00Z# returns only the workflows published in January of 2014 in XML format | ||
# http://localhost:3000/workflows?first_modified=2014-01-01T00:00:00Z # returns only the workflows published SINCE January of 2014 up until today in json format | ||
# http://localhost:3000/workflows?first_modified=2014-01-01T00:00:00Z&rows=0 # returns only the count of workflows published SINCE January of 2014 up until today in json format | ||
def index | ||
result = find_all_fedora_type(params, :workflow) | ||
render_result(result) | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module WorkflowsHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'rails_helper' | ||
|
||
describe('Workflows Controller') do | ||
before :each do | ||
@fixture_data = FixtureData.new | ||
end | ||
|
||
it 'the index of workflows found should be all workflows when not supplied a date range and all their druids should be present' do | ||
VCR.use_cassette('all_workflows_index_call') do | ||
visit workflows_path | ||
response = JSON.parse(page.body) | ||
# Ensure All Four Collection Druids Are Present | ||
result_should_contain_druids(@fixture_data.workflow_druids, response[workflows_key]) | ||
# Ensure No Other Druids Are Present | ||
result_should_not_contain_druids(@fixture_data.accessioned_druids - @fixture_data.workflow_druids, response[workflows_key]) | ||
expect(response[items_key]).to be_nil # Ensure No Items Were Returned | ||
expect(response[apos_key]).to be_nil # Ensure No APOS Were Returned | ||
expect(response[collections_key]).to be_nil # Ensure No Collections Were Returned | ||
verify_counts_section(response, workflows_key => @fixture_data.workflow_druids.size) | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<doc> | ||
<field name ="id">druid:oo000oo0001</field> | ||
<field name ="title_ssim">assemblyWF</field> | ||
<field name ="objectType_ssim">workflow</field> | ||
<field name ="published_dttsim">2016-11-11T23:34:29Z</field> | ||
</doc> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<doc> | ||
<field name ="id">druid:oo000oo0002</field> | ||
<field name ="title_ssim">accessionWF</field> | ||
<field name ="objectType_ssim">workflow</field> | ||
<field name ="published_dttsim">2016-12-11T23:34:29Z</field> | ||
</doc> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,10 @@ def items_key | |
'items' | ||
end | ||
|
||
def workflows_key | ||
'workflows' | ||
end | ||
|
||
def apos_key | ||
'adminpolicies' | ||
end | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.