Created
December 17, 2014 20:48
-
-
Save no-reply/8ee00359eba050a5f10f to your computer and use it in GitHub Desktop.
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
require 'spec_helper' | |
describe Krikri::HarvestJob do | |
let(:activity) { create(:krikri_activity) } | |
describe '#perform' do | |
before do | |
allow_any_instance_of(Harvester).to receive(:run).and_return(true) | |
end | |
it 'retrieves an activity from the database and runs it' do | |
Krikri::HarvestJob.perform(activity.id) | |
activity.reload | |
assert activity.end_time > activity.start_time | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment