Sha256: 5deb250c95aea7158fe64cf7751a9a2f74f279ab4d1412d1b74cbb6a5bf1f1db

Contents?: true

Size: 402 Bytes

Versions: 14

Compression:

Stored size: 402 Bytes

Contents

require 'spec_helper'

describe NewUserForm do
  subject(:form) { NewUserForm.build(params) }

  let(:params) do
    { name: 'Jane', email: 'jane@doe.org' }
  end

  describe '#save' do
    it 'persists attributes and auto-map result to entity object' do
      form.save

      user = form.result.value

      expect(user).to eql(User.new(id: 1, name: 'Jane', email: 'jane@doe.org'))
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rom-rails-0.9.0 spec/integration/new_user_form_spec.rb
rom-rails-0.9.0.beta1 spec/integration/new_user_form_spec.rb
rom-rails-0.8.0 spec/integration/new_user_form_spec.rb
rom-rails-0.7.0 spec/integration/new_user_form_spec.rb
rom-rails-0.6.0 spec/integration/new_user_form_spec.rb
rom-rails-0.6.0.rc1 spec/integration/new_user_form_spec.rb
rom-rails-0.6.0.beta1 spec/integration/new_user_form_spec.rb
rom-rails-0.5.0 spec/integration/new_user_form_spec.rb
rom-rails-0.5.0.rc1 spec/integration/new_user_form_spec.rb
rom-rails-0.5.0.beta1 spec/integration/new_user_form_spec.rb
rom-rails-0.4.0 spec/integration/new_user_form_spec.rb
rom-rails-0.3.3 spec/dummy/spec/integration/new_user_form_spec.rb
rom-rails-0.3.2 spec/dummy/spec/integration/new_user_form_spec.rb
rom-rails-0.3.1 spec/dummy/spec/integration/new_user_form_spec.rb