From 2aee71d5541ca51d4345a21a7bc9ed774420bc49 Mon Sep 17 00:00:00 2001 From: Luciano Prestes Cavalcanti Date: Wed, 2 Sep 2015 16:35:47 +0200 Subject: [PATCH] Remove validates presence of cnpj and coroporate name --- test/functional/gov_user_plugin_controller_test.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/functional/gov_user_plugin_controller_test.rb b/test/functional/gov_user_plugin_controller_test.rb index d940681..48b4fc4 100644 --- a/test/functional/gov_user_plugin_controller_test.rb +++ b/test/functional/gov_user_plugin_controller_test.rb @@ -100,26 +100,24 @@ class GovUserPluginControllerTest < ActionController::TestCase assert json_response["success"] end - should "not create a institution that already exists" do + should "create a institution without cnpj" do @controller.stubs(:verify_recaptcha).returns(true) fields = InstitutionTestHelper.generate_form_fields( - "Ministerio Publico da Uniao", + "Some Private Institution", "BR", "DF", "Brasilia", - "12.234.567/8900-10", - "PublicInstitution" + "", + "PrivateInstitution" ) - fields[:institutions][:governmental_power] = @gov_power.id - fields[:institutions][:governmental_sphere] = @gov_sphere.id - fields[:institutions][:juridical_nature] = @juridical_nature.id + fields[:institutions][:acronym] = "SPI" xhr :get, :new_institution, fields json_response = ActiveSupport::JSON.decode(@response.body) - assert !json_response["success"] + assert json_response["success"] end should "verify if institution name already exists" do -- libgit2 0.21.2