Sha256: 962fb2ffe624170812fc49412a4ba114ea8810db28dbda2e80187985ef9a5df4

Contents?: true

Size: 871 Bytes

Versions: 2

Compression:

Stored size: 871 Bytes

Contents

require 'test_helper'

describe Employee do
	before do
		@employee = Employee.new(name: 'Jantje', number: 123456782, accountnumber: 376815914, taxnumber: '123456782L01')
	end


	 it "check bsn with input number that is false" do
    	@employee.number = 123456781
    	@employee.valid?
    	@employee.errors.messages[:number].must_equal ["mijn boodschapje"]
    end

	 it "check rekening with input number that is false" do
    	@employee.accountnumber = 123456781
    	@employee.valid?
    	@employee.errors.messages[:accountnumber].must_equal ["ongeldig rekening nr"]
    end

	 it "check rekening with name too short" do
    	@employee.name= 'jan'
    	@employee.valid?
    	@employee.errors.messages[:name].must_equal ["is too short (minimum is 5 characters)"]
    end


	 it "check the record, must be correct!" do
    	@employee.valid?.must_equal true
    end


end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
elfproef_plan-0.0.6 test/models/employee_test.rb
elfproef_plan-0.0.5 test/models/employee_test.rb