Sha256: 1ef60b504d7cc78c85066d320d6e28096db078df150d7f96f41ec9f20f647d21

Contents?: true

Size: 630 Bytes

Versions: 17

Compression:

Stored size: 630 Bytes

Contents

require "test_helper"

module PushType
  describe User do
    let(:user) { User.new }

    it { user.wont_be :valid? }

    it 'should be valid with required attributes' do
      user.attributes = FactoryGirl.attributes_for :user
      user.must_be :valid?
    end

    describe '#initials' do
      let(:user_one)    { User.new name: 'Joe' }
      let(:user_two)    { User.new name: 'Joe Bloggs' }
      let(:user_three)  { User.new name: 'Joe Smithe Henley-Bloggs' }
      it { user_one.initials.must_equal 'J' }
      it { user_two.initials.must_equal 'JB' }
      it { user_three.initials.must_equal 'JH' }
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
push_type_core-0.5.1 test/models/push_type/user_test.rb
push_type_core-0.5.0 test/models/push_type/user_test.rb
push_type_core-0.5.0.alpha.5 test/models/push_type/user_test.rb
push_type_core-0.5.0.alpha.4 test/models/push_type/user_test.rb
push_type_core-0.5.0.alpha.3 test/models/push_type/user_test.rb
push_type_core-0.5.0.alpha.2 test/models/push_type/user_test.rb
push_type_core-0.5.0.alpha.1 test/models/push_type/user_test.rb
push_type_core-0.4.0 test/models/push_type/user_test.rb
push_type_core-0.4.0.beta.3 test/models/push_type/user_test.rb
push_type_core-0.3.3 test/models/push_type/user_test.rb
push_type_core-0.3.1 test/models/push_type/user_test.rb
push_type_core-0.2.1 test/models/push_type/user_test.rb
push_type_core-0.2.0 test/models/push_type/user_test.rb
push_type_core-0.2.0.beta2 test/models/push_type/user_test.rb
push_type_core-0.1.1 test/models/push_type/user_test.rb
push_type_core-0.1.0 test/models/push_type/user_test.rb
push_type_core-0.1.0.beta3 test/models/push_type/user_test.rb