From abeb2ebb9003691eaaad08871912932ed691c7d9 Mon Sep 17 00:00:00 2001 From: Evandro Jr Date: Thu, 20 Nov 2014 11:21:09 -0300 Subject: [PATCH] new unit tests added --- plugins/virtuoso/test/unit/dspace_harvest_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/virtuoso/test/unit/dspace_harvest_test.rb b/plugins/virtuoso/test/unit/dspace_harvest_test.rb index 704f275..feb2a0d 100644 --- a/plugins/virtuoso/test/unit/dspace_harvest_test.rb +++ b/plugins/virtuoso/test/unit/dspace_harvest_test.rb @@ -23,6 +23,8 @@ class DspaceHarvestTest < ActiveSupport::TestCase end should 'create delayed job when start' do + @settings = Noosfero::Plugin::Settings.new(environment, VirtuosoPlugin, mock_settings) + @settings.save! harvest = VirtuosoPlugin::DspaceHarvest.new(environment, "http://dspace1.noosfero.com") assert !harvest.find_job.present? harvest.start @@ -30,16 +32,14 @@ class DspaceHarvestTest < ActiveSupport::TestCase end should 'not duplicate harvest job' do + @settings = Noosfero::Plugin::Settings.new(environment, VirtuosoPlugin, mock_settings) + @settings.save! harvest = VirtuosoPlugin::DspaceHarvest.new(environment, "http://dspace1.noosfero.com") assert_difference "harvest.find_job.count", 1 do 5.times { harvest.start } end end - should 'harvest all dspaces from start' do - VirtuosoPlugin::DspaceHarvest.harvest_all(environment, true) - end - should 'try to harvest all dspaces from start without any setting' do VirtuosoPlugin::DspaceHarvest.harvest_all(environment, true) end -- libgit2 0.21.2