feat: Platform API improvements (#2900)

- Platform APIs to add and update custom attributes to users
- Platform APIs to delete accounts
- Platform APIs to delete users
This commit is contained in:
Sojan Jose
2021-09-02 18:29:45 +05:30
committed by GitHub
parent a60a33679f
commit ad83d1bb71
18 changed files with 160 additions and 12 deletions

View File

@@ -0,0 +1,20 @@
require 'rails_helper'
RSpec.describe DeleteObjectJob, type: :job do
subject(:job) { described_class.perform_later(account) }
let(:account) { create(:account) }
it 'enqueues the job' do
expect { job }.to have_enqueued_job(described_class)
.with(account)
.on_queue('default')
end
context 'when an object is passed to the job' do
it 'is deleted' do
described_class.perform_now(account)
expect { account.reload }.to raise_error(ActiveRecord::RecordNotFound)
end
end
end