Skip to content

Commit

Permalink
Add controller tests for openurl
Browse files Browse the repository at this point in the history
  • Loading branch information
ericgriffis committed Mar 23, 2017
1 parent ee2f094 commit 6fadd6c
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions spec/controllers/ex_cite/export_citations_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,6 @@
# include_examples "bad_request for all from_format and to_format"
end
end # end with from_format

# context "without from_format" do
# before { get :index, to_format: to_format, data: data }
#
# context "with valid data" do
# let(:data){ public_send(:"#{from_format}_data") }
#
# pending
# end
#
# context "with invalid data" do
# let(:data){ "%^&dfhgs^&" }
#
# pending
# # include_examples "bad_request for all from_format and to_format"
# end
# end # end without from_format
end # end using data

context "using id" do
Expand Down Expand Up @@ -130,5 +113,12 @@
include_examples "bad_request for all from_format and to_format"
end # end invalid resource_key
end

context "using openurl" do
before { get :index, to_format: to_format, rft_val_fmt: "info:ofi/fmt:kev:mtx:book" }
let(:data){ "http://test.host" + URI.decode(request.fullpath) }

include_examples "book success for all to_format", "openurl"
end
end
end

0 comments on commit 6fadd6c

Please sign in to comment.