Sha256: 0c61700434c6502cb7efee8c49b4ba2d47260f1e6ef37d6e3f39d57b6acbd1f2
Contents?: true
Size: 1.12 KB
Versions: 20
Compression:
Stored size: 1.12 KB
Contents
# frozen_string_literal: true require 'spec_helper' RSpec.describe GlobalRegistry::Bindings::Workers::DeleteEntityWorker do context 'entity 22527d88-3cba-11e7-b876-129bd0521531' do context 'valid global_registry_id' do let!(:request) do stub_request(:delete, 'https://backend.global-registry.org/entities/22527d88-3cba-11e7-b876-129bd0521531') .to_return(status: 200) end it 'should delete the entity' do worker = GlobalRegistry::Bindings::Workers::DeleteEntityWorker.new worker.perform('22527d88-3cba-11e7-b876-129bd0521531') expect(request).to have_been_requested.once end end context 'unknown global_registry_id' do let!(:request) do stub_request(:delete, 'https://backend.global-registry.org/entities/22527d88-3cba-11e7-b876-129bd0521531') .to_return(status: 404) end it 'should delete the entity' do worker = GlobalRegistry::Bindings::Workers::DeleteEntityWorker.new worker.perform('22527d88-3cba-11e7-b876-129bd0521531') expect(request).to have_been_requested.once end end end end
Version data entries
20 entries across 20 versions & 1 rubygems