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.11.2 test/models/push_type/user_test.rb
push_type_core-0.11.1 test/models/push_type/user_test.rb
push_type_core-0.11.0.beta.2 test/models/push_type/user_test.rb
push_type_core-0.11.0.beta.1 test/models/push_type/user_test.rb
push_type_core-0.10.4 test/models/push_type/user_test.rb
push_type_core-0.10.3 test/models/push_type/user_test.rb
push_type_core-0.10.2 test/models/push_type/user_test.rb
push_type_core-0.10.1 test/models/push_type/user_test.rb
push_type_core-0.10.0 test/models/push_type/user_test.rb
push_type_core-0.10.0.beta.5 test/models/push_type/user_test.rb
push_type_core-0.10.0.beta.3 test/models/push_type/user_test.rb
push_type_core-0.9.5 test/models/push_type/user_test.rb
push_type_core-0.9.3 test/models/push_type/user_test.rb
push_type_core-0.9.2 test/models/push_type/user_test.rb
push_type_core-0.9.1 test/models/push_type/user_test.rb
push_type_core-0.9.0 test/models/push_type/user_test.rb
push_type_core-0.9.0.beta.4 test/models/push_type/user_test.rb
push_type_core-0.9.0.beta.3 test/models/push_type/user_test.rb
push_type_core-0.9.0.beta.2 test/models/push_type/user_test.rb
push_type_core-0.8.2 test/models/push_type/user_test.rb