Sha256: 38c7dae41b8017d1873d8f5245368bd6a50deeec279414adb47fffd50ce702d5

Contents?: true

Size: 531 Bytes

Versions: 5

Compression:

Stored size: 531 Bytes

Contents

require 'test_helper'

module Adherent
  class MemberTest < ActiveSupport::TestCase
    test 'un membre n est pas valide si son numéro existe déja' do
      @m = adherent_members(:one)
      nm =Member.new(number:@m.number, name:@m.name, forname:@m.forname)
      assert_equal false, nm.valid?
    end
    
    test 'mais l est si le numéro est différent' do
      @m = adherent_members(:one)
      nm =Member.new(number:(@m.number + '1'), name:@m.name, forname:@m.forname)
      assert_equal true, nm.valid?
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
adherent-0.1.0 test/unit/adherent/member_test.rb
adherent-0.0.9 test/unit/adherent/member_test.rb
adherent-0.0.7 test/unit/adherent/member_test.rb
adherent-0.0.6 test/unit/adherent/member_test.rb
adherent-0.0.5 test/unit/adherent/member_test.rb