Sha256: 35ab90d7e6c213d24b6eacaeabeadbeee3626d59844de205a21fcbe6c9a4ed28

Contents?: true

Size: 562 Bytes

Versions: 1

Compression:

Stored size: 562 Bytes

Contents

require 'test_helper'

class AccountTest < ActiveSupport::TestCase
  
  fixtures :all
  
  test "accepts nested attributes for users" do    
    @account = Account.create({ :user_attributes => { :tw_share => false, :fb_share => false, :tb_share => true } })
    @user = @account.user
    
    assert @user.account, "should have an account"
    assert !@user.fb_share?, "should have accepted nested attributes"
    assert !@user.tw_share?, "should have accepted nested attributes"
    assert @user.tb_share?, "should have accepted nested attributes"
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
serializer-0.0.8 test/dummy/test/unit/account_test.rb