Sha256: 2dfd99aa176e1a642a1c679b5df200751f06661af052108ec931e15fa137a884

Contents?: true

Size: 872 Bytes

Versions: 57

Compression:

Stored size: 872 Bytes

Contents

describe Spotlight::User do
  subject { Class.new }
  before { subject.extend described_class }

  describe '#invite_pending?' do
    it 'is false if the user was never invited in the first place' do
      expect(subject).to receive_messages(invited_to_sign_up?: false)
      expect(subject.invite_pending?).to be false
    end

    it 'is true if the user was invited but has not accepted' do
      expect(subject).to receive_messages(invited_to_sign_up?: true)
      expect(subject).to receive_messages(invitation_accepted?: false)
      expect(subject.invite_pending?).to be true
    end

    it 'is false if the user was invited and has accpeted the invite' do
      expect(subject).to receive_messages(invited_to_sign_up?: true)
      expect(subject).to receive_messages(invitation_accepted?: true)
      expect(subject.invite_pending?).to be false
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.4.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.3.3 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.3.2 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.3.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.3.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.2.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.2.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.1.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.2 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.0.rc6 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.0.rc5 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.0.rc4 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.0.rc3 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.0.rc2 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.0.0.rc1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-1.5.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-1.4.1 spec/models/spotlight/user_spec.rb