From fdd8cbe6445c0c40ed07bcd3e7d67235b7b057ab Mon Sep 17 00:00:00 2001 From: Gabriela Navarro Date: Wed, 5 Nov 2014 19:37:47 +0000 Subject: [PATCH] fix_tests: Fix tests for institution and software --- test/functional/profile_editor_controller_test.rb | 9 --------- test/unit/software_license_info_test.rb | 10 ++++------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index fc2d035..642f34b 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -29,15 +29,6 @@ class ProfileEditorControllerTest < ActionController::TestCase @institution_list << InstitutionTestHelper.create_public_institution("Tribunal Regional da Uniao", "TRU", "BR", "DF", "Brasilia", @juridical_nature, @govPower, @govSphere, "12.345.678/9012-90") end - should "update institution date_modification when edit profile" do - InstitutionTestHelper.create_public_institution("Just a test name", "JTN", "BR", "DF", "Gama", @juridical_nature, @govPower, @govSphere, "12.345.678/9055-33") - - post :edit, :profile => Institution.last.community.identifier, :profile_data => {:name => "Ministerio da Saude"}, :institution => Institution.last - - date = Time.now.day.to_s + "/" + Time.now.month.to_s + "/" + Time.now.year.to_s - assert_equal date, Institution.last.date_modification - end - should "add new institution for user into edit profile" do user = fast_create(User) user.person = fast_create(Person) diff --git a/test/unit/software_license_info_test.rb b/test/unit/software_license_info_test.rb index b4a686d..633e4cd 100644 --- a/test/unit/software_license_info_test.rb +++ b/test/unit/software_license_info_test.rb @@ -2,22 +2,20 @@ require File.dirname(__FILE__) + '/../../../../test/test_helper' class SoftwareDatabaseTest < ActiveSupport::TestCase - def setup - @software_license_info = LicenseInfo.create!(:version => "1.0", :link => "www.gpl2.com") - end - should "save if all informations are filled" do - puts @software_license_info.inspect + @software_license_info = LicenseInfo.create(:version => "GPL", :link => "www.gpl2.com") assert @software_license_info.save!, "License Info should have been saved" end should "not save if license info version is empty" do + @software_license_info = LicenseInfo.create(:version => "GPL", :link => "www.gpl2.com") @software_license_info.version = nil assert !@software_license_info.save, "Version can't be blank" end should "save if link is empty" do + @software_license_info = LicenseInfo.create(:version => "GPL", :link => "www.gpl2.com") @software_license_info.link = nil - assert @oftware_license_info.save, "License info should have been saved" + assert @software_license_info.save, "License info should have been saved" end end -- libgit2 0.21.2