cirandas.net

ref: master

plugins/lattes_curriculum/test/unit/academic_info_test.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require "test_helper"

class AcademicInfoTest < ActiveSupport::TestCase

  def setup
    @academic_info = AcademicInfo.new
  end

  should 'not ve invalid lattes url' do
    @academic_info.lattes_url = "http://softwarelivre.org/"
    refute @academic_info.save
  end

  should 'accept blank lattes url' do
    @academic_info.lattes_url = ""
    assert @academic_info.save
  end

  should 'save with correct lattes url' do
    @academic_info.lattes_url = "http://lattes.cnpq.br/2193972715230641"
    assert @academic_info.save
  end
end