Sha256: 7fe4dc4bb7b3df083d509b7f0ab021d224bf8ee2286f9521bdd52a9d2ccd76e1

Contents?: true

Size: 903 Bytes

Versions: 18

Compression:

Stored size: 903 Bytes

Contents

# frozen_string_literal: true

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

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.2 spec/models/spotlight/user_spec.rb
blacklight-spotlight-3.0.0.alpha.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.13.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.12.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.12.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.11.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.10.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.9.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.8.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.7.2 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.7.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.7.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.6.1.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.6.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.6.0 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.5.2 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.5.1 spec/models/spotlight/user_spec.rb
blacklight-spotlight-2.5.0 spec/models/spotlight/user_spec.rb