[#10799] Missing test
This commit is contained in:
parent
4266a76db6
commit
dfa3276cb6
1 changed files with 13 additions and 0 deletions
|
@ -2,6 +2,19 @@
|
|||
|
||||
module Maintenance
|
||||
RSpec.describe UpdateAPIEntrepriseTokenExpiresAtTask do
|
||||
describe '#collection' do
|
||||
subject(:collection) { described_class.collection }
|
||||
|
||||
let!(:procedures_with_token) { create_list(:procedure, 3, api_entreprise_token: JWT.encode({}, nil, 'none')) }
|
||||
let!(:procedure_without_token) { create(:procedure, api_entreprise_token: nil) }
|
||||
|
||||
it 'returns procedures with api_entreprise_token present' do
|
||||
expect(collection).to match_array(procedures_with_token)
|
||||
|
||||
expect(collection).not_to include(procedure_without_token)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#process" do
|
||||
subject(:process) { described_class.process(procedure) }
|
||||
|
||||
|
|
Loading…
Reference in a new issue