Sha256: 0e97c1613125c8f7985642e03baea3eb774375afa469b98feb838c89c790a60c

Contents?: true

Size: 758 Bytes

Versions: 3

Compression:

Stored size: 758 Bytes

Contents

require 'spec_helper'

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

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

    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(Socialite::Identity) }
      its(:facebook) { should be_a(Socialite::FacebookIdentity) }

      # its(:twitter_identity) { should be_a(Socialite::Identity) }
      # its(:twitter) { should be_a(Socialite::TwitterIdentity) }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
socialite-0.0.1.beta4 spec/models/user_spec.rb
socialite-0.0.1.beta2 spec/models/user_spec.rb
socialite-0.0.1.beta spec/models/user_spec.rb