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-1.6.3 spec/models/user_spec.rb
curation_concerns-1.6.2 spec/models/user_spec.rb
curation_concerns-1.6.1 spec/models/user_spec.rb
curation_concerns-1.6.0 spec/models/user_spec.rb
curation_concerns-1.5.0 spec/models/user_spec.rb
curation_concerns-1.4.0 spec/models/user_spec.rb
curation_concerns-1.3.3 spec/models/user_spec.rb
curation_concerns-1.3.2 spec/models/user_spec.rb
curation_concerns-1.3.1 spec/models/user_spec.rb
curation_concerns-1.3.0 spec/models/user_spec.rb
curation_concerns-1.2.0 spec/models/user_spec.rb
curation_concerns-1.1.2 spec/models/user_spec.rb
curation_concerns-1.1.1 spec/models/user_spec.rb
curation_concerns-1.1.0 spec/models/user_spec.rb
curation_concerns-1.0.0 spec/models/user_spec.rb
curation_concerns-1.0.0.beta10 spec/models/user_spec.rb
curation_concerns-1.0.0.beta9 spec/models/user_spec.rb
curation_concerns-1.0.0.beta8 spec/models/user_spec.rb
curation_concerns-1.0.0.beta7 spec/models/user_spec.rb
curation_concerns-1.0.0.beta6 spec/models/user_spec.rb