Sha256: 108791cdb07b2c2549e9368805c5d9293255cea4ef6ba13f3f4584edefcf8b58
Contents?: true
Size: 588 Bytes
Versions: 53
Compression:
Stored size: 588 Bytes
Contents
require 'spec_helper' describe User, type: :model do let(:user) { FactoryGirl.build(:user) } let(:another_user) { FactoryGirl.build(:user) } it 'has an email' do expect(user.user_key).to be_kind_of String end describe '#to_param' do let(:user) { described_class.new(email: 'jilluser@example.com') } it 'overrides to_param to make keys more recognizable in redis (and useable within Rails URLs)' do expect(user.to_param).to eq('jilluser@example-dot-com') end end it 'has a cancan ability defined' do expect(user).to respond_to(:can?) end end
Version data entries
53 entries across 53 versions & 1 rubygems