Sha256: 7fbbc9f914a6e4348d599534971f3aed7655a12b89aeb99e536ab7862e9e1b58

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-1.1.1 spec/integration/user_commands_spec.rb
rom-rails-1.1.0 spec/integration/user_commands_spec.rb
rom-rails-1.0.1 spec/integration/user_commands_spec.rb
rom-rails-1.0.0 spec/integration/user_commands_spec.rb
rom-rails-1.0.0.rc1 spec/integration/user_commands_spec.rb
rom-rails-1.0.0.beta1 spec/integration/user_commands_spec.rb