Sha256: dfa4feb0a5982b58c67a703442c6fda45b6f0b907138639b92413c226e4dd7f2

Contents?: true

Size: 704 Bytes

Versions: 2

Compression:

Stored size: 704 Bytes

Contents

require 'spec_helper'

describe User do
  let(:linked_user) { FactoryGirl.create(:linked_user) }

  it { should have_many(:identities).dependent(:destroy) }

  it { should have_db_column(:name).of_type(:string) }
  it { should have_db_column(:email).of_type(:string) }
  it { should have_db_column(:password_digest).of_type(:string) }

  it { should have_db_index(:email).unique(true) }

  context 'with associated identities' do
    subject { linked_user }

    before do
      subject.identities.count.should eql(2)
    end

    its('identities.count') { should eql(2) }

    its(:facebook_identity) { should be_a(identity_class) }

    its(:twitter_identity) { should be_a(identity_class) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
socialite-0.1.0.pre.3 spec/models/user_spec.rb
socialite-0.1.0.pre.2 spec/models/user_spec.rb