Sha256: 7ababee21532aab19f466274027e269083698be6a9100155ee53eec8ec31be2d

Contents?: true

Size: 654 Bytes

Versions: 34

Compression:

Stored size: 654 Bytes

Contents

require 'test_helper'

module PushType
  class UserTest < ActiveSupport::TestCase
    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

34 entries across 34 versions & 1 rubygems

Version Path
push_type_core-0.8.1 test/models/push_type/user_test.rb
push_type_core-0.8.0 test/models/push_type/user_test.rb
push_type_core-0.8.0.beta.3 test/models/push_type/user_test.rb
push_type_core-0.8.0.beta.2 test/models/push_type/user_test.rb
push_type_core-0.8.0.beta.1 test/models/push_type/user_test.rb
push_type_core-0.7.0 test/models/push_type/user_test.rb
push_type_core-0.7.0.beta.1 test/models/push_type/user_test.rb
push_type_core-0.6.0 test/models/push_type/user_test.rb
push_type_core-0.6.0.beta.4 test/models/push_type/user_test.rb
push_type_core-0.6.0.beta.3 test/models/push_type/user_test.rb
push_type_core-0.6.0.beta.2 test/models/push_type/user_test.rb
push_type_core-0.6.0.beta.1 test/models/push_type/user_test.rb
push_type_core-0.5.3 test/models/push_type/user_test.rb
push_type_core-0.5.2 test/models/push_type/user_test.rb