Skip to content

Commit

Permalink
Drop unused code.
Browse files Browse the repository at this point in the history
Use classes from spree/core.
  • Loading branch information
tomdonarski committed Nov 20, 2023
1 parent ad59fe1 commit cc305d4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 70 deletions.
2 changes: 1 addition & 1 deletion app/controllers/spree/admin/promotions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def clone
end

def duplicate
CreatePromotionBatch.call(@promotion, params[:batch_size].to_i)
Spree::Promotions::CreatePromotionBatch.call(@promotion, params[:batch_size].to_i)

flash[:success] = Spree.t('promotion_cloned')
redirect_to spree.edit_admin_promotion_url(@promotion)
Expand Down
14 changes: 0 additions & 14 deletions app/jobs/duplicate_promotion_job.rb

This file was deleted.

7 changes: 0 additions & 7 deletions app/services/create_promotion_batch.rb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/controllers/spree/admin/promotions_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
let(:batch_size) { 2 }

it "calls the duplication service" do
expect(CreatePromotionBatch)
expect(Promotions::CreatePromotionBatch)
.to receive(:call)
.with(promotion1, batch_size)

Expand Down
28 changes: 0 additions & 28 deletions spec/jobs/duplicate_promotion_job_spec.rb

This file was deleted.

19 changes: 0 additions & 19 deletions spec/services/create_promotion_batch_spec.rb

This file was deleted.

0 comments on commit cc305d4

Please sign in to comment.