diff --git a/app/models/detector/journal.rb b/app/models/detector/journal.rb index 24021d6..f63b504 100644 --- a/app/models/detector/journal.rb +++ b/app/models/detector/journal.rb @@ -14,6 +14,15 @@ class Detector # Detector::Journal stores information about academic journals loaded from external sources to allow us to check our # incoming Terms against these information class Journal + attr_reader :detections + + # shared singleton methods + extend Detector::BulkChecker + + def initialize(phrase) + @detections = Detector::Journal.full_term_match(phrase) + end + # Identify journals in which the incoming phrase matches a Journal.name exactly # # @note We always store the Journal.name downcased, so we should also always downcase the phrase diff --git a/test/models/detector/bulk_checker_test.rb b/test/models/detector/bulk_checker_test.rb index 92ad967..e621786 100644 --- a/test/models/detector/bulk_checker_test.rb +++ b/test/models/detector/bulk_checker_test.rb @@ -11,7 +11,9 @@ class CitationTest < ActiveSupport::TestCase end test 'journal_bulk_checker' do - skip 'Detector::Journal does not yet support bulk_checker' + bulk = Detector::Journal.check_all_matches(output: true) + + assert_equal(1, bulk.count) end test 'lcsh_bulk_checker' do