Sha256: 62d808df73a9b2bfe3c8cd8c0beb881adde221c1d8c9a9c28feaf5edbd2cccab

Contents?: true

Size: 349 Bytes

Versions: 6

Compression:

Stored size: 349 Bytes

Contents

RSpec.describe 'User commands' do
  subject(:users) { rom.commands[:users] }

  describe 'delete' do
    it 'deletes record' do
      relation = rom.relations[:users]
      relation.insert(name: 'Piotr', email: 'piotr@test.com')

      expect {
        users.delete.by_name('Piotr').call
      }.to change(relation, :count).by(-1)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rom-rails-2.4.0 spec/integration/user_commands_spec.rb
rom-rails-2.3.1 spec/integration/user_commands_spec.rb
rom-rails-2.3.0 spec/integration/user_commands_spec.rb
rom-rails-2.2.0 spec/integration/user_commands_spec.rb
rom-rails-2.0.0 spec/integration/user_commands_spec.rb
rom-rails-1.2.0 spec/integration/user_commands_spec.rb