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

Version Path
curation_concerns-0.12.0.pre2 spec/models/user_spec.rb
curation_concerns-0.12.0.pre1 spec/models/user_spec.rb
curation_concerns-0.11.0 spec/models/user_spec.rb
curation_concerns-0.11.0.rc1 spec/models/user_spec.rb
curation_concerns-0.10.0 spec/models/user_spec.rb
curation_concerns-0.9.0 spec/models/user_spec.rb
curation_concerns-0.8.0 spec/models/user_spec.rb
curation_concerns-0.7.0 spec/models/user_spec.rb
curation_concerns-0.6.0 spec/models/user_spec.rb
curation_concerns-0.5.0 spec/models/user_spec.rb
curation_concerns-0.4.0 spec/models/user_spec.rb
curation_concerns-0.3.0 spec/models/user_spec.rb
curation_concerns-0.2.0 spec/models/user_spec.rb