Sha256: 62ca8b6cf9b9aec1eb2340e93a75ca4667c1644bdc4f29e588ec54ad270a58d4

Contents?: true

Size: 354 Bytes

Versions: 7

Compression:

Stored size: 354 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Macros::Model::Destroy do
  subject(:destroy_step) { described_class.new }

  let(:ctx) { { model: user } }
  let(:user) { mock_model('User', destroy: true, destroyed?: true) }

  it 'expect to destroy model' do
    destroy_step.call(ctx, model: user)
    expect(ctx[:model].destroyed?).to be true
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ff-tbl-macros-2.0.2 spec/lib/model/destroy_spec.rb
ff-tbl-macros-2.0.1 spec/lib/model/destroy_spec.rb
ff-tbl-macros-2.0.0 spec/lib/model/destroy_spec.rb
ff-tbl-macros-1.0.2 spec/lib/model/destroy_spec.rb
ff-tbl-macros-1.0.1 spec/lib/model/destroy_spec.rb
ff-tbl-macros-1.0.0 spec/lib/model/destroy_spec.rb
ff-tbl-macros-0.1.8 spec/lib/model/destroy_spec.rb