Sha256: f33eba81de76dcccc6acdfb6001ecb12c05dee74ae1b8c03943205a7b19af37b
Contents?: true
Size: 752 Bytes
Versions: 19
Compression:
Stored size: 752 Bytes
Contents
require 'rails_helper' describe Kuroko2::Execution do describe '.poll' do context 'with active execution' do let(:definition) { create(:job_definition) } let(:token) { create(:token) } context 'default queue' do subject { Kuroko2::Execution.poll } let!(:execution) { create(:execution, job_definition: definition, token: token, started_at: nil) } it { is_expected.to eq execution } end context 'given queue' do subject { Kuroko2::Execution.poll(queue) } let!(:execution) { create(:execution, job_definition: definition, token: token, started_at: nil, queue: queue) } let(:queue) { 'QUEUE' } it { is_expected.to eq execution } end end end end
Version data entries
19 entries across 19 versions & 1 rubygems