Commit abeb2ebb9003691eaaad08871912932ed691c7d9
1 parent
b6e87108
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
new unit tests added
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
plugins/virtuoso/test/unit/dspace_harvest_test.rb
| ... | ... | @@ -23,6 +23,8 @@ class DspaceHarvestTest < ActiveSupport::TestCase |
| 23 | 23 | end |
| 24 | 24 | |
| 25 | 25 | should 'create delayed job when start' do |
| 26 | + @settings = Noosfero::Plugin::Settings.new(environment, VirtuosoPlugin, mock_settings) | |
| 27 | + @settings.save! | |
| 26 | 28 | harvest = VirtuosoPlugin::DspaceHarvest.new(environment, "http://dspace1.noosfero.com") |
| 27 | 29 | assert !harvest.find_job.present? |
| 28 | 30 | harvest.start |
| ... | ... | @@ -30,16 +32,14 @@ class DspaceHarvestTest < ActiveSupport::TestCase |
| 30 | 32 | end |
| 31 | 33 | |
| 32 | 34 | should 'not duplicate harvest job' do |
| 35 | + @settings = Noosfero::Plugin::Settings.new(environment, VirtuosoPlugin, mock_settings) | |
| 36 | + @settings.save! | |
| 33 | 37 | harvest = VirtuosoPlugin::DspaceHarvest.new(environment, "http://dspace1.noosfero.com") |
| 34 | 38 | assert_difference "harvest.find_job.count", 1 do |
| 35 | 39 | 5.times { harvest.start } |
| 36 | 40 | end |
| 37 | 41 | end |
| 38 | 42 | |
| 39 | - should 'harvest all dspaces from start' do | |
| 40 | - VirtuosoPlugin::DspaceHarvest.harvest_all(environment, true) | |
| 41 | - end | |
| 42 | - | |
| 43 | 43 | should 'try to harvest all dspaces from start without any setting' do |
| 44 | 44 | VirtuosoPlugin::DspaceHarvest.harvest_all(environment, true) |
| 45 | 45 | end | ... | ... |