spec/models/logical/naf/construction_zone/boss_spec.rb in naf-2.1.11 vs spec/models/logical/naf/construction_zone/boss_spec.rb in naf-2.1.12
- old
+ new
@@ -76,19 +76,24 @@
job.application_run_group_name.should == application.command
end
end
describe '#enqueue_application_schedule' do
- let!(:job) { boss.enqueue_application_schedule(FactoryGirl.create(:schedule)) }
+ let!(:schedule) { FactoryGirl.create(:schedule) }
+ let!(:job) { boss.enqueue_application_schedule(schedule) }
it_should_behave_like 'create one historical job', 1
it 'create two historical jobs when schedule has a prerequisite' do
schedule = FactoryGirl.create(:schedule)
FactoryGirl.create(:schedule_prerequisite, application_schedule: schedule)
boss.enqueue_application_schedule(schedule)
::Naf::HistoricalJob.should have(3).records
+ end
+
+ it 'assign application_schedule_id correctly' do
+ job.application_schedule_id.should == schedule.id
end
end
describe '#enqueue_rails_command' do
let!(:job) { boss.enqueue_rails_command('::Process::Naf::Janitor.run') }