From 8a416a15f04f862ea13563cd40553609bb4fae13 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Wed, 14 Aug 2019 19:34:55 +0500 Subject: [PATCH] Add interactor DestroyContactList --- app/interactors/destroy_contact_list.rb | 9 +++++++++ spec/interactors/destroy_contact_list_spec.rb | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 app/interactors/destroy_contact_list.rb create mode 100644 spec/interactors/destroy_contact_list_spec.rb diff --git a/app/interactors/destroy_contact_list.rb b/app/interactors/destroy_contact_list.rb new file mode 100644 index 0000000..116d480 --- /dev/null +++ b/app/interactors/destroy_contact_list.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class DestroyContactList + include Interactor + + def call + context.destroyable_contact_list.destroy! + end +end diff --git a/spec/interactors/destroy_contact_list_spec.rb b/spec/interactors/destroy_contact_list_spec.rb new file mode 100644 index 0000000..eb6357a --- /dev/null +++ b/spec/interactors/destroy_contact_list_spec.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe DestroyContactList do + pending "add some examples to (or delete) #{__FILE__}" +end