Sha256: 1f0bfd18975a84607a1b364a45033c6bd536762e9e9fdc1f6be0cd821752cb82
Contents?: true
Size: 739 Bytes
Versions: 20
Compression:
Stored size: 739 Bytes
Contents
# frozen_string_literal: true require "spec_helper" module Decidim module Admin describe DestroyFeature do let!(:feature) { create(:feature) } subject { described_class.new(feature) } context "when everything is ok" do it "destroys the feature" do subject.call expect(Feature.where(id: feature.id)).not_to exist end it "fires the hooks" do results = {} feature.manifest.on(:destroy) do |feature| results[:feature] = feature end subject.call feature = results[:feature] expect(feature.id).to eq(feature.id) expect(feature).not_to be_persisted end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems