Commit 7310a9362288aa4d9c1bd75feee2e74e927fa485

Authored by Marcos Pereira
1 parent aaad2520

removed a cnpj validation

Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com>
Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com>
lib/private_institution.rb
1 1 class PrivateInstitution < Institution
2   - validates :cnpj, :allow_nil=>true, :allow_blank=>true
3 2 end
... ...
test/unit/private_institution_test.rb
... ... @@ -25,21 +25,6 @@ class PrivateInstitutionTest &lt; ActiveSupport::TestCase
25 25 assert @institution.save
26 26 end
27 27  
28   - should "not save with a repeated cnpj" do
29   - msg = "Cnpj has already been taken"
30   - assert @institution.save
31   - sec_institution = create_private_institution(
32   - "Another Private Institution",
33   - "API",
34   - "BR",
35   - "DF",
36   - "Gama",
37   - "00.000.000/0001-00"
38   - )
39   -
40   - assert sec_institution.errors.full_messages.include? msg
41   - end
42   -
43 28 should "save without fantasy name" do
44 29 @institution.acronym = nil
45 30 @institution.community.save
... ...