2021-03-08 18:12:59 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
RSpec.shared_examples 'records an onboarding progress action' do |action|
|
|
|
|
include AfterNextHelpers
|
|
|
|
|
|
|
|
it do
|
2022-10-11 01:57:18 +05:30
|
|
|
expect_next(Onboarding::ProgressService, namespace)
|
2021-03-08 18:12:59 +05:30
|
|
|
.to receive(:execute).with(action: action).and_call_original
|
|
|
|
|
|
|
|
subject
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
RSpec.shared_examples 'does not record an onboarding progress action' do
|
|
|
|
it do
|
2022-10-11 01:57:18 +05:30
|
|
|
expect(Onboarding::ProgressService).not_to receive(:new)
|
2021-03-08 18:12:59 +05:30
|
|
|
|
|
|
|
subject
|
|
|
|
end
|
|
|
|
end
|